Commit graph

7 commits

Author SHA1 Message Date
Shannon Booth
09f2db7aa9 LibWeb/CSS: Add various CSSMathXXX constructor helpers
The exact same two steps are repeated for all of these in
CSSNumericValue. These steps are complicated enough that it makes
sense to factor them out into some helpers.
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
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
Sam Atkins
e17052a343 LibWeb/CSS: Implement CSSMathSum 2025-08-29 11:57:10 +02:00