ladybird/Libraries/LibWeb/CSS/StyleValues
Aliaksandr Kalenik d1fbb7b51e LibWeb: Invalidate less elements affected by CSS custom properties
Before this change, whenever element's attributes changed, we would add
a flag to "pending invalidation", indicating that all descendants whose
style uses CSS custom properties needed to be recomputed. This resulted
in severe overinvalidation, because we would run invalidation regardless
of whether any custom property on affected element actually changed.

This change takes another approach, and now we decide whether
descendant's style needs to be recomputed based on whether ancestor's
style recomputation results in a change of custom properties, though
this approach adds a little overhead to style computation as now we have
to compare old vs new hashmap of custom properties.

This brings substantial improvement on discord and x.com where, before
this change, advantage of using invalidation sets was lost and we had
to recompute all descendants, because almost all of them use custom
properties.
2025-07-30 11:06:05 +02:00
..
AbstractImageStyleValue.h LibWeb/CSS: Extract SerializationMode into its own header 2025-05-17 07:53:24 +01:00
AngleStyleValue.cpp LibWeb/CSS: Make dimension types serialize in resolved form 2025-05-17 07:53:24 +01:00
AngleStyleValue.h LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
BackgroundRepeatStyleValue.cpp LibWeb: Add mode flag to CSSStyleValue::to_string() 2024-12-07 08:31:03 +00:00
BackgroundRepeatStyleValue.h LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
BackgroundSizeStyleValue.cpp Meta: Enforce newlines around namespaces 2025-05-14 02:01:59 -06:00
BackgroundSizeStyleValue.h LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
BasicShapeStyleValue.cpp LibWeb/CSS: Implement path() basic shape 2025-07-17 13:59:23 -04:00
BasicShapeStyleValue.h LibWeb/CSS: Implement path() basic shape 2025-07-17 13:59:23 -04:00
BorderImageSliceStyleValue.cpp LibWeb: Parse the border-image-slice property 2025-07-03 10:19:44 +01:00
BorderImageSliceStyleValue.h LibWeb: Parse the border-image-slice property 2025-07-03 10:19:44 +01:00
BorderRadiusStyleValue.cpp LibWeb: Use correct canonical serialization for BorderRadiusStyleValue 2025-03-18 21:55:06 +01:00
BorderRadiusStyleValue.h LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
CalculatedStyleValue.cpp LibWeb: Add new CalculatedStyleValue::resolve_* methods 2025-07-16 13:05:33 +01:00
CalculatedStyleValue.h LibWeb: Add new CalculatedStyleValue::resolve_* methods 2025-07-16 13:05:33 +01:00
ColorFunctionStyleValue.cpp LibWeb: Don't resolve colors with unresolved components 2025-07-16 13:05:33 +01:00
ColorFunctionStyleValue.h LibWeb: Don't resolve colors with unresolved components 2025-07-16 13:05:33 +01:00
ColorMixStyleValue.cpp LibWeb: Don't resolve colors with unresolved components 2025-07-16 13:05:33 +01:00
ColorMixStyleValue.h LibWeb: Don't resolve colors with unresolved components 2025-07-16 13:05:33 +01:00
ColorSchemeStyleValue.cpp LibWeb/CSS: Implement the color-scheme CSS property 2025-01-08 11:18:13 +00:00
ColorSchemeStyleValue.h Meta: Enforce newlines around namespaces 2025-05-14 02:01:59 -06:00
ConicGradientStyleValue.cpp Everywhere: Remove sv suffix from format string literals 2025-04-08 20:00:18 -04:00
ConicGradientStyleValue.h LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
ContentStyleValue.cpp LibWeb: Add mode flag to CSSStyleValue::to_string() 2024-12-07 08:31:03 +00:00
ContentStyleValue.h LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
CounterDefinitionsStyleValue.cpp LibWeb: Add mode flag to CSSStyleValue::to_string() 2024-12-07 08:31:03 +00:00
CounterDefinitionsStyleValue.h LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
CounterStyleValue.cpp AK+LibWeb/CSS: Add lower-greek counter style 2025-07-21 15:18:17 +01:00
CounterStyleValue.h LibWeb: Support counter-* properties on pseudo-elements 2025-06-19 12:35:31 +01:00
CSSColorValue.cpp LibWeb: Don't resolve colors with unresolved components 2025-07-16 13:05:33 +01:00
CSSColorValue.h LibWeb: Allow passing a resolution context to CSSStyleValue::to_color 2025-07-04 13:18:55 +01:00
CSSHSL.cpp LibWeb: Serialize RGB, HWB and HSL colors with unresolved components 2025-07-16 13:05:33 +01:00
CSSHSL.h LibWeb: Don't resolve colors with unresolved components 2025-07-16 13:05:33 +01:00
CSSHWB.cpp LibWeb: Serialize RGB, HWB and HSL colors with unresolved components 2025-07-16 13:05:33 +01:00
CSSHWB.h LibWeb: Don't resolve colors with unresolved components 2025-07-16 13:05:33 +01:00
CSSKeywordValue.cpp LibWeb/CSS: Add tokenize() method to style values, to get a list of CVs 2025-07-16 14:47:45 +01:00
CSSKeywordValue.h LibWeb/CSS: Add tokenize() method to style values, to get a list of CVs 2025-07-16 14:47:45 +01:00
CSSLabLike.cpp LibWeb: Don't resolve colors with unresolved components 2025-07-16 13:05:33 +01:00
CSSLabLike.h LibWeb: Don't resolve colors with unresolved components 2025-07-16 13:05:33 +01:00
CSSLCHLike.cpp LibWeb: Don't resolve colors with unresolved components 2025-07-16 13:05:33 +01:00
CSSLCHLike.h LibWeb: Don't resolve colors with unresolved components 2025-07-16 13:05:33 +01:00
CSSLightDark.cpp LibWeb: Don't resolve colors with unresolved components 2025-07-16 13:05:33 +01:00
CSSLightDark.h LibWeb: Don't resolve colors with unresolved components 2025-07-16 13:05:33 +01:00
CSSNumericValue.h
CSSRGB.cpp LibWeb: Serialize RGB, HWB and HSL colors with unresolved components 2025-07-16 13:05:33 +01:00
CSSRGB.h LibWeb: Don't resolve colors with unresolved components 2025-07-16 13:05:33 +01:00
CSSUnitValue.h LibWeb/CSS: Add tokenize() method to style values, to get a list of CVs 2025-07-16 14:47:45 +01:00
CursorStyleValue.cpp LibWeb: Pass device_pixels_per_css_pixel into DisplayList constructor 2025-07-27 10:20:18 +02:00
CursorStyleValue.h LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
CustomIdentStyleValue.h LibWeb/CSS: Add tokenize() method to style values, to get a list of CVs 2025-07-16 14:47:45 +01:00
DisplayStyleValue.cpp LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
DisplayStyleValue.h LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
EasingStyleValue.cpp LibWeb: Allow calc() values in cubic-bezier() easing functions 2025-06-18 08:57:06 +02:00
EasingStyleValue.h LibWeb: Allow calc() values in cubic-bezier() easing functions 2025-06-18 08:57:06 +02:00
EdgeStyleValue.cpp LibWeb/CSS: Extract SerializationMode into its own header 2025-05-17 07:53:24 +01:00
EdgeStyleValue.h LibWeb: Implement interpolation of edge values 2025-04-23 09:13:45 +01:00
FilterValueListStyleValue.cpp LibWeb: Use correct angle type when serializing hue-rotate filter values 2025-07-22 00:53:10 +02:00
FilterValueListStyleValue.h LibWeb/SVG: Implement resolution for a subset of SVG filters 2025-07-09 18:07:12 +01:00
FitContentStyleValue.h LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
FlexStyleValue.h LibWeb/CSS: Make dimension types serialize in resolved form 2025-05-17 07:53:24 +01:00
FontSourceStyleValue.cpp LibWeb/CSS: Parse and use tech() in @font-face { src } 2025-06-05 12:10:29 +01:00
FontSourceStyleValue.h LibWeb/CSS: Parse and use tech() in @font-face { src } 2025-06-05 12:10:29 +01:00
FontStyleStyleValue.cpp LibWeb: Parse oblique font-style with an angle value 2025-05-03 12:05:22 +02:00
FontStyleStyleValue.h LibWeb: Parse oblique font-style with an angle value 2025-05-03 12:05:22 +02:00
FrequencyStyleValue.h LibWeb/CSS: Make dimension types serialize in resolved form 2025-05-17 07:53:24 +01:00
GridAutoFlowStyleValue.cpp LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
GridAutoFlowStyleValue.h LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
GridTemplateAreaStyleValue.cpp LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
GridTemplateAreaStyleValue.h LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
GridTrackPlacementStyleValue.cpp LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
GridTrackPlacementStyleValue.h LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
GridTrackSizeListStyleValue.cpp LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
GridTrackSizeListStyleValue.h LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
GuaranteedInvalidStyleValue.h LibWeb/CSS: Add tokenize() method to style values, to get a list of CVs 2025-07-16 14:47:45 +01:00
ImageStyleValue.cpp LibWeb: Support CSS content property images (and lists, too!) 2025-07-28 22:46:27 +02:00
ImageStyleValue.h LibWeb: Support CSS content property images (and lists, too!) 2025-07-28 22:46:27 +02:00
IntegerStyleValue.cpp LibWeb/CSS: Add tokenize() method to style values, to get a list of CVs 2025-07-16 14:47:45 +01:00
IntegerStyleValue.h LibWeb/CSS: Add tokenize() method to style values, to get a list of CVs 2025-07-16 14:47:45 +01:00
LengthStyleValue.cpp LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
LengthStyleValue.h LibWeb/CSS: Make dimension types serialize in resolved form 2025-05-17 07:53:24 +01:00
LinearGradientStyleValue.cpp Everywhere: Remove sv suffix from format string literals 2025-04-08 20:00:18 -04:00
LinearGradientStyleValue.h LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
MathDepthStyleValue.cpp LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
MathDepthStyleValue.h LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
NumberStyleValue.cpp LibWeb/CSS: Add tokenize() method to style values, to get a list of CVs 2025-07-16 14:47:45 +01:00
NumberStyleValue.h LibWeb/CSS: Add tokenize() method to style values, to get a list of CVs 2025-07-16 14:47:45 +01:00
OpenTypeTaggedStyleValue.cpp LibWeb/CSS: Teach OpenTypeTaggedStyleValue to serialize without "1" 2025-04-07 10:00:21 +01:00
OpenTypeTaggedStyleValue.h LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
PendingSubstitutionStyleValue.h LibWeb/CSS: Add tokenize() method to style values, to get a list of CVs 2025-07-16 14:47:45 +01:00
PercentageStyleValue.h LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
PositionStyleValue.cpp LibWeb: Properly serialize position/edge style values 2024-12-13 11:35:38 +00:00
PositionStyleValue.h LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
RadialGradientStyleValue.cpp Everywhere: Remove sv suffix from format string literals 2025-04-08 20:00:18 -04:00
RadialGradientStyleValue.h LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
RatioStyleValue.h LibWeb/CSS: Add tokenize() method to style values, to get a list of CVs 2025-07-16 14:47:45 +01:00
RectStyleValue.cpp LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
RectStyleValue.h LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
ResolutionStyleValue.h LibWeb/CSS: Make dimension types serialize in resolved form 2025-05-17 07:53:24 +01:00
ScrollbarColorStyleValue.cpp LibWeb/CSS: Implement the scrollbar-color property 2025-06-02 00:17:51 +02:00
ScrollbarColorStyleValue.h LibWeb/CSS: Implement the scrollbar-color property 2025-06-02 00:17:51 +02:00
ScrollbarGutterStyleValue.h LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
ShadowStyleValue.cpp LibWeb: Don't serialize omitted box-shadow and text-shadow values 2025-06-15 16:05:12 +02:00
ShadowStyleValue.h LibWeb: Don't serialize omitted box-shadow and text-shadow values 2025-06-15 16:05:12 +02:00
ShorthandStyleValue.cpp LibWeb: Account for non-shorthand sub-properties when serializing border 2025-07-16 06:49:38 +01:00
ShorthandStyleValue.h LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
StringStyleValue.h LibWeb/CSS: Add tokenize() method to style values, to get a list of CVs 2025-07-16 14:47:45 +01:00
StyleValueList.cpp LibWeb/CSS: Add tokenize() method to style values, to get a list of CVs 2025-07-16 14:47:45 +01:00
StyleValueList.h LibWeb/CSS: Add tokenize() method to style values, to get a list of CVs 2025-07-16 14:47:45 +01:00
TimeStyleValue.h LibWeb/CSS: Make dimension types serialize in resolved form 2025-05-17 07:53:24 +01:00
TransformationStyleValue.cpp LibWeb: Mark CalculatedStyleValue::resolve_* methods as deprecated 2025-07-16 13:05:33 +01:00
TransformationStyleValue.h LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
TransitionStyleValue.cpp LibWeb: Implement the transition-behavior CSS property 2025-05-02 11:07:19 +01:00
TransitionStyleValue.h LibWeb: Implement the transition-behavior CSS property 2025-05-02 11:07:19 +01:00
UnicodeRangeStyleValue.cpp LibWeb/CSS: Implement UnicodeRangeStyleValue 2025-03-28 09:15:02 +00:00
UnicodeRangeStyleValue.h LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
UnresolvedStyleValue.cpp LibWeb: Implement faster equals() for UnresolvedStyleValue 2025-07-30 11:06:05 +02:00
UnresolvedStyleValue.h LibWeb: Invalidate less elements affected by CSS custom properties 2025-07-30 11:06:05 +02:00
URLStyleValue.h LibWeb/CSS: Use CSS::URL for <url> and <paint> types 2025-04-30 17:38:38 +01:00