Tim Ledbetter
e863a04b12
LibWeb: Include grid-auto-* longhands in grid shorthand parsing
2026-02-09 17:36:12 +01:00
Callum Law
11d524bda4
LibWeb: Support CSS font-optical-sizing property
2026-02-03 11:44:25 +00:00
Andreas Kling
35839af2d2
LibWeb: Optimize getComputedStyle() to avoid layout when possible
...
Previously, getComputedStyle() would always call update_layout() for
most properties. This was expensive since layout involves a full tree
traversal even when only style information is needed.
This change introduces a more granular approach:
- Properties needing layout computation (used values like width/height)
still call update_layout()
- Properties needing a layout node for resolved value computation
(colors, border widths, etc.) also call update_layout()
- All other properties now only call update_style()
The set of properties needing layout node for resolution is now defined
in Properties.json via the "needs-layout-node-for-resolved-value" flag,
rather than being hardcoded. This is generated into a new function
property_needs_layout_node_for_resolved_value().
2026-01-26 12:40:36 +01:00
Callum Law
9b20fe6902
LibWeb: Promote font-style to ValueType
...
This means we now allow oblique angles when parsing the `font`
shorthand.
This also required us to rename the existing `FontStyle` enum to
`FontStyleKeyword`
2026-01-13 10:21:26 +00:00
Callum Law
252e1d86bd
LibWeb: Dont serialize font with non-initial reset-only sub-properties
2026-01-13 10:21:26 +00:00
Jonathan Gamble
4579bb5bed
LibWeb: Add resize property plumbing
2026-01-12 11:00:14 +00:00
Callum Law
cbd07b2153
LibWeb: Don't mark whether shorthand properties are inherited
...
Inheritance applies to longhands individually so whether a shorthand was
marked as inherit or not is irrelevant
2025-12-29 16:11:13 +01:00
Callum Law
e79644bf6b
LibWeb: Mark scrollbar-color property as inherited
2025-12-29 16:11:13 +01:00
Andreas Kling
b3b3a8602a
LibWeb: Mark a handful of CSS properties as not affecting layout
...
I noticed us invalidating layouts in the wild (e.g on reddit) for
properties that can't possibly affect layout.
2025-12-20 08:21:18 +00:00
Callum Law
a11666e097
LibWeb: Simplify creation of background layers
...
We can deduplicate some code by using `assemble_coordinated_value_list`,
also moves this to a method in `ComputedProperties` to be in line with
other values
2025-12-08 11:46:50 +00:00
Callum Law
540b26e426
LibWeb: Remove unnecessary parse_overflow_value method
...
This is handled by the generic logic for parsing positional value list
shorthands once we register the legacy value alias of `overlay>auto` on
the shorthand as well as longhand properties.
2025-12-08 11:41:13 +00:00
Callum Law
953f9775a4
LibWeb: Mark animation-* properties as list-valued
2025-12-02 12:47:10 +00:00
Callum Law
758432c1cd
LibWeb: Don't mark mask-type as list-valued
...
This is distinct from the other `mask-*` properties and is not a
longhand of `mask`, and is thus not a coordinating value list longhand
2025-12-02 12:14:27 +00:00
Sam Atkins
cdc81e8921
LibWeb/CSS: Add -moz-appearance property alias
2025-12-01 11:10:13 +00:00
Callum Law
c8d91c127e
LibWeb: Parse view() for the animation-timeline CSS property
2025-11-28 13:24:11 +00:00
Callum Law
7d70714eac
LibWeb: Parse scroll() for the animation-timeline CSS property
2025-11-28 13:24:11 +00:00
Callum Law
5bbcd0a48f
LibWeb: Parse the animation-timeline CSS property
2025-11-28 13:24:11 +00:00
Callum Law
6bb7224f4e
LibWeb: Parse the view-timeline shorthand CSS property
...
The remaining failing tests in view-timeline-shorthand.html are due to
either:
a) incorrect tests, see web-platform-tests/wpt#56181 or;
b) a wider issue where we collapse coordinating value list longhand
properties to a single value when we shouldn't.
2025-11-28 13:24:11 +00:00
Callum Law
e093c76eea
LibWeb: Parse the view-timeline-inset CSS property
2025-11-28 13:24:11 +00:00
Callum Law
21ff35691a
LibWeb: Parse the view-timeline-axis CSS property
2025-11-28 13:24:11 +00:00
Callum Law
d9d3e66197
LibWeb: Parse the view-timeline-name CSS property
2025-11-28 13:24:11 +00:00
Callum Law
13ce2d1857
LibWeb: Parse the scroll-timeline shorthand CSS property
...
The remaining failing tests in scroll-timeline-shorthand.html are due to
either:
a) incorrect tests, see web-platform-tests/wpt#56181 or;
b) a wider issue where we collapse coordinating value list longhand
properties to a single value when we shouldn't.
2025-11-28 13:24:11 +00:00
Callum Law
992b0a4dc6
LibWeb: Parse the scroll-timeline-axis CSS property
2025-11-28 13:24:11 +00:00
Callum Law
e95f326f3d
LibWeb: Parse the scroll-timeline-name CSS property
2025-11-28 13:24:11 +00:00
Psychpsyo
2db3796fd3
LibWeb: Implement CSS perspective-origin
2025-11-21 11:14:28 +00:00
Sam Atkins
c4b9e7eadf
LibWeb: Parse and propagate extended text-indent property values
...
CSS Text 3 gives `text-indent` a couple of optional keywords to control
which lines are affected. This commit parses them, but doesn't yet do
anything with them.
2025-11-20 16:02:40 +01:00
Sam Atkins
44326c4d7f
LibWeb/CSS: Define value ranges for grid properties
...
Grid track sizes cannot be negative.
2025-11-19 23:45:52 +00:00
Psychpsyo
e064fa19d2
LibWeb: Add transform-style and have it make a stacking context
2025-11-12 15:47:36 +01:00
Psychpsyo
eb21ea890c
LibWeb: Implement CSS perspective property
2025-11-12 00:41:14 +01:00
Sam Atkins
7292714592
LibWeb/CSS: Mark cursor as not a list-valued property
...
This is apparently supposed to always be treated as a single composite
value, for Typed OM at least.
2025-11-06 10:34:48 +00:00
Sam Atkins
d739c8c22a
LibWeb/CSS: Mark transform as not a list-valued property
...
The different transform functions together form a single transform, so
this isn't a list.
2025-11-03 10:21:51 -08:00
Sam Atkins
01417d1e53
LibWeb/CSS: Stop stripping whitespace from remaining properties
2025-11-03 11:23:21 +00:00
Sam Atkins
4286a2c154
LibWeb/CSS: Handle whitespace properly in quotes property
2025-11-03 11:23:21 +00:00
Sam Atkins
b12851427b
LibWeb/CSS: Handle whitespace properly in transformation properties
...
We can no longer rely on the remaining token count, so these required
significant rearranging.
2025-11-03 11:23:21 +00:00
Sam Atkins
3341a526a3
LibWeb/CSS: Stop stripping whitespace from display property
2025-11-03 11:23:21 +00:00
Sam Atkins
fd40df12e8
LibWeb/CSS: Stop stripping whitespace from cursor property
2025-11-03 11:23:21 +00:00
Sam Atkins
ed55d968e8
LibWeb/CSS: Stop stripping whitespace from opacity properties
2025-11-03 11:23:21 +00:00
Sam Atkins
12588b6f9d
LibWeb/CSS: Handle whitespace properly in content property
2025-11-03 11:23:21 +00:00
Sam Atkins
676a343525
LibWeb/CSS: Stop stripping whitespace from clip properties
2025-11-03 11:23:21 +00:00
Sam Atkins
3bde5b4e68
LibWeb/CSS: Stop stripping whitespace from transition properties
2025-11-03 11:23:21 +00:00
Sam Atkins
b2ef053be9
LibWeb/CSS: Stop stripping whitespace from text properties
2025-11-03 11:23:21 +00:00
Sam Atkins
b3e53b0bd2
LibWeb/CSS: Stop stripping whitespace from stroke properties
2025-11-03 11:23:21 +00:00
Sam Atkins
fccddca498
LibWeb/CSS: Stop stripping whitespace from shape properties
2025-11-03 11:23:21 +00:00
Sam Atkins
971c0d0126
LibWeb/CSS: Handle whitespace properly for scrollbar properties
...
Imported a WPT test that regressed without these changes.
2025-11-03 11:23:21 +00:00
Sam Atkins
60a46b86e4
LibWeb/CSS: Stop stripping whitespace from position-* properties
2025-11-03 11:23:21 +00:00
Sam Atkins
28422e80f2
LibWeb/CSS: Stop stripping whitespace from place-* properties
2025-11-03 11:23:21 +00:00
Sam Atkins
4f5126e52f
LibWeb/CSS: Handle whitespace properly in list-style properties
2025-11-03 11:23:21 +00:00
Sam Atkins
8c8168c65c
LibWeb/CSS: Handle whitespace properly in grid properties
2025-11-03 11:23:21 +00:00
Sam Atkins
049cc09ae4
LibWeb/CSS: Stop stripping whitespace from flex properties
2025-11-03 11:23:21 +00:00
Sam Atkins
123a3dbbc5
LibWeb/CSS: Handle whitespace properly in mask properties
2025-11-03 11:23:21 +00:00