LibWeb: Use existing StyleValues for math-depth

Previously we implemented an all encompassing `MathDepthStyleValue`
specifically for the `math-depth` property, this was unnecessary since
we can represent `auto-add` and `<integer>` using existing `StyleValue`
classes.

This brings the values created from parsing in line with those set via
`StylePropertyMap` which allows us to simplify computation
This commit is contained in:
Callum Law
2026-01-03 14:06:43 +13:00
committed by Sam Atkins
parent 40d217bde2
commit eb5b73d3b5
Notes: github-actions[bot] 2026-01-15 12:04:30 +00:00
12 changed files with 80 additions and 141 deletions

View File

@@ -0,0 +1,19 @@
/*
* Copyright (c) 2023, Sam Atkins <atkinssj@serenityos.org>
* Copyright (c) 2026, Callum Law <callumlaw1709@outlook.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include "AddFunctionStyleValue.h"
namespace Web::CSS {
void AddFunctionStyleValue::serialize(StringBuilder& builder, SerializationMode mode) const
{
builder.append("add("sv);
m_value->serialize(builder, mode);
builder.append(')');
}
}