Commit graph

4 commits

Author SHA1 Message Date
Sam Atkins
84f0f37a29 LibWeb/CSS: Implement StylePropertyMap::set()
With this commit, only direct CSSStyleValues created from internal
StyleValues can be converted back to a StyleValue. More subtests will
pass as create_an_internal_representation() is implemented for the
various CSSStyleValue subclasses. :^)

Gets us... a LOT of WPT passes, because there's a ton of coverage for
each property.
2025-10-04 22:57:00 +02:00
Sam Atkins
2f3053bc64 LibWeb/CSS: Use FlyString for StylePropertyMap property arguments
The bindings are able to give us FlyString, and that's the type we use
for property names, so let's use that instead of String.
2025-10-04 22:57:00 +02:00
Sam Atkins
b80930ae34 LibWeb/CSS: Connect up StylePropertyMaps to their source
After looking into this more, the `[[declarations]]` slot does not seem
to need to be a literal map of property names and values. Instead, it
can just point at the source (an element or style declaration), and
then direct all read or write operations to that.

This means the `has()` and `delete()` methods actually work now.

A few remaining failures in these tests are because of:
- StylePropertyMap[ReadOnly]s not being iterable yet
- We're not populating an element's custom properties map, which get
  fixed whenever someone gets around to producing proper computed
  values of them.
2025-08-18 10:12:53 +01:00
Sam Atkins
3bb54ffd59 LibWeb/CSS: Stub out StylePropertyMap 2025-08-13 09:47:50 +01:00