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
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

@ -619,8 +619,8 @@ GC::Ptr<CSSFontFaceRule> Parser::convert_to_font_face_rule(AtRule const& rule)
// TODO: Once we implement calc-simplification in the parser, we should no longer see math values here,
// unless they're impossible to resolve and thus invalid.
if (percentage_value->is_math()) {
if (auto result = percentage_value->as_math().resolve_percentage(); result.has_value())
if (percentage_value->is_calculated()) {
if (auto result = percentage_value->as_calculated().resolve_percentage(); result.has_value())
return result.value();
}
@ -734,8 +734,8 @@ GC::Ptr<CSSFontFaceRule> Parser::convert_to_font_face_rule(AtRule const& rule)
auto const& setting_value = feature_tag->as_open_type_tagged().value();
if (setting_value->is_integer()) {
settings.set(feature_tag->as_open_type_tagged().tag(), setting_value->as_integer().integer());
} else if (setting_value->is_math() && setting_value->as_math().resolves_to_number()) {
if (auto integer = setting_value->as_math().resolve_integer(); integer.has_value()) {
} else if (setting_value->is_calculated() && setting_value->as_calculated().resolves_to_number()) {
if (auto integer = setting_value->as_calculated().resolve_integer(); integer.has_value()) {
settings.set(feature_tag->as_open_type_tagged().tag(), *integer);
} else {
dbgln_if(CSS_PARSER_DEBUG, "CSSParser: Calculated value in font-feature-settings descriptor cannot be resolved at parse time; skipping");
@ -808,8 +808,8 @@ GC::Ptr<CSSFontFaceRule> Parser::convert_to_font_face_rule(AtRule const& rule)
auto const& setting_value = variation_tag->as_open_type_tagged().value();
if (setting_value->is_number()) {
settings.set(variation_tag->as_open_type_tagged().tag(), setting_value->as_number().number());
} else if (setting_value->is_math() && setting_value->as_math().resolves_to_number()) {
if (auto number = setting_value->as_math().resolve_number(); number.has_value()) {
} else if (setting_value->is_calculated() && setting_value->as_calculated().resolves_to_number()) {
if (auto number = setting_value->as_calculated().resolve_number(); number.has_value()) {
settings.set(variation_tag->as_open_type_tagged().tag(), *number);
} else {
dbgln_if(CSS_PARSER_DEBUG, "CSSParser: Calculated value in font-variation-settings descriptor cannot be resolved at parse time; skipping");