ladybird/Libraries/LibWeb/CSS/StyleValues
Jonathan Gamble 8f1cb4cbb0 LibWeb: Implement resizing for eligible elements and update scrollbars
Add ElementResizeAction to Page (maybe there's a better place). It's
just a mousemove delegate that updates styles on the target element.

Add ChromeMetrics for zoom-invariant chrome like scrollbar thumb
thickness, resize gripper size, paddings, etc. It's not user-stylable
but separates basic concerns in a way that a visually gifted
designer unlike myself can adjust to taste.

These values are pre-divided by zoom factor so that PaintableBox can
continue using device_pixels_per_css_pixel calls as normal.

The adjusted metrics are computed on demand from Page multiple times
per paint cycle, which is not ideal but avoids lifetime management and
atomics. Maybe someone with more surety about the painting flow control
can improve this, but it won't be a huge win. If profiling shows
this slowing paints, then Ladybird is in good shape.

Update PaintableBox to draw the resize gripper and deconflict
the scrollbars. Set apropriate cursors for scrollbars and gripper in
mousemove. We override EventHandler's cursor handling because nothing
should ever come between a man and his resize gripper.

Chrome metrics use the CSSPixels class. This is good because it's
broadly compatible but bad because they're actually different units
when zoom is not 1.0. If that's a problem, we could make a new type
or just use double.
2026-01-12 11:00:14 +00:00
..
AbstractImageStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
AbstractImageStyleValue.h LibWeb: Make InterpolationMethod serialization take a StringBuilder 2026-01-09 10:00:58 +01:00
AbstractNonMathCalcFunctionStyleValue.h LibWeb: Don't pass unnecessary PropertyComputationDependencies struct 2025-10-22 00:01:30 +02:00
AnchorSizeStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
AnchorSizeStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
AnchorStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
AnchorStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
AngleStyleValue.cpp LibWeb: Use StringBuilder when serializing more CSS types 2026-01-09 10:00:58 +01:00
AngleStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
BackgroundSizeStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
BackgroundSizeStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
BasicShapeStyleValue.cpp LibWeb: Avoid String allocations in BasicShape serialization methods 2026-01-09 10:00:58 +01:00
BasicShapeStyleValue.h LibWeb: Avoid String allocations in BasicShape serialization methods 2026-01-09 10:00:58 +01:00
BorderImageSliceStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
BorderImageSliceStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
BorderRadiusRectStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
BorderRadiusRectStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
BorderRadiusStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
BorderRadiusStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
CalculatedStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
CalculatedStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
ColorFunctionStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
ColorFunctionStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
ColorMixStyleValue.cpp LibWeb/CSS: Don't serialize "in oklab" in color-mix() 2026-01-09 19:11:59 +00:00
ColorMixStyleValue.h LibWeb/CSS: Make color-interpolation-method optional in color-mix() 2026-01-09 19:11:59 +00:00
ColorSchemeStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
ColorSchemeStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
ColorStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
ColorStyleValue.h LibWeb: Support the display-p3-linear color space in color functions 2025-10-15 18:40:48 +02:00
ComputationContext.h LibWeb: Pass AbstractElement in ComputationContext 2025-10-22 00:01:30 +02:00
ConicGradientStyleValue.cpp LibWeb: Make InterpolationMethod serialization take a StringBuilder 2026-01-09 10:00:58 +01:00
ConicGradientStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
ContentStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
ContentStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
CounterDefinitionsStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
CounterDefinitionsStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
CounterStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
CounterStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
CursorStyleValue.cpp LibWeb: Implement resizing for eligible elements and update scrollbars 2026-01-12 11:00:14 +00:00
CursorStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
CustomIdentStyleValue.cpp LibWeb/CSS: Use FlyString for CSSStyleValue property name 2025-10-02 13:46:04 +01:00
CustomIdentStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
DimensionStyleValue.cpp LibWeb/CSS: Use FlyString for CSSStyleValue property name 2025-10-02 13:46:04 +01:00
DimensionStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
DisplayStyleValue.cpp LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
DisplayStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
EasingStyleValue.cpp LibWeb: Avoid String allocations in easing values serialization methods 2026-01-09 10:00:58 +01:00
EasingStyleValue.h LibWeb: Avoid String allocations in easing values serialization methods 2026-01-09 10:00:58 +01:00
EdgeStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
EdgeStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
FilterValueListStyleValue.cpp LibWeb: Use StringBuilder when serializing more CSS types 2026-01-09 10:00:58 +01:00
FilterValueListStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
FitContentStyleValue.h LibWeb: Use StringBuilder when serializing more CSS types 2026-01-09 10:00:58 +01:00
FlexStyleValue.h LibWeb: Use StringBuilder when serializing more CSS types 2026-01-09 10:00:58 +01:00
FontSourceStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
FontSourceStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
FontStyleStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
FontStyleStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
FrequencyStyleValue.h LibWeb: Use StringBuilder when serializing more CSS types 2026-01-09 10:00:58 +01:00
GridAutoFlowStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
GridAutoFlowStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
GridTemplateAreaStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
GridTemplateAreaStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
GridTrackPlacementStyleValue.cpp LibWeb: Use StringBuilder when serializing basic grid types 2026-01-09 10:00:58 +01:00
GridTrackPlacementStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
GridTrackSizeListStyleValue.cpp LibWeb: Use StringBuilder when serializing basic grid types 2026-01-09 10:00:58 +01:00
GridTrackSizeListStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
GuaranteedInvalidStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
HSLColorStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
HSLColorStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
HWBColorStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
HWBColorStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
ImageStyleValue.cpp LibWeb/CSS: Do not give internal stylesheets a location URL 2026-01-09 10:54:11 +00:00
ImageStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
IntegerStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
IntegerStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
KeywordStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
KeywordStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
LabLikeColorStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
LabLikeColorStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
LCHLikeColorStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
LCHLikeColorStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
LengthStyleValue.cpp LibWeb: Update Length::absolutize() to take a ResolutionContext 2026-01-08 10:51:35 +01:00
LengthStyleValue.h LibWeb: Use StringBuilder when serializing more CSS types 2026-01-09 10:00:58 +01:00
LightDarkStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
LightDarkStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
LinearGradientStyleValue.cpp LibWeb: Make InterpolationMethod serialization take a StringBuilder 2026-01-09 10:00:58 +01:00
LinearGradientStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
MathDepthStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
MathDepthStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
NumberStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
NumberStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
OpenTypeTaggedStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
OpenTypeTaggedStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
PendingSubstitutionStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
PercentageStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
PositionStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
PositionStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
RadialGradientStyleValue.cpp LibWeb: Make InterpolationMethod serialization take a StringBuilder 2026-01-09 10:00:58 +01:00
RadialGradientStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
RadialSizeStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
RadialSizeStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
RandomValueSharingStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
RandomValueSharingStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
RatioStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
RectStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
RectStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
RepeatStyleStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
RepeatStyleStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
ResolutionStyleValue.h LibWeb: Use StringBuilder when serializing more CSS types 2026-01-09 10:00:58 +01:00
RGBColorStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
RGBColorStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
ScrollbarColorStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
ScrollbarColorStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
ScrollbarGutterStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
ScrollFunctionStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
ScrollFunctionStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
ShadowStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
ShadowStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
ShorthandStyleValue.cpp LibWeb: Reduce String allocations in serialize_layer lambdas 2026-01-09 10:00:58 +01:00
ShorthandStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
StringStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
StyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
StyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
StyleValueList.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
StyleValueList.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
SuperellipseStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
SuperellipseStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
TextIndentStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
TextIndentStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
TextUnderlinePositionStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
TextUnderlinePositionStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
TimeStyleValue.h LibWeb: Use StringBuilder when serializing more CSS types 2026-01-09 10:00:58 +01:00
TransformationStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
TransformationStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
TreeCountingFunctionStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
TreeCountingFunctionStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
UnicodeRangeStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
UnicodeRangeStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
UnresolvedStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
UnresolvedStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
URLStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
ViewFunctionStyleValue.cpp LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00
ViewFunctionStyleValue.h LibWeb: Pass StringBuilder around during StyleValue serialization 2026-01-09 10:00:58 +01:00