From 2512a934d687b749529318542284d30635cb5870 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Thu, 13 Nov 2025 14:42:21 +0000 Subject: [PATCH] LibWeb/MathML: Combine mspace height and depth when both are valid --- Libraries/LibWeb/MathML/MathMLMspaceElement.cpp | 3 ++- Tests/LibWeb/Text/expected/MathML/presentational_hints.txt | 4 ++++ Tests/LibWeb/Text/input/MathML/presentational_hints.html | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Libraries/LibWeb/MathML/MathMLMspaceElement.cpp b/Libraries/LibWeb/MathML/MathMLMspaceElement.cpp index e8f9c3ee7fa..ab7cc2cd2fb 100644 --- a/Libraries/LibWeb/MathML/MathMLMspaceElement.cpp +++ b/Libraries/LibWeb/MathML/MathMLMspaceElement.cpp @@ -60,7 +60,8 @@ void MathMLMspaceElement::apply_presentational_hints(GC::Refset_property_from_presentational_hint(CSS::PropertyID::Height, parse_css_type(parsing_params, height_string, CSS::ValueType::Length).release_nonnull()); } else if (height_value) { cascaded_properties->set_property_from_presentational_hint(CSS::PropertyID::Height, height_value.release_nonnull()); } else if (depth_value) { diff --git a/Tests/LibWeb/Text/expected/MathML/presentational_hints.txt b/Tests/LibWeb/Text/expected/MathML/presentational_hints.txt index 4a3787a3cc2..9f158b7a6ce 100644 --- a/Tests/LibWeb/Text/expected/MathML/presentational_hints.txt +++ b/Tests/LibWeb/Text/expected/MathML/presentational_hints.txt @@ -28,3 +28,7 @@ height: 32px height: 30px height: auto height: 48px +height: 20px +height: 30px +height: 50px +height: 56px diff --git a/Tests/LibWeb/Text/input/MathML/presentational_hints.html b/Tests/LibWeb/Text/input/MathML/presentational_hints.html index 11ea9377ee6..96c4d8ce481 100644 --- a/Tests/LibWeb/Text/input/MathML/presentational_hints.html +++ b/Tests/LibWeb/Text/input/MathML/presentational_hints.html @@ -49,6 +49,10 @@ + + + +