Commit graph

8 commits

Author SHA1 Message Date
Andreas Kling
26b0801a78 LibWeb: Return Utf16String from CSS Typed OM serialization
Make CSS Typed OM to_string() implementations produce Utf16String
instead of building UTF-8 strings and converting at the JS binding
boundary. Use Utf16StringBuilder for numeric, math, and transform
serialization paths that already feed CSS Typed OM stringification.

Keep the older CSSOM StyleValue serializer on StringBuilder for now, and
convert only where Typed OM source values or parser re-entry still need
the existing UTF-8 representation.
2026-06-22 16:10:40 +02:00
Shannon Booth
3cb428e76d LibWeb/CSS: Remove uneeded ExceptionOr use in CSSMath{Invert,Negate} 2026-01-12 11:51:15 +00:00
Tim Ledbetter
89a391198e LibWeb: Avoid intermediate string allocations in typed om serialization 2026-01-09 17:14:20 +00:00
Sam Atkins
078bc1a471 LibWeb/CSS: Allow converting CSSMathValues to StyleValues
Because we store calculations as a tree of CalculationNodes inside a
CalculatedStyleValue, instead of a tree of StyleValues directly, this
implements a create_calculation_node() method on CSSNumericValue.
CSSMathValue::create_an_internal_representation() then calls
create_calculation_node() on itself, and wraps it in a
CalculatedStyleValue.

Lots of WPT passes again! Some regressions, which are expected: `cursor`
fails a test for the same reason it fails other that set it to some
kind of numeric value: We don't distinguish between "can contain a
number" and "can accept a number by itself". This will affect any
similar properties, but overall this is a big improvement.
2025-10-13 09:59:38 +01:00
Sam Atkins
80abffd2e8 LibWeb/CSS: Implement "Create a sum value" 2025-09-12 13:45:41 +02:00
Sam Atkins
59c4076066 LibWeb/CSS: Mark CSSStyleValue classes final where possible 2025-09-12 13:45:41 +02:00
Sam Atkins
7be645a091 LibWeb/CSS: Implement CSSNumericType.equals() 2025-08-29 11:57:10 +02:00
Sam Atkins
f2ec04d20d LibWeb/CSS: Implement CSSMathNegate 2025-08-29 11:57:10 +02:00