ladybird/Libraries/LibWeb/CSS/Parser
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
..
ArbitrarySubstitutionFunctions.cpp LibWeb/CSS: Implement type(<syntax>) in attr() 2025-07-16 14:47:45 +01:00
ArbitrarySubstitutionFunctions.h LibWeb/CSS: Reimplement var()/attr() as arbitrary substitution functions 2025-07-09 16:44:20 +01:00
ComponentValue.cpp LibWeb/CSS: Include guaranteed-invalid value in ComponentValue 2025-07-09 16:44:20 +01:00
ComponentValue.h LibWeb: Implement faster equals() for UnresolvedStyleValue 2025-07-30 11:06:05 +02:00
DescriptorParsing.cpp LibWeb/CSS: Make UnresolvedStyleValue figure out if it contains ASFs 2025-07-16 14:47:45 +01:00
Dimension.h LibWeb/CSS: Add Parser::Dimension::to_string() 2024-12-18 12:21:22 +00:00
GradientParsing.cpp LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
Helpers.cpp LibWeb/CSS: Add CSS.registerProperty JS method 2025-07-22 10:57:54 +01:00
MediaParsing.cpp LibWeb/CSS: Treat block at-rules with no block as invalid 2025-06-25 09:02:45 +02:00
Parser.cpp LibWeb: Don't crash when an unknown property begins with a single dash 2025-07-20 08:54:53 +02:00
Parser.h LibWeb/CSS: Add CSS.registerProperty JS method 2025-07-22 10:57:54 +01:00
PropertyParsing.cpp LibWeb: Save more details about ASF presence in UnresolvedStyleValue 2025-07-30 11:06:05 +02:00
RuleContext.cpp LibWeb/CSS: Add basic implementation of CSSMarginRule 2025-05-16 11:01:39 +01:00
RuleContext.h LibWeb/CSS: Add basic implementation of CSSMarginRule 2025-05-16 11:01:39 +01:00
RuleParsing.cpp LibWeb/CSS: Treat block at-rules with no block as invalid 2025-06-25 09:02:45 +02:00
SelectorParsing.cpp LibWeb/CSS: Parse the ::slotted pseudo-element 2025-07-15 13:54:17 +01:00
Syntax.cpp LibWeb/CSS: Implement "parse with a <syntax>" 2025-07-16 14:47:45 +01:00
Syntax.h LibWeb/CSS: Implement "parse with a <syntax>" 2025-07-16 14:47:45 +01:00
SyntaxParsing.cpp LibWeb/CSS: Implement "parse with a <syntax>" 2025-07-16 14:47:45 +01:00
SyntaxParsing.h LibWeb/CSS: Implement "parse with a <syntax>" 2025-07-16 14:47:45 +01:00
Token.cpp LibWeb/CSS: Construct all CSS Tokens in a consistent way 2025-07-09 15:04:57 +01:00
Token.h LibWeb: Implement faster equals() for UnresolvedStyleValue 2025-07-30 11:06:05 +02:00
Tokenizer.cpp LibWeb/CSS: Stop converting at-rule names to lowercase 2025-07-09 15:04:57 +01:00
Tokenizer.h LibWeb/CSS: Construct all CSS Tokens in a consistent way 2025-07-09 15:04:57 +01:00
TokenStream.h LibWeb/CSS: When dumping CSS tokens, point at the next one 2025-05-23 19:39:23 +01:00
Types.cpp LibWeb: Save more details about ASF presence in UnresolvedStyleValue 2025-07-30 11:06:05 +02:00
Types.h LibWeb: Implement faster equals() for UnresolvedStyleValue 2025-07-30 11:06:05 +02:00
ValueParsing.cpp LibWeb: Invalidate less elements affected by CSS custom properties 2025-07-30 11:06:05 +02:00