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
Sam Atkins
c5fa5fb80e
LibWeb/CSS: Handle whitespace properly for border-image properties
2025-11-03 11:23:21 +00:00
Sam Atkins
a2cd5d5ec8
LibWeb/CSS: Handle whitespace properly for border-radius properties
2025-11-03 11:23:21 +00:00
Sam Atkins
d44c3a0b34
LibWeb/CSS: Stop stripping whitespace for basic border properties
...
That is, excluding border-image and border-radius properties.
2025-11-03 11:23:21 +00:00
Sam Atkins
e3332dc5c6
LibWeb/CSS: Handle whitespace properly for background properties
2025-11-03 11:23:21 +00:00
Sam Atkins
d2e4f113a2
LibWeb/CSS: Stop stripping whitespace for animation properties
2025-11-03 11:23:21 +00:00
Sam Atkins
821bf4a289
LibWeb/CSS: Discard whitespace when parsing comma-separated lists
2025-11-03 11:23:21 +00:00
Sam Atkins
9dc9e98d14
LibWeb/CSS: Skip whitespace before and after property values
...
To make this a bit easier, we now wrap the per-property parsing
functions in a parse_all_as() lambda, which skips whitespace, and
returns an error if parsing failed or there are trailing tokens.
2025-11-03 11:23:21 +00:00
Sam Atkins
4fffbf9ba1
LibWeb/CSS: Stop stripping whitespace for simple keyword properties
...
This is, I believe, all properties that take a single keyword, either
listed literally or using an Enums.json definition.
2025-11-03 11:23:21 +00:00
Sam Atkins
926f5285df
LibWeb/CSS: Stop stripping whitespace for all
2025-11-03 11:23:21 +00:00
Sam Atkins
9463526277
LibWeb/CSS: Stop stripping whitespace for align/justify properties
2025-11-03 11:23:21 +00:00
Sam Atkins
f73f7c8209
LibWeb/CSS: Stop stripping whitespace for basic color properties
2025-11-03 11:23:21 +00:00
Sam Atkins
6d38ad32cb
LibWeb/CSS: Let Properties.json specify whether to strip whitespace
...
Removing all whitespace before parsing StyleValues seemed like a good
idea back when I did it, but causes issues. Serialization cares about
whether there was whitespace or not, and we also weren't removing
whitespace from inside blocks and functions so it was inconsistent
whether we needed to deal with whitespace or not.
So currently, some parsing code is conscious of whitespace, some isn't,
and some tries to be but is incorrect. Rather than try to fix all of
this in a single large, messy change, this commit introduces
a "strip-whitespace" flag to Properties.json. We can then disable
whitespace-stripping a few properties at a time and debug any issues
more easily. Eventually (hopefully soon), this will go away entirely.
2025-11-03 11:23:21 +00:00
Marcos Del Sol Vives
abcc5bc16d
LibWeb: Support multiple emoji/symbol fonts
2025-11-03 09:56:25 +00:00
Callum Law
ef8dcb2a43
LibWeb: Remove unused code in compute_properties
2025-11-02 23:54:00 +01:00
Callum Law
a95cde3660
LibWeb: Separate CSSAnimation::animationName from Animation::id
2025-11-02 23:54:00 +01:00
Callum Law
2447b8a759
LibWeb: Ignore non-animatable properties in keyframes
...
Gains us 21 WPT tests
2025-11-02 23:54:00 +01:00
Callum Law
ed0b741a26
LibWeb: Remove special handling of all property for animations
...
There were a couple places that we had special handling for the `all`
property but since d31a58a was merged we can treat it the same as any
other shorthand
2025-11-02 23:54:00 +01:00
Callum Law
56e2ac8a9d
LibWeb: Always do parent document layout updates before updating style
...
We were doing this manually within `Document::update_layout()` and
`CSSStyleProperties::get_direct_property()` but we should do it for all
callers of `Document::update_style()`
2025-11-02 23:54:00 +01:00
Lorenz A
f54793315c
LibWeb: Adjust buttons computed display style
2025-11-01 13:02:44 +00:00
Callum Law
c2ca712406
LibWeb: Properly simplify sum nodes containing negated sum nodes
...
This is ad-hoc, see https://github.com/w3c/csswg-drafts/issues/13020
Gains us 5 WPT tests
2025-10-30 12:18:24 +00:00
Sam Atkins
9c06d58b2e
LibWeb/CSS: Implement and use ValueType::DashedIdent
...
Reduces the repeated code for parsing these, and makes them available to
the generic value parser.
2025-10-30 11:33:45 +00:00
InvalidUsernameException
35254d17d1
LibWeb/CSS: Do not crash when parsing some multi-layer mask shorthands
...
This fixes a silly bug where we would crash when parsing a multi-layer
mask shorthand property that contained the no-clip keyword but no value
for mask-origin.
Fixes a crash when parsing the CSS of https://www.browserbase.com/ . The
site still has other, unrelated problems though.
2025-10-28 23:50:46 -07:00
Lorenz A
14dba82202
LibWeb: Allow whitespace in not after a boolean-expr-group
2025-10-28 21:54:48 -07:00
Callum Law
5381146e85
LibWeb: Include PropertyID.h in fewer header files
...
This reduces the size of the recompile when PropertyID.h is modified
from ~1500 to ~125
2025-10-27 14:50:54 +00:00
Callum Law
12716dccf0
LibWeb: Avoid including ComputedProperties.h in Element.h
...
This reduces the size of the recompile when ComputedProperties.h is
modified from ~1200 to ~70
2025-10-27 14:50:54 +00:00
Callum Law
76dadd45d6
LibWeb: Favour !important property values over animated values
2025-10-27 09:51:50 +00:00
Callum Law
c8f345356e
LibWeb: Maintain property importance into ComputedProperties
...
Previously we wouldn't propagate this from CascadedProperties to
ComputedProperties
2025-10-27 09:51:50 +00:00
Callum Law
823dd11b67
LibWeb: Add ComputedProperties::set_property_without_modifying_flags
...
There are a few places in style computation where we want to update the
value of a property without modifying the inherited or important flags.
Previously we would look up these flags and pass them to the normal
`set_property` method but this is unnecessary and was easy to forget to
do.
2025-10-27 09:51:50 +00:00
Callum Law
84762021b8
LibWeb: Support triggering multiple animations per animation property
...
We also now use the computed (rather than cascaded) values when
triggering animations.
2025-10-27 09:48:25 +00:00
Callum Law
18477b0d84
LibWeb: Promote animation-composition values to enum
...
This brings us in line with the other `animation-*` enum properties
(`animation-play-state` and `animation-fill-mode`)
2025-10-27 09:48:25 +00:00
Tim Ledbetter
ebd802f6fc
LibWeb+LibGfx: Move CSS sRGB color serialization function to LibGfx
2025-10-26 18:55:22 +01:00
Lorenz A
fb258639d1
LibWeb: CSS selector read-write honor is_allowed_to_be_readonly
2025-10-24 19:15:58 +01:00
Tim Ledbetter
5294559f7b
LibWeb: Use logical properties in UA stylesheet
2025-10-24 10:11:49 +01:00
Andreas Kling
a056b26e56
LibWeb: Don't create identical StyleValueList if absolutization is no-op
...
This case is actually incredibly common, and this ends up reducing the
memory footprint on https://gymgrossisten.com/ by 2.07 MiB.
2025-10-24 08:52:53 +02:00
Callum Law
8417d74328
LibWeb: Parse transition property as a coordinating list shorthand
...
We don't need all this specific logic for parsing the `transition`
property - we also now maintain `none` as such until use time which
gains us a couple extra tests
2025-10-23 10:09:11 +01:00
Callum Law
94c788f2e0
LibWeb: Make animation parsing logic reusable
...
This is useful for parsing of other coordinating list shorthands
2025-10-23 10:09:11 +01:00