LibWeb/CSS: Implement CSSNumericValue.to()

Tries to convert the CSSNumericValue to a CSSUnitValue with the given
unit.

This gets us the remaining 11 WPT subtests for this method.
This commit is contained in:
Sam Atkins 2025-09-11 17:00:26 +01:00 committed by Jelle Raaijmakers
parent 80abffd2e8
commit a139ad1c44
Notes: github-actions[bot] 2025-09-12 11:46:37 +00:00
6 changed files with 73 additions and 14 deletions

View file

@ -52,6 +52,8 @@ public:
bool equals_for_bindings(Vector<CSSNumberish>) const;
virtual bool is_equal_numeric_value(GC::Ref<CSSNumericValue> other) const = 0;
WebIDL::ExceptionOr<GC::Ref<CSSUnitValue>> to(FlyString const& unit) const;
virtual Optional<SumValue> create_a_sum_value() const = 0;
CSSNumericType type_for_bindings() const;