1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 10:01:13 +09:00

Revert "LibWeb/CSS: Rename CalculatedStyleValue -> CSSMathValue"

This reverts commit 76daba3069.

We're going to need separate types for the JS-exposed style values, so
it doesn't make sense for us to match their names with our internal
types.
This commit is contained in:
Sam Atkins 2024-12-11 15:05:56 +00:00 committed by Andreas Kling
parent 34f78ca152
commit 69a0f28d04
Notes: github-actions[bot] 2024-12-21 17:15:55 +00:00
37 changed files with 391 additions and 391 deletions

View file

@ -1987,11 +1987,11 @@ RefPtr<Gfx::FontCascadeList const> StyleComputer::compute_font_for_style_values(
} else if (font_size.is_length()) {
maybe_length = font_size.as_length().length();
} else if (font_size.is_math()) {
if (font_size.as_math().contains_percentage()) {
maybe_length = font_size.as_math().resolve_length_percentage(length_resolution_context, Length::make_px(parent_font_size()));
} else if (font_size.is_calculated()) {
if (font_size.as_calculated().contains_percentage()) {
maybe_length = font_size.as_calculated().resolve_length_percentage(length_resolution_context, Length::make_px(parent_font_size()));
} else {
maybe_length = font_size.as_math().resolve_length(length_resolution_context);
maybe_length = font_size.as_calculated().resolve_length(length_resolution_context);
}
}
if (maybe_length.has_value()) {
@ -2910,8 +2910,8 @@ void StyleComputer::compute_math_depth(StyleProperties& style, DOM::Element cons
auto resolve_integer = [&](CSSStyleValue const& integer_value) {
if (integer_value.is_integer())
return integer_value.as_integer().integer();
if (integer_value.is_math())
return integer_value.as_math().resolve_integer().value();
if (integer_value.is_calculated())
return integer_value.as_calculated().resolve_integer().value();
VERIFY_NOT_REACHED();
};