Sam Atkins
1bcc489310
LibWeb/CSS: Subdivide into iterations when reading from StylePropertyMap
2025-11-06 10:34:48 +00: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
Timothy Flynn
ac246caa0c
LibWeb: Remove now-unused Resource and ResourceClient
...
And deal with the fallout of transitive includes.
2025-11-05 18:27:36 +01:00
Jelle Raaijmakers
f9b4fa9702
LibWeb: Add CSS::Size::is_intrinsic_sizing_constraint()
2025-11-05 12:01:40 +01:00
Tim Ledbetter
8d81421526
LibWeb: Cache font matching algorithm results
...
The majority of time in `compute_font()` was spent in
`font_matching_algorithm()` repeatedly computing the same values. We
now cache these values to avoid unnecessary work.
2025-11-05 09:12:02 +01:00
Andreas Kling
213e20c97b
LibWeb: Use new DecodedImageData::paint() API in ImageStyleValue
2025-11-05 09:11:49 +01:00
norbiros
d8e80718d7
LibWeb/CSS: Absolutize values while computing font variation settings
...
Makes the `compute_font_variation_settings` function match other
`compute_font_*` by absolutizing values passed into them. It resolves a
crash related to using `siblings-count` inside `font-variation-settings`
Co-authored-by: Sam Atkins <sam@ladybird.org>
2025-11-04 21:44:32 +01:00
norbiros
3829a85fde
LibWeb: Add basic variable font support
...
Integrates the new `FontVariationSettings` from LibGfx into LibWeb to
enable initial variable font functionality. Currently, only the `wght`
(weight) axis is fully supported and tested. This update also introduces
support for the CSS `font-variation-settings` property.
2025-11-04 21:44:32 +01:00
Sam Atkins
e026c98d64
LibWeb/CSS: Insert required comments when serializing lists of tokens
...
Certain pairs of tokens are required to have `/**/` inserted between
them to prevent eg two `<ident>`s getting merged together when
round-tripping.
2025-11-04 14:05:31 +01:00
Sam Atkins
7d96fbaf7a
LibWeb/CSS: Parse list values as lists in CSSStyleValue parsing
2025-11-03 10:21:51 -08:00
Sam Atkins
07d77e89dd
LibWeb/CSS: Implement "subdivide into iterations" for basic StyleValues
...
This algorithm is used by Typed-OM for producing a list of internal
style values from a single one, for properties that take a list. We
will probably need to implement this for more StyleValues later.
2025-11-03 10:21:51 -08: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
61a0898f5f
LibWeb/CSS: Stop inserting whitespace when serializing component values
...
Now that we don't remove whitespace when parsing, we don't need to
artificially insert it back in again when serializing. We do now need
to trim leading and trailing whitespace from UnresolvedStyleValues, as
this previously was done as part of the whitespace insertion.
This makes our serialization of UnresolvedStyleValues more correct and
gets us a few WPT passes for each property in the Typed OM tests.
2025-11-03 11:23:21 +00:00
Sam Atkins
427d7fabd7
LibWeb/CSS: Stop copying the input in parse_css_value()
...
Now that we don't strip out whitespace, this method was copying the
input TokenStream into a Vector, and then creating new TokenStreams
from that. So, stop doing that and use the input TokenStream instead.
2025-11-03 11:23:21 +00:00
Sam Atkins
2bbf578737
LibWeb/CSS: Commit transaction when parsing valid anchor()
...
I'm honestly not sure how this worked before.
2025-11-03 11:23:21 +00:00
Sam Atkins
1b1bb3b897
LibWeb/CSS: Remove "strip-whitespace" flag from Properties.json
...
Now that it's not on any properties, remove support for it entirely.
2025-11-03 11:23:21 +00: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
Sam Atkins
fd682386b8
LibWeb/CSS: Stop stripping whitespace from margin properties
2025-11-03 11:23:21 +00:00
Sam Atkins
d5a0838521
LibWeb/CSS: Stop stripping whitespace from padding properties
2025-11-03 11:23:21 +00:00
Sam Atkins
826eb067c0
LibWeb/CSS: Stop stripping whitespace from overflow properties
2025-11-03 11:23:21 +00:00
Sam Atkins
c4b76d7a49
LibWeb/CSS: Stop stripping whitespace for outline properties
2025-11-03 11:23:21 +00:00
Sam Atkins
85b87378bd
LibWeb/CSS: Stop stripping whitespace for size properties
2025-11-03 11:23:21 +00:00
Sam Atkins
eda72541b8
LibWeb/CSS: Stop stripping whitespace for inset properties
2025-11-03 11:23:21 +00:00
Sam Atkins
34e3df1769
LibWeb/CSS: Stop stripping whitespace for SVG geometry properties
2025-11-03 11:23:21 +00:00
Sam Atkins
941ad24abd
LibWeb/CSS: Handle whitespace properly in column properties
2025-11-03 11:23:21 +00:00
Sam Atkins
ee13de8426
LibWeb/CSS: Stop stripping whitespace for filter properties
2025-11-03 11:23:21 +00:00
Sam Atkins
cb3773755a
LibWeb/CSS: Handle whitespace properly in font properties
2025-11-03 11:23:21 +00:00
Sam Atkins
372ae7c697
LibWeb/CSS: Reformat anchor-size() allowed properties, one per line
...
Having them grouped as they were is nice, but clang-format 21 really
hates these having multiple values per line.
2025-11-03 11:23:21 +00:00
Sam Atkins
39e0d06987
LibWeb/CSS: Discard whitespace at the start of simple parsing functions
2025-11-03 11:23:21 +00:00
Sam Atkins
003d9e4b49
LibWeb/CSS: Stop stripping whitespace for counter properties
2025-11-03 11:23:21 +00:00
Sam Atkins
17bbf238ed
LibWeb/CSS: Stop stripping whitespace for corner-shape properties
2025-11-03 11:23:21 +00:00
Sam Atkins
a348f919be
LibWeb/CSS: Handle whitespace properly for shadow properties
2025-11-03 11:23:21 +00:00