ladybird/Userland/Libraries/LibWeb/CSS
Sam Atkins d0f80b40b2 LibWeb: Reimplement CalculatedStyleValue as a calculation node tree
VALUES-4 defines the internal representation of `calc()` as a tree of
calculation nodes. ( https://www.w3.org/TR/css-values-4/#calc-internal )

VALUES-3 lacked any definition here, so we had our own ad-hoc
implementation based around the spec grammar. This commit replaces that
with CalculationNodes representing each possible node in the tree.

There are no intended functional changes, though we do now support
nested calc() which previously did not work. For example:
    `width: calc( 42 * calc(3 + 7) );`

I have added an example of this to our test page.

A couple of the layout tests that used `calc()` now return values that
are 0.5px different from before. There's no visual difference, so I
have updated the tests to use the new results.
2023-04-13 09:53:47 +02:00
..
Parser LibWeb: Reimplement CalculatedStyleValue as a calculation node tree 2023-04-13 09:53:47 +02:00
StyleValues LibWeb: Reimplement CalculatedStyleValue as a calculation node tree 2023-04-13 09:53:47 +02:00
SyntaxHighlighter LibGfx+Userland: Make TextAttributes::underline_style optional 2023-03-15 14:55:49 +01:00
Angle.cpp LibWeb: Remove CalculatedStyleValue from Angle 2023-03-30 21:29:50 +02:00
Angle.h LibWeb: Expose type and raw values of basic CSS types 2023-04-13 09:53:47 +02:00
BackdropFilter.h LibWeb: Split FilterValueListStyleValue out of StyleValue.{h,cpp} 2023-03-25 16:56:04 +00:00
CalculatedOr.cpp LibWeb: Introduce CalculatedOr type 2023-03-30 21:29:50 +02:00
CalculatedOr.h LibWeb: Split CalculatedStyleValue out of StyleValue.{h,cpp} 2023-03-30 21:29:50 +02:00
Clip.cpp LibWeb: Move CSS::EdgeRect into its own files 2023-03-30 21:29:50 +02:00
Clip.h LibWeb: Move CSS::EdgeRect into its own files 2023-03-30 21:29:50 +02:00
ComputedValues.h LibWeb: Move PercentageOr and subclasses into PercentageOr.{h,cpp} 2023-03-30 21:29:50 +02:00
CSS.cpp LibWeb: Port the CSS namespace to IDL 2023-03-15 12:48:25 -04:00
CSS.h LibWeb: Port the CSS namespace to IDL 2023-03-15 12:48:25 -04:00
CSS.idl LibWeb: Port the CSS namespace to IDL 2023-03-15 12:48:25 -04:00
CSSConditionRule.cpp
CSSConditionRule.h
CSSConditionRule.idl
CSSFontFaceRule.cpp LibWeb: Make factory method of CSS::CSSFontFaceRule fallible 2023-02-18 00:52:47 +01:00
CSSFontFaceRule.h LibWeb: Make factory method of CSS::CSSFontFaceRule fallible 2023-02-18 00:52:47 +01:00
CSSFontFaceRule.idl
CSSGroupingRule.cpp LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr 2023-03-15 08:48:49 +01:00
CSSGroupingRule.h LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr 2023-03-15 08:48:49 +01:00
CSSGroupingRule.idl
CSSImportRule.cpp LibWeb: Make factory method of CSS::CSSImportRule fallible 2023-02-18 00:52:47 +01:00
CSSImportRule.h LibWeb: Actually visit rules and media queries in imported style sheets 2023-03-30 16:54:15 +02:00
CSSImportRule.idl
CSSMediaRule.cpp LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr 2023-03-15 08:48:49 +01:00
CSSMediaRule.h LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr 2023-03-15 08:48:49 +01:00
CSSMediaRule.idl
CSSRule.cpp
CSSRule.h
CSSRule.idl
CSSRuleList.cpp LibWeb: Actually visit rules and media queries in imported style sheets 2023-03-30 16:54:15 +02:00
CSSRuleList.h LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr 2023-03-15 08:48:49 +01:00
CSSRuleList.idl
CSSStyleDeclaration.cpp LibWeb: Parse Element.style url functions relative to the document 2023-03-29 07:10:53 +02:00
CSSStyleDeclaration.h LibWeb+LibIDL: Fix (or paper over) various const-correctness issues 2023-02-21 00:54:04 +01:00
CSSStyleDeclaration.idl LibIDL: Also parse extended attributes after 'optional' 2023-03-05 21:59:16 +00:00
CSSStyleRule.cpp LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr 2023-03-15 08:48:49 +01:00
CSSStyleRule.h LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr 2023-03-15 08:48:49 +01:00
CSSStyleRule.idl
CSSStyleSheet.cpp LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr 2023-03-15 08:48:49 +01:00
CSSStyleSheet.h LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr 2023-03-15 08:48:49 +01:00
CSSStyleSheet.idl
CSSSupportsRule.cpp LibWeb: Remove CSS::Parser::ParsingContext's default constructor 2023-03-07 11:51:12 +00:00
CSSSupportsRule.h Everywhere: Remove NonnullRefPtr.h includes 2023-03-06 23:46:35 +01:00
CSSSupportsRule.idl
Default.css LibWeb: Add scaleable checkboxes (with theme/accent-color support) 2023-03-23 08:27:51 +00:00
Display.cpp LibWeb: Port CSS::Display to new Strings 2023-02-15 12:48:26 -05:00
Display.h LibWeb: Port CSS::Display to new Strings 2023-02-15 12:48:26 -05:00
EdgeRect.cpp LibWeb: Move CSS::EdgeRect into its own files 2023-03-30 21:29:50 +02:00
EdgeRect.h LibWeb: Move CSS::EdgeRect into its own files 2023-03-30 21:29:50 +02:00
ElementCSSInlineStyle.idl LibWeb: Move Element.prototype.style to ElementCSSInlineStyle mixin 2023-03-20 20:37:40 -04:00
Enums.json
FontFace.cpp LibWeb: Port FontFace to new Strings 2023-02-19 00:51:16 +01:00
FontFace.h LibWeb: Port FontFace to new Strings 2023-02-19 00:51:16 +01:00
Frequency.cpp LibWeb: Remove CalculatedStyleValue from Frequency 2023-03-30 21:29:50 +02:00
Frequency.h LibWeb: Expose type and raw values of basic CSS types 2023-04-13 09:53:47 +02:00
GeneralEnclosed.h LibWeb: Port GeneralEnclosed to new Strings 2023-02-19 00:51:16 +01:00
GridTrackPlacement.cpp
GridTrackPlacement.h
GridTrackSize.cpp LibWeb: Move PercentageOr and subclasses into PercentageOr.{h,cpp} 2023-03-30 21:29:50 +02:00
GridTrackSize.h
Identifiers.json LibWeb: Parse font-stretch CSS property 2023-02-03 12:49:13 +00:00
Length.cpp LibWeb: Make absolutized_length() helper a Length method 2023-03-30 21:29:50 +02:00
Length.h LibWeb: Expose type and raw values of basic CSS types 2023-04-13 09:53:47 +02:00
LengthBox.cpp LibWeb: Move PercentageOr and subclasses into PercentageOr.{h,cpp} 2023-03-30 21:29:50 +02:00
LengthBox.h LibWeb: Move PercentageOr and subclasses into PercentageOr.{h,cpp} 2023-03-30 21:29:50 +02:00
LinkStyle.idl
MediaFeatures.json
MediaList.cpp LibWeb: Remove CSS::Parser::ParsingContext's default constructor 2023-03-07 11:51:12 +00:00
MediaList.h Everywhere: Remove NonnullRefPtr.h includes 2023-03-06 23:46:35 +01:00
MediaList.idl
MediaQuery.cpp LibWeb: Add support for the lh and rlh length units 2023-03-18 20:14:52 +01:00
MediaQuery.h LibWeb: Move PercentageOr and subclasses into PercentageOr.{h,cpp} 2023-03-30 21:29:50 +02:00
MediaQueryList.cpp LibWeb: Port EventTarget to new {Fly}String 2023-04-09 17:27:27 +02:00
MediaQueryList.h Everywhere: Stop using NonnullRefPtrVector 2023-03-06 23:46:35 +01:00
MediaQueryList.idl
MediaQueryListEvent.cpp LibWeb: Port {Mouse,UI,Wheel,}Event to new String 2023-04-07 22:41:01 +02:00
MediaQueryListEvent.h LibWeb: Port MediaQueryListEvent to new String 2023-03-05 18:25:59 +00:00
MediaQueryListEvent.idl LibWeb: Port MediaQueryListEvent to new String 2023-03-05 18:25:59 +00:00
Number.h LibWeb: Expose type and raw values of basic CSS types 2023-04-13 09:53:47 +02:00
Percentage.h LibWeb: Move PercentageOr and subclasses into PercentageOr.{h,cpp} 2023-03-30 21:29:50 +02:00
PercentageOr.cpp LibWeb: Move PercentageOr and subclasses into PercentageOr.{h,cpp} 2023-03-30 21:29:50 +02:00
PercentageOr.h LibWeb: Split CalculatedStyleValue out of StyleValue.{h,cpp} 2023-03-30 21:29:50 +02:00
Position.cpp LibWeb: Move PercentageOr and subclasses into PercentageOr.{h,cpp} 2023-03-30 21:29:50 +02:00
Position.h LibWeb: Move PercentageOr and subclasses into PercentageOr.{h,cpp} 2023-03-30 21:29:50 +02:00
PreferredColorScheme.cpp Everywhere: Rename equals_ignoring_case => equals_ignoring_ascii_case 2023-03-10 13:15:44 +01:00
PreferredColorScheme.h LibWeb: Use StringView in CSS::PreferredColorScheme 2023-02-15 12:48:26 -05:00
Properties.json LibWeb: Add longhand properties for background-position 2023-04-03 07:10:33 +02:00
QuirksMode.css
Ratio.cpp
Ratio.h
Resolution.cpp LibWeb: Move PercentageOr and subclasses into PercentageOr.{h,cpp} 2023-03-30 21:29:50 +02:00
Resolution.h
ResolvedCSSStyleDeclaration.cpp LibWeb: Parse and plumb background-position-x/y 2023-04-03 07:10:33 +02:00
ResolvedCSSStyleDeclaration.h LibWeb+LibIDL: Fix (or paper over) various const-correctness issues 2023-02-21 00:54:04 +01:00
Screen.cpp LibWeb: Make factory method of CSS::Screen fallible 2023-02-18 00:52:47 +01:00
Screen.h LibWeb: Make factory method of CSS::Screen fallible 2023-02-18 00:52:47 +01:00
Screen.idl
Selector.cpp LibWeb: Implement the :defined pseudo class 2023-04-06 11:36:56 +02:00
Selector.h LibWeb: Implement the :defined pseudo class 2023-04-06 11:36:56 +02:00
SelectorEngine.cpp LibWeb: Implement the :defined pseudo class 2023-04-06 11:36:56 +02:00
SelectorEngine.h LibWeb: Support the :scope pseudo class 2023-03-21 10:45:19 +01:00
Serialize.cpp LibWeb: Port CSS/Serialize.{h,cpp} to new Strings, and propagate errors 2023-02-15 12:48:26 -05:00
Serialize.h LibWeb: Port CSS/Serialize.{h,cpp} to new Strings, and propagate errors 2023-02-15 12:48:26 -05:00
Size.cpp LibWeb: Move PercentageOr and subclasses into PercentageOr.{h,cpp} 2023-03-30 21:29:50 +02:00
Size.h LibWeb: Move PercentageOr and subclasses into PercentageOr.{h,cpp} 2023-03-30 21:29:50 +02:00
StyleComputer.cpp LibWeb: Expand background-position layers into x/y position lists 2023-04-03 20:54:36 +02:00
StyleComputer.h LibWeb: Don't apply element inline style to associated pseudo elements 2023-04-02 15:00:06 +02:00
StyleProperties.cpp LibWeb: Remove CalculatedStyleValue from Length 2023-03-30 21:29:50 +02:00
StyleProperties.h LibWeb: Move PercentageOr and subclasses into PercentageOr.{h,cpp} 2023-03-30 21:29:50 +02:00
StyleSheet.cpp
StyleSheet.h LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr 2023-03-15 08:48:49 +01:00
StyleSheet.idl
StyleSheetList.cpp LibWeb: Don't re-sort StyleSheetList on every new sheet insertion 2023-03-30 14:12:07 +02:00
StyleSheetList.h LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr 2023-03-15 08:48:49 +01:00
StyleSheetList.idl
StyleValue.cpp LibWeb: Move StyleValue::absolutized() back where it belongs 2023-04-13 09:53:47 +02:00
StyleValue.h Everywhere: Remove unused DeprecatedString includes 2023-04-09 22:00:54 +02:00
Supports.cpp LibWeb: Remove CSS::Parser::ParsingContext's default constructor 2023-03-07 11:51:12 +00:00
Supports.h LibWeb: Remove CSS::Parser::ParsingContext's default constructor 2023-03-07 11:51:12 +00:00
Time.cpp LibWeb: Remove CalculatedStyleValue from Time 2023-03-30 21:29:50 +02:00
Time.h LibWeb: Expose type and raw values of basic CSS types 2023-04-13 09:53:47 +02:00
TransformFunctions.json
UnicodeRange.h LibWeb: Port CSS::UnicodeRange to new Strings 2023-02-15 12:48:26 -05:00