Callum Law
a287df4620
LibWeb: Improve formatting of font-variant grammar comment
...
Fix indentation and wrapping to clearly show grouped components
2026-02-20 22:01:44 +00:00
Callum Law
f0434655f9
LibWeb: Reduce recompilation from editing Enums.json
...
Reduces the recompilation caused by editing `Enums.json` from ~1528 to
~327
2026-02-19 11:27:06 +00:00
Callum Law
6d73a3e85f
LibWeb: Parse @font-feature-values at-rule
...
We don't yet support the `font-display` descriptor as part of this
2026-02-17 12:25:27 +00:00
Callum Law
784911fb6d
LibWeb: Implement CSSFontFeatureValuesRule
2026-02-17 12:25:27 +00:00
Callum Law
9f7f623455
LibWeb: Store FilterOperation::DropShadow sub-values as StyleValues
...
This simplifies handling and brings it into line with other `StyleValue`
types
2026-02-16 12:09:23 +00:00
Callum Law
98e62cf86a
LibWeb: Store FilterOperation::Blur::radius as StyleValue
...
This simplifies handling and brings it into line with other `StyleValue`
types
2026-02-16 12:09:23 +00:00
Callum Law
caa5705edf
LibWeb: Clamp blur() calculated values
2026-02-16 12:09:23 +00:00
Callum Law
c529614e67
LibWeb: Store FilterOperation::HueRotate::angle as StyleValue
...
This simplifies handling and brings it into line with other `StyleValue`
types
2026-02-16 12:09:23 +00:00
Callum Law
68c596942c
LibWeb: Store FilterOperation::Color::amount as StyleValue
...
This simplifies handling and means we now support tree counting
functions.
2026-02-16 12:09:23 +00:00
Callum Law
2c4db0da7e
LibWeb: Clamp calculated filter color() amounts by context
...
This brings us in line with other properties/values and simplifies
handling of non-calculated values
2026-02-16 12:09:23 +00:00
Psychpsyo
a7267f711b
LibWeb: Add overflow-clip-margin-* properties
...
The corner radius isn't quite right yet, but this gives us
another couple WPT passes for these.
2026-02-14 22:58:21 +01:00
Luke Wilde
5e1493d4c0
LibWeb/CSS: Don't assume that we consumed a color space token
...
Fixes https://cockpit-project.org/ crashing on load.
2026-02-14 19:54:51 +00:00
Callum Law
8a82d116d6
LibWeb: Always parse <counter-style> as such
...
Previously we parsed it as `<custom-ident>` in `<counter>` and as a
keyword in `list-style-type`.
The practical effect of this is:
- Spec defined counter style names in `<counter>` are ASCII lowercased
on parse.
- Non spec defined counter style names are allowed in `list-style-type.
We are still to parse the `symbols()` function but this gives us a
better base for that.
2026-02-12 10:33:09 +00:00
Callum Law
b0274268f8
LibWeb: Support calculated values in @counter-style range descriptor
...
Calculated values are resolved and confirmed to be valid (in line with
non-calculated values) at parse time
2026-02-12 01:26:52 +01:00
Callum Law
a541c09d61
LibWeb: Support calculated value in additive-symbols descriptor
...
Calculated weight values are resolved and verified to be in strictly
decreasing order (as with non-calculated values) at parse time.
2026-02-12 01:26:52 +01:00
Callum Law
3783dd96a3
LibWeb: Support calculated value in @counter-style pad descriptor
2026-02-12 01:26:52 +01:00
Callum Law
046dfdd192
LibWeb: Parse CSS timeline-scope property
2026-02-11 11:27:16 +01:00
Tim Ledbetter
400a1332a6
LibWeb: Correctly parse the grid shorthand property
2026-02-09 17:36:12 +01:00
Tim Ledbetter
e863a04b12
LibWeb: Include grid-auto-* longhands in grid shorthand parsing
2026-02-09 17:36:12 +01:00
Sam Atkins
8975fd7d06
LibWeb/CSS: Stop parsing media-features without parentheses
...
Our parsing code was treating `foo` and `foo: bar` as `<media-feature>`s
when really they need to be `(foo)` and `(foo: bar)` respectively. This
previously worked for the valid case because boolean expressions can
also have arbitrary `()` blocks. However, it meant we'd also allow them
without the parentheses which isn't valid.
So instead, parse and serialize the parentheses as part of the
`<media-feature>`. This gets us some WPT passes and fixes an Acid3
failure.
2026-02-05 12:22:58 +01:00
Callum Law
11d524bda4
LibWeb: Support CSS font-optical-sizing property
2026-02-03 11:44:25 +00:00
Callum Law
2f90529438
LibWeb: Parse @counter-style speak-as descriptor
2026-02-03 09:58:47 +00:00
Callum Law
85d64a1215
LibWeb: Parse @counter-style additive-symbols descriptor
2026-02-03 09:58:47 +00:00
Callum Law
ecfdf252b8
LibWeb: Parse @counter-style symbols descriptor
2026-02-03 09:58:47 +00:00
Callum Law
1f8c9cf662
LibWeb: Parse @counter-style fallback descriptor
2026-02-03 09:58:47 +00:00
Callum Law
9b376240f9
LibWeb: Parse @counter-style pad descriptor
2026-02-03 09:58:47 +00:00
Callum Law
afca221d47
LibWeb: Parse @counter-style range descriptor
2026-02-03 09:58:47 +00:00
Callum Law
f1e8d54717
LibWeb: Parse @counter-style prefix and suffix descriptors
2026-02-03 09:58:47 +00:00
Callum Law
70c8d8746f
LibWeb: Parse @counter-style negative descriptor
2026-02-03 09:58:47 +00:00
Callum Law
f60bfd9e9e
LibWeb: Parse @counter-style system descriptor
2026-02-03 09:58:47 +00:00
Callum Law
703259a24c
LibWeb: Parse and serialize @counter-style rule
...
We don't yet parse or serialize any of the descriptors in the rule, just
the rule itself and the name
2026-02-03 09:58:47 +00:00
Jonathan Gamble
b8ee6ec476
LibWeb: Use SizeWithAspectRatio struct
2026-02-02 14:36:49 +00:00
Callum Law
afdde488c3
LibWeb: Correctly parse logical border-*-*-radius shorthands
...
Builds on #7609 by parsing these properties correctly in the first place
2026-01-25 10:22:10 +01:00
Tim Ledbetter
191e0e8c18
LibWeb: Support @-webkit-keyframes as an alias for @keyframes
...
This is listed as mandatory in the compat spec.
2026-01-25 09:33:24 +01:00
Callum Law
eb5b73d3b5
LibWeb: Use existing StyleValues for math-depth
...
Previously we implemented an all encompassing `MathDepthStyleValue`
specifically for the `math-depth` property, this was unnecessary since
we can represent `auto-add` and `<integer>` using existing `StyleValue`
classes.
This brings the values created from parsing in line with those set via
`StylePropertyMap` which allows us to simplify computation
2026-01-15 12:03:16 +00: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
1c1476f728
LibWeb: Don't compute font-feature-settings until compute-time
...
Previously we applied the computation logic (i.e. deduplication and
sorting of tags) at parse time
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
Sam Atkins
ade44c7ddb
LibWeb/CSS: Make color-interpolation-method optional in color-mix()
2026-01-09 19:11:59 +00:00
Sam Atkins
960558f30a
LibWeb: Register and unregister @property rules when added or removed
...
Previously, we registered `@property` rules during parsing, and treated
them the same as `CSS.registerProperty()` calls. This is not correct
for a couple of reasons: One, the spec wants us to distinguish between
those two sources of registered custom properties, with
`CSS.registerProperty()` calls taking precedence. Two, we never removed
the registered property when its `@property` was removed from the
document.
This commit deals with this by iterating active CSSPropertyRules to find
which ones currently apply, and storing those in a cache. This cache is
invalidated whenever the Document's style is invalidated, which happens
whenever a CSSRule is added or removed from the Document.
The attached test demonstrates this now working as it should.
2026-01-09 10:54:37 +00:00
Sam Atkins
02149a8032
LibWeb: Store registered custom properties as CustomPropertyRegistration
...
This brings us closer to the spec.
2026-01-09 10:54:37 +00:00
Jelle Raaijmakers
ae20ecf857
AK+Everywhere: Add Vector::contains(predicate) and use it
...
No functional changes.
2026-01-08 15:27:30 +00:00
Tim Ledbetter
584e0996c9
LibWeb: Store color as a StyleValue in FilterOperation::DropShadow
2026-01-06 12:13:13 +01:00
Callum Law
4f5bab7e5d
LibWeb: Support border radius in xywh() function
2026-01-06 10:50:06 +01:00
Callum Law
02a8d22a4e
LibWeb: Support border radius in rect() function
2026-01-06 10:50:06 +01:00
Callum Law
1b7567cc86
LibWeb: Support parsing of border radius in inset() function
...
Respecting this value during basic shape path resolution is yet to be
implemented
2026-01-06 10:50:06 +01:00
Callum Law
84c6fd5730
LibWeb: Make parsing of border-radius value reusable
...
This is also useful for `<basic-shape-rect>`
2026-01-06 10:50:06 +01:00
Callum Law
96a4e33eaf
LibWeb: Resolve circle()/ellipse() position keywords at parse time
2026-01-05 11:42:19 +00:00
Callum Law
41b2496d3e
LibWeb: Clamp <radial-size> calculated length percentages
...
The spec requires `<radial-size>` to be non-negative
2026-01-05 11:42:19 +00:00
Callum Law
64010c78ab
LibWeb: Store ColorStopListElement::transition_hint as a RefPtr
...
There's no need for us to wrap this in an optional struct.
2026-01-03 02:30:59 +01:00