ladybird/Libraries/LibWeb/CSS
Aliaksandr Kalenik 61c952fb43 LibWeb: Optimize style invalidation caused by DOM structural changes
With this change, siblings of an inserted node are no longer invalidated
unless the insertion could potentially affect their style. By
"potentially affected," we mean elements that are evaluated against the
following selectors during matching:
- Sibling combinators (+ or ~)
- Pseudo-classes :first-child and :last-child
- Pseudo-classes :nth-child, :nth-last-child, :nth-of-type, and
  :nth-last-of-type
2025-02-06 20:07:11 +01:00
..
Parser LibWeb/CSS: Integrate ParsingContext into the Parser 2025-02-06 16:47:25 +00:00
StyleValues LibWeb/CSS: Fix linear-gradient single color-stop usage 2025-02-03 17:24:10 +00:00
SyntaxHighlighter
Angle.cpp LibWeb/CSS: Wrap calc()-resolution data in a struct 2025-01-30 19:31:54 +01:00
Angle.h Revert "LibWeb/CSS: Rename CalculatedStyleValue -> CSSMathValue" 2024-12-21 18:14:28 +01:00
AnimationEvent.cpp LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
AnimationEvent.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
AnimationEvent.idl
CalculatedOr.cpp LibWeb/CSS: Update CalculatedOr API to use CalculationResolutionContext 2025-01-30 19:31:54 +01:00
CalculatedOr.h LibWeb/CSS: Update CalculatedOr API to use CalculationResolutionContext 2025-01-30 19:31:54 +01:00
CascadedProperties.cpp LibWeb/CSS: Integrate ParsingContext into the Parser 2025-02-06 16:47:25 +00:00
CascadedProperties.h LibWeb: Split StyleComputer work into two phases with separate outputs 2024-12-22 10:12:49 +01:00
CascadeOrigin.h LibWeb: Split StyleComputer work into two phases with separate outputs 2024-12-22 10:12:49 +01:00
CharacterTypes.h LibWeb: Move CSS character type definitions to new header 2024-12-02 16:19:47 +00:00
Clip.cpp
Clip.h
ColumnCount.h Everywhere: Run clang-format 2024-12-28 05:39:32 -08:00
ComputedProperties.cpp LibWeb/CSS: Remove redundant CSS:: namespaces from ComputedProperties 2025-02-05 18:12:36 +01:00
ComputedProperties.h LibWeb/CSS: Remove redundant CSS:: namespaces from ComputedProperties 2025-02-05 18:12:36 +01:00
ComputedValues.h LibWeb/CSS: Implement mix-blend-mode 2025-02-05 11:26:58 +00:00
CountersSet.cpp AK+Everywhere: Rename verify_cast to as 2025-01-21 11:34:06 -05:00
CountersSet.h
CSS.cpp LibWeb/CSS: Integrate ParsingContext into the Parser 2025-02-06 16:47:25 +00:00
CSS.h
CSS.idl
CSSAnimation.cpp AK+Everywhere: Rename verify_cast to as 2025-01-21 11:34:06 -05:00
CSSAnimation.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
CSSAnimation.idl
CSSConditionRule.cpp
CSSConditionRule.h
CSSConditionRule.idl
CSSFontFaceRule.cpp LibURL+LibWeb: Make URL::serialize return a String 2024-12-04 16:34:13 +00:00
CSSFontFaceRule.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
CSSFontFaceRule.idl
CSSGroupingRule.cpp
CSSGroupingRule.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
CSSGroupingRule.idl
CSSImportRule.cpp LibWeb/CSS: Integrate ParsingContext into the Parser 2025-02-06 16:47:25 +00:00
CSSImportRule.h LibWeb/CSS: Use fetch for CSS import rules 2024-12-22 12:30:09 +01:00
CSSImportRule.idl
CSSKeyframeRule.cpp LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
CSSKeyframeRule.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
CSSKeyframeRule.idl
CSSKeyframesRule.cpp LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
CSSKeyframesRule.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
CSSKeyframesRule.idl
CSSLayerBlockRule.cpp LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
CSSLayerBlockRule.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
CSSLayerBlockRule.idl
CSSLayerStatementRule.cpp LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
CSSLayerStatementRule.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
CSSLayerStatementRule.idl
CSSMediaRule.cpp LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
CSSMediaRule.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
CSSMediaRule.idl
CSSNamespaceRule.cpp LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
CSSNamespaceRule.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
CSSNamespaceRule.idl
CSSNestedDeclarations.cpp LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
CSSNestedDeclarations.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
CSSNestedDeclarations.idl
CSSNumericType.cpp LibWeb/CSS: Use CalcSV's context to determine what percentages are 2025-01-13 10:59:16 +00:00
CSSNumericType.h LibWeb/CSS: Use CalcSV's context to determine what percentages are 2025-01-13 10:59:16 +00:00
CSSPropertyRule.cpp LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
CSSPropertyRule.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
CSSPropertyRule.idl
CSSRule.cpp
CSSRule.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
CSSRule.idl
CSSRuleList.cpp LibWeb/CSS: Integrate ParsingContext into the Parser 2025-02-06 16:47:25 +00:00
CSSRuleList.h LibGC: Rename MarkedVector => RootVector 2024-12-26 19:10:44 +01:00
CSSRuleList.idl
CSSStyleDeclaration.cpp LibWeb/CSS: Integrate ParsingContext into the Parser 2025-02-06 16:47:25 +00:00
CSSStyleDeclaration.h LibWeb: Serialize resolved CSS values in dedicated serialization mode 2024-12-07 08:31:03 +00:00
CSSStyleDeclaration.idl LibWeb: Generate IDL attributes for all supported CSS properties 2024-11-14 19:50:22 +01:00
CSSStyleRule.cpp LibWeb/CSS: Integrate ParsingContext into the Parser 2025-02-06 16:47:25 +00:00
CSSStyleRule.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
CSSStyleRule.idl
CSSStyleSheet.cpp LibWeb/CSS: Integrate ParsingContext into the Parser 2025-02-06 16:47:25 +00:00
CSSStyleSheet.h LibWeb: Fix insert/delete rule invalidation for adopted style sheets 2025-01-13 23:03:07 +01:00
CSSStyleSheet.idl
CSSStyleValue.cpp LibWeb/CSS: Wrap calc()-resolution data in a struct 2025-01-30 19:31:54 +01:00
CSSStyleValue.h LibWeb/CSS: Merge RotationStyleValue into TransformationStyleValue 2025-01-17 10:12:39 +01:00
CSSSupportsRule.cpp LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
CSSSupportsRule.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
CSSSupportsRule.idl
CSSTransition.cpp AK+Everywhere: Rename verify_cast to as 2025-01-21 11:34:06 -05:00
CSSTransition.h LibWeb/DOM: Fire transition[cancel,start,run,end] events 2024-12-25 17:14:08 +01:00
CSSTransition.idl
Default.css LibWeb/CSS: Implement the color-scheme CSS property 2025-01-08 11:18:13 +00:00
Display.cpp LibWeb: Make CSS display serialization match other engines 2024-11-15 14:46:09 +01:00
Display.h LibWeb: Implement CSS 'contain' property 2025-01-28 11:24:40 +00:00
EasingFunctions.json
EdgeRect.cpp
EdgeRect.h
ElementCSSInlineStyle.idl
Enums.json LibWeb/CSS: Replace is_generic_font_family() with a CSS enum 2025-02-06 16:47:25 +00:00
Fetch.cpp LibURL+LibWeb: Make URL::basic_parse return an Optional<URL> 2025-01-11 10:08:29 -05:00
Fetch.h LibWeb/CSS: Implement "fetch a style resource" algorithm 2024-12-22 12:30:09 +01:00
Filter.h Everywhere: Run clang-format 2024-12-28 05:39:32 -08:00
Flex.cpp
Flex.h
FontFace.cpp LibWeb/CSS: Integrate ParsingContext into the Parser 2025-02-06 16:47:25 +00:00
FontFace.h LibWeb: Remove unneeded spec deviation from font loading 2025-01-04 17:58:38 +00:00
FontFace.idl
FontFaceSet.cpp LibWeb/CSS: Integrate ParsingContext into the Parser 2025-02-06 16:47:25 +00:00
FontFaceSet.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
FontFaceSet.idl
Frequency.cpp LibWeb/CSS: Wrap calc()-resolution data in a struct 2025-01-30 19:31:54 +01:00
Frequency.h Revert "LibWeb/CSS: Rename CalculatedStyleValue -> CSSMathValue" 2024-12-21 18:14:28 +01:00
GeneralEnclosed.h
GridTrackPlacement.cpp
GridTrackPlacement.h Everywhere: Run clang-format 2024-12-28 05:39:32 -08:00
GridTrackSize.cpp
GridTrackSize.h
Interpolation.cpp LibWeb/CSS: Make CalculationNodes ref-counted 2025-01-30 19:31:54 +01:00
Interpolation.h LibWeb/CSS: Give calc() a CalculationContext for resolving percentages 2025-01-13 10:59:16 +00:00
InvalidationSet.cpp LibWeb: Allow to early break from InvalidationSet::for_each_property() 2025-01-29 09:30:18 +01:00
InvalidationSet.h LibWeb: Allow to early break from InvalidationSet::for_each_property() 2025-01-29 09:30:18 +01:00
Keywords.json LibWeb: Implement text-align: match-parent 2025-02-05 17:45:44 +00:00
Length.cpp LibWeb/CSS: Wrap calc()-resolution data in a struct 2025-01-30 19:31:54 +01:00
Length.h LibWeb/CSS: Add Length::make_px(double) overload 2025-01-24 13:55:52 +01:00
LengthBox.cpp
LengthBox.h Revert "LibWeb/CSS: Rename CalculatedStyleValue -> CSSMathValue" 2024-12-21 18:14:28 +01:00
LinkStyle.idl
MathFunctions.json LibWeb/CSS: Add some FIXME comments for missing math-function features 2025-01-30 19:31:54 +01:00
MediaFeatures.json
MediaList.cpp LibWeb/CSS: Integrate ParsingContext into the Parser 2025-02-06 16:47:25 +00:00
MediaList.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
MediaList.idl
MediaQuery.cpp LibWeb/CSS: Update CalculatedOr API to use CalculationResolutionContext 2025-01-30 19:31:54 +01:00
MediaQuery.h LibWeb/CSS: Allow calc() values in media queries 2024-12-04 12:26:50 +00:00
MediaQueryList.cpp LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
MediaQueryList.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
MediaQueryList.idl
MediaQueryListEvent.cpp LibWeb/CSS: Create a MediaQueryListEvent when calling MQLE::create() 2024-12-25 11:56:37 +01:00
MediaQueryListEvent.h LibWeb/CSS: Create a MediaQueryListEvent when calling MQLE::create() 2024-12-25 11:56:37 +01:00
MediaQueryListEvent.idl
Number.cpp LibWeb/CSS: Make non-finite Numbers serialize as themselves 2025-01-30 19:31:54 +01:00
Number.h LibWeb/CSS: Make non-finite Numbers serialize as themselves 2025-01-30 19:31:54 +01:00
ParsedFontFace.cpp
ParsedFontFace.h LibGfx: Return family names by reference to avoid unnecessairy cloning 2024-11-20 15:38:03 +01:00
Percentage.h
PercentageOr.h Revert "LibWeb/CSS: Rename CalculatedStyleValue -> CSSMathValue" 2024-12-21 18:14:28 +01:00
PreferredColorScheme.cpp
PreferredColorScheme.h
PreferredContrast.cpp
PreferredContrast.h
PreferredMotion.cpp
PreferredMotion.h
Properties.json LibWeb/CSS: Implement mix-blend-mode 2025-02-05 11:26:58 +00:00
PropertyName.h
PseudoClasses.json LibWeb: Implement CSS validity pseudo-classes 2025-02-05 12:38:55 +00:00
QuirksMode.css
Ratio.cpp
Ratio.h
Resolution.cpp
Resolution.h
ResolvedCSSStyleDeclaration.cpp AK+Everywhere: Rename verify_cast to as 2025-01-21 11:34:06 -05:00
ResolvedCSSStyleDeclaration.h LibWeb: Serialize resolved CSS values in dedicated serialization mode 2024-12-07 08:31:03 +00:00
Screen.cpp LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
Screen.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
Screen.idl LibWeb: Update Screen IDL definition to not inherit from EventTarget 2024-11-26 18:44:26 +01:00
ScreenOrientation.cpp LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
ScreenOrientation.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
ScreenOrientation.idl
Selector.cpp LibWeb: Use fast CSS selector matching in default matches() code path 2025-02-03 10:28:08 +01:00
Selector.h LibWeb: Use fast CSS selector matching in default matches() code path 2025-02-03 10:28:08 +01:00
SelectorEngine.cpp LibWeb: Optimize style invalidation caused by DOM structural changes 2025-02-06 20:07:11 +01:00
SelectorEngine.h LibWeb: Use fast CSS selector matching in default matches() code path 2025-02-03 10:28:08 +01:00
Serialize.cpp LibWeb/CSS: Shorten the length of srgb serialization 2024-12-04 11:30:44 +00:00
Serialize.h LibWeb/CSS: Remove unused serialization helpers 2024-12-04 11:30:44 +00:00
Size.cpp Revert "LibWeb/CSS: Rename CalculatedStyleValue -> CSSMathValue" 2024-12-21 18:14:28 +01:00
Size.h Revert "LibWeb/CSS: Rename CalculatedStyleValue -> CSSMathValue" 2024-12-21 18:14:28 +01:00
Sizing.cpp
Sizing.h
StyleComputer.cpp LibWeb/CSS: Integrate ParsingContext into the Parser 2025-02-06 16:47:25 +00:00
StyleComputer.h LibWeb: Use fast CSS selector matching in default matches() code path 2025-02-03 10:28:08 +01:00
StyleInvalidation.cpp LibWeb: Inline CSSStyleValue::to_keyword() 2025-01-28 01:12:45 +01:00
StyleInvalidation.h
StyleInvalidationData.cpp LibWeb: Use invalidation sets for :has() invalidation 2025-01-29 09:30:18 +01:00
StyleInvalidationData.h LibWeb: Fix underinvalidation of :nth-child using invalidation sets 2025-01-25 10:16:21 +01:00
StyleProperty.cpp
StyleProperty.h
StyleSheet.cpp
StyleSheet.h LibWeb/CSS: Expose CSSStyleSheet's origin clean flag 2024-12-22 12:30:09 +01:00
StyleSheet.idl
StyleSheetIdentifier.cpp
StyleSheetIdentifier.h
StyleSheetList.cpp LibWeb: Fix insert/delete rule invalidation for adopted style sheets 2025-01-13 23:03:07 +01:00
StyleSheetList.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
StyleSheetList.idl
Supports.cpp LibWeb/CSS: Integrate ParsingContext into the Parser 2025-02-06 16:47:25 +00:00
Supports.h LibWeb: Fix incorrect spec link for the @supports rule 2024-11-23 18:44:38 +00:00
SystemColor.cpp LibWeb/CSS: Implement the color-scheme CSS property 2025-01-08 11:18:13 +00:00
SystemColor.h LibWeb/CSS: Implement the color-scheme CSS property 2025-01-08 11:18:13 +00:00
Time.cpp LibWeb/CSS: Wrap calc()-resolution data in a struct 2025-01-30 19:31:54 +01:00
Time.h Revert "LibWeb/CSS: Rename CalculatedStyleValue -> CSSMathValue" 2024-12-21 18:14:28 +01:00
Transformation.cpp LibWeb/CSS: Update CalculatedOr API to use CalculationResolutionContext 2025-01-30 19:31:54 +01:00
Transformation.h
TransformFunctions.json
TransitionEvent.cpp LibWeb/CSS: Add the TransitionEvent type 2024-12-25 17:14:08 +01:00
TransitionEvent.h LibWeb/CSS: Add the TransitionEvent type 2024-12-25 17:14:08 +01:00
TransitionEvent.idl LibWeb/CSS: Add the TransitionEvent type 2024-12-25 17:14:08 +01:00
VisualViewport.cpp LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
VisualViewport.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
VisualViewport.idl