Commit graph

6 commits

Author SHA1 Message Date
Callum Law
33cf3d7782 LibWeb: Serialize RGB, HWB and HSL colors with unresolved components
Gains us 44 WPT passes.
2025-07-16 13:05:33 +01:00
Callum Law
6a9c8d7767 LibWeb: Don't resolve colors with unresolved components
`CSSColorValue`s which have unresolved `calc` components should be able
to be resolved. Previously we would always resolve them but with
incorrect values.

This is useful as we will now be able to now whether we should serialize
colors in their normalized form or not.

Slight regression in that we now serialize (RGB, HSL and HWB) colors
with components that rely on compute-time information as an empty
string, but that will be fixed in the next commit.
2025-07-16 13:05:33 +01:00
Callum Law
62d138ebf7 LibWeb: Allow passing a resolution context to CSSStyleValue::to_color
This will be used for resolving any calculated style values within the
various `CSSColorValue` sub-classes.

No functionality changes.
2025-07-04 13:18:55 +01:00
Timothy Flynn
85b424464a AK+Everywhere: Rename verify_cast to as
Follow-up to fc20e61e72.
2025-01-21 11:34:06 -05:00
Andreas Kling
e85c3c97fb LibWeb: Add mode flag to CSSStyleValue::to_string()
This will be used to differentiate between serialization for resolved
style (i.e window.getComputedStyle()) and serialization for all other
purposes.
2024-12-07 08:31:03 +00:00
Timothy Flynn
93712b24bf Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Renamed from Userland/Libraries/LibWeb/CSS/StyleValues/CSSHSL.cpp (Browse further)