mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 11:20:03 +00: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:
committed by
Andreas Kling
parent
34f78ca152
commit
69a0f28d04
@@ -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();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user