ladybird/Libraries/LibWeb/CSS
Andreas Kling 5df3838a80 LibWeb: Evaluate style sheet media rules immediately on insertion
Before this change, we were waiting for Document to lazily evaluate
sheet media and media rules. This often meant that we'd get two
full-document style invalidations: one from adding a new style sheet,
and one from the media queries changing state.

By evaluating the rules eagerly on insertion, we coalesce the two
invalidations into one. This reduces the number of full-document
invalidations on Speedometer 3 from 51 to 34.
2025-04-19 01:14:02 +02:00
..
Parser LibWeb: Don't construct stylesheet when modifying CSSStyleSheet rules 2025-04-16 22:03:12 +01:00
StyleValues LibWeb: Skip dynamic_cast in CSSRGB after we already did a type check 2025-04-18 14:45:56 +02:00
SyntaxHighlighter
Angle.cpp LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
Angle.h LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06: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
BooleanExpression.cpp LibWeb: Implement generic boolean logic for media/supports queries 2025-03-17 10:00:19 +00:00
BooleanExpression.h LibWeb: Implement generic boolean logic for media/supports queries 2025-03-17 10:00:19 +00:00
CalculatedOr.cpp LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
CalculatedOr.h LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
CascadedProperties.cpp LibWeb/CSS: Move and rename PseudoElement types to prep for code gen 2025-03-24 09:49:50 +00:00
CascadedProperties.h LibWeb/CSS: Move and rename PseudoElement types to prep for code gen 2025-03-24 09:49:50 +00: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: Don't crash when border-spacing is set to a calc() value 2025-03-21 08:16:30 +00:00
ComputedProperties.h LibWeb: Make :hover invalidation logic reusable for all pseudo classes 2025-04-17 19:45:55 +02:00
ComputedValues.h LibGfx+LibWeb: Store Typeface and Font-related types in RefPtr to const 2025-04-16 10:41:44 -06: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 LibWeb: Fix typos - act II 2025-04-09 15:05:20 +01: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
CSSFontFaceDescriptors.cpp LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
CSSFontFaceDescriptors.h LibWeb/CSS: Use initial values for @font-face descriptors 2025-04-07 10:00:21 +01:00
CSSFontFaceDescriptors.idl LibWeb/CSS: Add CSSFontFaceDescriptors type 2025-04-04 10:40:32 +01:00
CSSFontFaceRule.cpp LibWeb/CSS: Serialize @font-face closer to spec 2025-04-07 10:00:21 +01:00
CSSFontFaceRule.h LibWeb/CSS: Only attempt to load valid @font-face fonts 2025-04-04 10:40:32 +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: Make fetch_a_style_resource() work with no CSSStyleSheet 2025-04-15 09:54:35 +01:00
CSSImportRule.h LibWeb/CSS: Don't resolve @import URLs until they are used 2025-04-09 18:45:57 +01:00
CSSImportRule.idl LibWeb/CSS: Mark CSSImportRule.media as nullable 2025-04-09 18:45:57 +01:00
CSSKeyframeRule.cpp LibWeb/CSS: Merge style declaration subclasses into CSSStyleProperties 2025-03-19 13:53:00 +00:00
CSSKeyframeRule.h LibWeb/CSS: Merge style declaration subclasses into CSSStyleProperties 2025-03-19 13:53:00 +00:00
CSSKeyframeRule.idl LibWeb/CSS: Merge style declaration subclasses into CSSStyleProperties 2025-03-19 13:53:00 +00:00
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 LibWeb/CSS: Merge style declaration subclasses into CSSStyleProperties 2025-03-19 13:53:00 +00:00
CSSNestedDeclarations.h LibWeb/CSS: Merge style declaration subclasses into CSSStyleProperties 2025-03-19 13:53:00 +00:00
CSSNestedDeclarations.idl
CSSNumericType.cpp LibWeb: Parse CSS fit-content(<length-percentage>) values 2025-02-27 00:44:14 +01:00
CSSNumericType.h LibWeb/CSS: Use CalcSV's context to determine what percentages are 2025-01-13 10:59:16 +00:00
CSSPropertyRule.cpp LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
CSSPropertyRule.h LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06: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: Move property code from CSSStyleDeclaration to *Properties 2025-03-19 13:53:00 +00:00
CSSStyleDeclaration.h LibWeb/CSS: Move property code from CSSStyleDeclaration to *Properties 2025-03-19 13:53:00 +00:00
CSSStyleDeclaration.idl LibWeb/CSS: Move property code from CSSStyleDeclaration to *Properties 2025-03-19 13:53:00 +00:00
CSSStyleProperties.cpp LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
CSSStyleProperties.h LibWeb/CSS: Move property code from CSSStyleDeclaration to *Properties 2025-03-19 13:53:00 +00:00
CSSStyleProperties.idl LibWeb/CSS: Move property code from CSSStyleDeclaration to *Properties 2025-03-19 13:53:00 +00:00
CSSStyleRule.cpp LibWeb/CSS: Let CSSStyleValue know its CSSStyleSheet 2025-04-15 09:54:35 +01:00
CSSStyleRule.h LibWeb/CSS: Let CSSStyleValue know its CSSStyleSheet 2025-04-15 09:54:35 +01:00
CSSStyleRule.idl LibWeb/CSS: Merge style declaration subclasses into CSSStyleProperties 2025-03-19 13:53:00 +00:00
CSSStyleSheet.cpp LibWeb: Don't construct stylesheet when modifying CSSStyleSheet rules 2025-04-16 22:03:12 +01:00
CSSStyleSheet.h LibWeb/CSS: Expose owning document of CSSStyleSheet 2025-04-15 09:54:35 +01:00
CSSStyleSheet.idl
CSSStyleValue.cpp LibWeb/CSS: Add FontSourceStyleValue 2025-04-04 10:40:32 +01:00
CSSStyleValue.h LibWeb/CSS: Let CSSStyleValue know its CSSStyleSheet 2025-04-15 09:54:35 +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: Add slider- prefix to slider pseudo-element names 2025-04-11 21:27:47 +01:00
Descriptor.cpp LibWeb: Parse descriptors as style values, using the JSON data 2025-04-04 10:40:32 +01:00
Descriptor.h LibWeb: Parse descriptors as style values, using the JSON data 2025-04-04 10:40:32 +01:00
Descriptors.json LibWeb/CSS: Remove unnecessary note about unicode-range parsing 2025-04-07 10:00:21 +01: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 LibWeb/CSS: Merge style declaration subclasses into CSSStyleProperties 2025-03-19 13:53:00 +00:00
Enums.json LibWeb: Implement text-decoration: spelling-error and grammar-error 2025-02-28 16:34:08 +00:00
Fetch.cpp LibWeb/CSS: Fetch ImageStyleValue images closer to spec 2025-04-15 09:54:35 +01:00
Fetch.h LibWeb/CSS: Fetch ImageStyleValue images closer to spec 2025-04-15 09:54:35 +01:00
Filter.h Everywhere: Run clang-format 2024-12-28 05:39:32 -08:00
Flex.cpp
Flex.h
FontFace.cpp LibGfx+LibWeb: Store Typeface and Font-related types in RefPtr to const 2025-04-16 10:41:44 -06:00
FontFace.h LibGfx+LibWeb: Store Typeface and Font-related types in RefPtr to const 2025-04-16 10:41:44 -06:00
FontFace.idl
FontFaceSet.cpp LibJS: Make Completion.[[Value]] non-optional 2025-04-05 11:20:26 +02:00
FontFaceSet.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
FontFaceSet.idl
Frequency.cpp LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
Frequency.h LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
GridTrackPlacement.cpp LibWeb: Avoid repetition when serializing grid track placement values 2025-03-19 02:08:05 +01:00
GridTrackPlacement.h Everywhere: Run clang-format 2024-12-28 05:39:32 -08:00
GridTrackSize.cpp LibWeb/CSS: Make empty GridTrackSize value serialize to "none" 2025-03-22 17:33:37 +01:00
GridTrackSize.h
Interpolation.cpp LibWeb: Make storage of CSS::CalculationNodes const-correct 2025-04-16 10:41:44 -06: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: Generate DescriptorID enum 2025-04-04 10:40:32 +01:00
Length.cpp LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
Length.h LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
LengthBox.cpp
LengthBox.h LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06: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: Invalidate style (and rule cache) on MediaList changes 2025-03-04 19:07:40 +01:00
MediaList.h LibWeb: Invalidate style (and rule cache) on MediaList changes 2025-03-04 19:07:40 +01:00
MediaList.idl
MediaQuery.cpp LibWeb/CSS: Compare MediaFeatureValues using references not copies 2025-03-17 10:00:19 +00:00
MediaQuery.h LibWeb/CSS: Compare MediaFeatureValues using references not copies 2025-03-17 10:00:19 +00:00
MediaQueryList.cpp LibWeb: Add opt-in tracing of update_layout() calls with reason 2025-03-08 03:37:38 +01:00
MediaQueryList.h LibWeb: Don't lose change events on MediaQueryList internal state change 2025-02-13 20:52:31 +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 LibWeb/CSS: Qualify uses of LibURL 2025-04-09 18:45:57 +01:00
ParsedFontFace.h LibWeb/CSS: Qualify uses of LibURL 2025-04-09 18:45:57 +01:00
Percentage.h
PercentageOr.h LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
PreferredColorScheme.cpp
PreferredColorScheme.h
PreferredContrast.cpp
PreferredContrast.h
PreferredMotion.cpp
PreferredMotion.h
Properties.json LibWeb: Set clip-path animation type to by-computed-value 2025-04-09 09:02:59 +01:00
PropertyName.h
PseudoClassBitmap.h LibWeb: Make :hover invalidation logic reusable for all pseudo classes 2025-04-17 19:45:55 +02:00
PseudoClasses.json LibWeb: Replace webkit meter-state pseudo-elements with pseudo-classes 2025-03-19 10:10:03 +00:00
PseudoElements.json LibWeb: Add slider- prefix to slider pseudo-element names 2025-04-11 21:27:47 +01:00
QuirksMode.css LibWeb/CSS: Update quirks-mode styling for form elements 2025-03-26 09:47:45 +00:00
Ratio.cpp
Ratio.h
Resolution.cpp
Resolution.h
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: Make :hover invalidation logic reusable for all pseudo classes 2025-04-17 19:45:55 +02:00
Selector.h LibWeb: Make :hover invalidation logic reusable for all pseudo classes 2025-04-17 19:45:55 +02:00
SelectorEngine.cpp LibWeb: Make :hover invalidation logic reusable for all pseudo classes 2025-04-17 19:45:55 +02:00
SelectorEngine.h LibWeb: Make :hover invalidation logic reusable for all pseudo classes 2025-04-17 19:45:55 +02:00
Serialize.cpp Everywhere: Remove sv suffix from format string literals 2025-04-08 20:00:18 -04:00
Serialize.h LibWeb/CSS: Serialize @font-face closer to spec 2025-04-07 10:00:21 +01:00
Size.cpp LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
Size.h LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
Sizing.cpp
Sizing.h
StyleComputer.cpp LibWeb: Make Node::parent_element return GC::Ptr 2025-04-18 10:49:02 +02:00
StyleComputer.h LibWeb: Make :hover invalidation logic reusable for all pseudo classes 2025-04-17 19:45:55 +02:00
StyleInvalidation.cpp LibWeb: Update the layout tree when CSS text-transform changes 2025-03-08 20:22:01 +01:00
StyleInvalidation.h LibGC+LibWeb+LibJS: Remove workaround for Swift boolean bitfield issue 2025-04-04 13:06:53 -06:00
StyleInvalidationData.cpp LibWeb: Narrow :has() style invalidation to ancestor nodes 2025-02-10 01:13:53 +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 LibWeb/CSS: Store CSSStyleSheet location as a URL 2025-04-09 18:45:57 +01:00
StyleSheet.h LibWeb/CSS: Make it clear that StyleSheet::media() is never null 2025-04-09 18:45:57 +01:00
StyleSheet.idl
StyleSheetIdentifier.cpp LibWeb+WebContent: Include rule count in listed CSS style sheets 2025-03-13 16:56:28 -04:00
StyleSheetIdentifier.h LibWeb+WebContent: Include rule count in listed CSS style sheets 2025-03-13 16:56:28 -04:00
StyleSheetList.cpp LibWeb: Evaluate style sheet media rules immediately on insertion 2025-04-19 01:14:02 +02:00
StyleSheetList.h LibWeb/CSS: Return GC::Ref from style sheet parsing methods 2025-04-15 09:40:38 +01:00
StyleSheetList.idl
Supports.cpp LibWeb: Implement CSSImportRule.supportsText 2025-03-19 16:42:51 +01:00
Supports.h LibWeb/CSS: Implement @supports font-format() and font-tech() 2025-03-17 10:00:19 +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: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
Time.h LibWeb: Make storage of CSS::StyleValues const-correct 2025-04-16 10:41:44 -06:00
Transformation.cpp LibWeb: Make transform: scale(calc(..)) work 2025-03-25 19:53:36 +00: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
URL.cpp LibWeb/CSS: Parse <url> as a new CSS::URL type 2025-04-09 18:45:57 +01:00
URL.h LibWeb/CSS: Parse <url> as a new CSS::URL type 2025-04-09 18:45:57 +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