Truly independent web browser
LibWeb: Lay out msqrt and mroot with a radical
Andreas Klingf079575e0fd6
diff --git a/Libraries/LibWeb/Rust/src/layout/math_formatting_context.rs b/Libraries/LibWeb/Rust/src/layout/math_formatting_context.rsindex 05d54cbee91..1237232633e 100644--- a/Libraries/LibWeb/Rust/src/layout/math_formatting_context.rs+++ b/Libraries/LibWeb/Rust/src/layout/math_formatting_context.rs@@ -866,27 +866,22 @@ impl<'pass> MathFormattingContext<'pass> {self.accents(root),),(MathLayoutKind::Mspace, _) => self.layout_space(&root_style),+ (MathLayoutKind::Mroot, 2) => {+ let radical = RadicalMetrics::new(&root_style, &constants);+ layout_root(&children[0], &children[1], &radical, &constants)+ }+ (MathLayoutKind::Msqrt, _) => {+ let radical = RadicalMetrics::new(&root_style, &constants);+ // NB: The children of <msqrt> are laid out in an anonymous <mrow> box.+ let base = self.layout_row_with_operator_spacing(&children, kind, true);+ layout_square_root(base, &radical)+ }_ => {// https://w3c.github.io/mathml-core/#layout-of-mrow// Set add-space to true if the box corresponds to a <math> element or is not an embellished operator;// and to false otherwise.let add_space = kind == MathLayoutKind::Math || self.core_operator(root).is_none();- let nodes: Vec<Node> = children.iter().map(|child| child.node).collect();- let first_and_last_non_space_like = if add_space {- self.first_and_last_non_space_like(&nodes, kind)- } else {- Option::None- };- let spacing: Vec<Option<(CssPixels, CssPixels)>> = (0..nodes.len())- .map(|index| {- add_space- .then(|| {- self.embellished_operator_spacing(&nodes, index, kind, first_and_last_non_space_like)- })- .flatten()- })- .collect();- layout_row(&children, &spacing)+ self.layout_row_with_operator_spacing(&children, kind, add_space)}};@@ -939,6 +934,28 @@ impl<'pass> MathFormattingContext<'pass> {self.content = content;}+ fn layout_row_with_operator_spacing(+ &self,+ children: &[Child],+ kind: MathLayoutKind,+ add_space: bool,+ ) -> MathContent {+ let nodes: Vec<Node> = children.iter().map(|child| child.node).collect();+ let first_and_last_non_space_like = if add_space {+ self.first_and_last_non_space_like(&nodes, kind)+ } else {+ Option::None+ };+ let spacing: Vec<Option<(CssPixels, CssPixels)>> = (0..nodes.len())+ .map(|index| {+ add_space+ .then(|| self.embellished_operator_spacing(&nodes, index, kind, first_and_last_non_space_like))+ .flatten()+ })+ .collect();+ layout_row(children, &spacing)+ }+/// Whether the accentunder and accent attributes of an <munder>, <mover> or <munderover> are a match to true.// https://w3c.github.io/mathml-core/#dfn-accentfn accents(&self, node: Node) -> (bool, bool) {@@ -1375,3 +1392,136 @@ fn layout_underover(positions,}}++/// The radical glyph of an <msqrt> or <mroot> and the radical parameters of its font.+// https://w3c.github.io/mathml-core/#radical-symbol+struct RadicalMetrics {+ glyph_advance: CssPixels,+ glyph_ascent: CssPixels,+ glyph_descent: CssPixels,+ gap: CssPixels,+ rule_thickness: CssPixels,+ extra_ascender: CssPixels,+}++impl RadicalMetrics {+ fn new(style: &StyleValues<'_>, constants: &MathConstants) -> Self {+ // The radical glyph is the glyph obtained as a result of running get a glyph corresponding to the U+221A+ // SQUARE ROOT character given dir.+ // FIXME: Stretch the radical glyph to the radical target size, and mirror it for dir rtl.+ const SQUARE_ROOT: u32 = 0x221A;+ let font = style.frozen_font_list().font_for_code_point(+ SQUARE_ROOT,+ libgfx_rust::font::emoji_presentation_for_code_point(SQUARE_ROOT, None),+ );+ let facts = font.facts();+ // The radical gap is given by RadicalVerticalGap if the math-style is compact and+ // RadicalDisplayStyleVerticalGap if the math-style is normal.+ // NB: radicalVerticalGap falls back to 1¼ × default rule thickness, radicalDisplayStyleVerticalGap to default+ // rule thickness + ¼ OS/2.sxHeight, and radicalRuleThickness and radicalExtraAscender to default rule+ // thickness.+ let gap = if style.math_style() == math_style::NORMAL {+ constants.default_rule_thickness + constants.x_height.scaled(0.25)+ } else {+ constants.default_rule_thickness.scaled(1.25)+ };+ Self {+ glyph_advance: CssPixels::nearest_value_for_f32(font.glyph_width(SQUARE_ROOT)),+ glyph_ascent: CssPixels::nearest_value_for_f32(facts.ascent),+ glyph_descent: CssPixels::nearest_value_for_f32(facts.descent),+ gap,+ rule_thickness: constants.default_rule_thickness,+ extra_ascender: constants.default_rule_thickness,+ }+ }+}++// https://w3c.github.io/mathml-core/#square-root+fn layout_square_root(base: MathContent, radical: &RadicalMetrics) -> MathContent {+ // The inline size of the math content is the sum of the advance width of the box metrics of the radical glyph+ // and of the inline size of the msqrt base's margin's box.+ let inline_size = radical.glyph_advance + base.inline_size;+ // The line-ascent of the math content is the maximum between:+ // - The line-ascent of the msqrt base's margin box.+ // - The sum of the ink line-ascent of the msqrt base, the radical gap, the RadicalRuleThickness and+ // RadicalExtraAscender.+ let ascent = base+ .ascent+ .max(base.ascent + radical.gap + radical.rule_thickness + radical.extra_ascender);+ // The line-descent of the math content is the maximum between:+ // - The line-descent of the msqrt base's margin box.+ // - The sum of the line-ascent and line-descent for the box metrics of the radical glyph and of the+ // RadicalExtraAscender, minus the line-ascent of the math content.+ let descent = base+ .descent+ .max(radical.glyph_ascent + radical.glyph_descent + radical.extra_ascender - ascent);+ // The inline offsets of the msqrt base and overbar are also the same and equal to the width of the box metrics of+ // the radical glyph.+ let positions = base+ .positions+ .into_iter()+ .map(|position| ChildPosition {+ line_left_offset: position.line_left_offset + radical.glyph_advance,+ ..position+ })+ .collect();+ MathContent {+ inline_size,+ ascent,+ descent,+ positions,+ }+}++// https://w3c.github.io/mathml-core/#root-with-index+fn layout_root(base: &Child, index: &Child, radical: &RadicalMetrics, constants: &MathConstants) -> MathContent {+ // The mroot index is first ignored and the mroot base and radical glyph are laid out as shown on figure using the+ // same algorithm as in <msqrt> in order to produce a margin box B.+ let b = layout_square_root(+ MathContent {+ inline_size: base.inline_size,+ ascent: base.ascent,+ descent: base.descent,+ positions: vec![ChildPosition::default()],+ },+ radical,+ );+ let b_block_size = b.ascent + b.descent;+ // NB: radicalKernBeforeDegree falls back to 5/18em, radicalKernAfterDegree to −10/18em and+ // radicalDegreeBottomRaisePercent to 0.6.+ let kern_before_degree = constants.em.scaled(5.0 / 18.0);+ let kern_after_degree = constants.em.scaled(-10.0 / 18.0);+ let degree_bottom_raise = b_block_size.scaled(0.6);+ // AdjustedRadicalKernBeforeDegree and AdjustedRadicalKernAfterDegree are respectively defined as+ // max(0, RadicalKernBeforeDegree) and max(−inline size of the index's margin box, RadicalKernAfterDegree).+ let adjusted_kern_before_degree = kern_before_degree.max(CssPixels::default());+ let adjusted_kern_after_degree = kern_after_degree.max(-index.inline_size);+ // The inline size of the math content is the sum of AdjustedRadicalKernBeforeDegree, the inline size of the+ // index's margin box, AdjustedRadicalKernAfterDegree and of the inline size of B.+ let inline_size = adjusted_kern_before_degree + index.inline_size + adjusted_kern_after_degree + b.inline_size;+ // The alphabetic baseline of the index is shifted away from the line-under edge by a distance of+ // RadicalDegreeBottomRaisePercent × the block size of B + the line-descent of the index's margin box.+ let index_baseline_shift = b.descent - degree_bottom_raise - index.descent;+ // NB: The line-ascent and line-descent of the math content are those of the union of B and the index.+ let ascent = b.ascent.max(index.ascent - index_baseline_shift);+ let descent = b.descent.max(index.descent + index_baseline_shift);+ // The inline offset of the index is AdjustedRadicalKernBeforeDegree. The inline-offset of the mroot base is the+ // same + the inline size of the index's margin box.+ // NB: The base also follows the radical glyph and AdjustedRadicalKernAfterDegree.+ let b_offset = adjusted_kern_before_degree + index.inline_size + adjusted_kern_after_degree;+ MathContent {+ inline_size,+ ascent,+ descent,+ positions: vec![+ ChildPosition {+ line_left_offset: b_offset + b.positions[0].line_left_offset,+ baseline_shift: CssPixels::default(),+ },+ ChildPosition {+ line_left_offset: adjusted_kern_before_degree,+ baseline_shift: index_baseline_shift,+ },+ ],+ }+}diff --git a/Tests/LibWeb/Text/expected/wpt-import/mathml/presentation-markup/mrow/no-spacing.txt b/Tests/LibWeb/Text/expected/wpt-import/mathml/presentation-markup/mrow/no-spacing.txtindex 91849ee8747..f4149b8bb10 100644--- a/Tests/LibWeb/Text/expected/wpt-import/mathml/presentation-markup/mrow/no-spacing.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/mathml/presentation-markup/mrow/no-spacing.txt@@ -2,8 +2,8 @@ Harness status: OKFound 54 tests-37 Pass-17 Fail+43 Pass+11 FailPass Spacing inside an <mfrac> child of <math>.Pass Spacing around an <mfrac> child of an <math>.Pass Spacing inside an <mfrac> child of <mrow>.@@ -52,9 +52,9 @@ Pass Spacing inside an <munderover> child of <mrow>.Pass Spacing around an <munderover> child of an <mrow>.Pass Spacing inside an <munderover> child of <mtd>.Fail Spacing around an <munderover> child of an <mtd>.-Fail Spacing inside an <mroot> child of <math>.-Fail Spacing around an <mroot> child of an <math>.-Fail Spacing inside an <mroot> child of <mrow>.-Fail Spacing around an <mroot> child of an <mrow>.-Fail Spacing inside an <mroot> child of <mtd>.-Fail Spacing around an <mroot> child of an <mtd>.\ No newline at end of file+Pass Spacing inside an <mroot> child of <math>.+Pass Spacing around an <mroot> child of an <math>.+Pass Spacing inside an <mroot> child of <mrow>.+Pass Spacing around an <mroot> child of an <mrow>.+Pass Spacing inside an <mroot> child of <mtd>.+Pass Spacing around an <mroot> child of an <mtd>.\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/mathml/presentation-markup/radicals/glyph-level-mirroring.txt b/Tests/LibWeb/Text/expected/wpt-import/mathml/presentation-markup/radicals/glyph-level-mirroring.txtindex 54982ea13d6..3870b6525e6 100644--- a/Tests/LibWeb/Text/expected/wpt-import/mathml/presentation-markup/radicals/glyph-level-mirroring.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/mathml/presentation-markup/radicals/glyph-level-mirroring.txt@@ -2,6 +2,7 @@ Harness status: OKFound 2 tests-2 Fail-Fail LTR Direction+1 Pass+1 Fail+Pass LTR DirectionFail RTL Direction\ No newline at end of filediff --git a/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/css-styling/ignored-properties-001.txt b/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/css-styling/ignored-properties-001.txtindex 2c092803f79..10f353b3ecc 100644--- a/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/css-styling/ignored-properties-001.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/css-styling/ignored-properties-001.txt@@ -2,8 +2,7 @@ Harness status: OKFound 260 tests-240 Pass-20 Fail+260 PassPass a preferred width calculation is not affected by writing-mode: vertical-rl;Pass a layout is not affected by writing-mode: vertical-rl;Pass a preferred width calculation is not affected by white-space: normal;@@ -124,16 +123,16 @@ Pass mphantom preferred width calculation is not affected by align-content: end;Pass mphantom layout is not affected by align-content: end; justify-content: end;Pass mphantom preferred width calculation is not affected by align-self: end; justify-self: end;Pass mphantom layout is not affected by align-self: end; justify-self: end;-Fail mroot preferred width calculation is not affected by writing-mode: vertical-rl;-Fail mroot layout is not affected by writing-mode: vertical-rl;-Fail mroot preferred width calculation is not affected by white-space: normal;-Fail mroot layout is not affected by white-space: normal;-Fail mroot preferred width calculation is not affected by float: right;-Fail mroot layout is not affected by float: right;-Fail mroot preferred width calculation is not affected by align-content: end; justify-content: end;-Fail mroot layout is not affected by align-content: end; justify-content: end;-Fail mroot preferred width calculation is not affected by align-self: end; justify-self: end;-Fail mroot layout is not affected by align-self: end; justify-self: end;+Pass mroot preferred width calculation is not affected by writing-mode: vertical-rl;+Pass mroot layout is not affected by writing-mode: vertical-rl;+Pass mroot preferred width calculation is not affected by white-space: normal;+Pass mroot layout is not affected by white-space: normal;+Pass mroot preferred width calculation is not affected by float: right;+Pass mroot layout is not affected by float: right;+Pass mroot preferred width calculation is not affected by align-content: end; justify-content: end;+Pass mroot layout is not affected by align-content: end; justify-content: end;+Pass mroot preferred width calculation is not affected by align-self: end; justify-self: end;+Pass mroot layout is not affected by align-self: end; justify-self: end;Pass mrow preferred width calculation is not affected by writing-mode: vertical-rl;Pass mrow layout is not affected by writing-mode: vertical-rl;Pass mrow preferred width calculation is not affected by white-space: normal;@@ -164,16 +163,16 @@ Pass mspace preferred width calculation is not affected by align-content: end; jPass mspace layout is not affected by align-content: end; justify-content: end;Pass mspace preferred width calculation is not affected by align-self: end; justify-self: end;Pass mspace layout is not affected by align-self: end; justify-self: end;-Fail msqrt preferred width calculation is not affected by writing-mode: vertical-rl;-Fail msqrt layout is not affected by writing-mode: vertical-rl;-Fail msqrt preferred width calculation is not affected by white-space: normal;-Fail msqrt layout is not affected by white-space: normal;-Fail msqrt preferred width calculation is not affected by float: right;-Fail msqrt layout is not affected by float: right;-Fail msqrt preferred width calculation is not affected by align-content: end; justify-content: end;-Fail msqrt layout is not affected by align-content: end; justify-content: end;-Fail msqrt preferred width calculation is not affected by align-self: end; justify-self: end;-Fail msqrt layout is not affected by align-self: end; justify-self: end;+Pass msqrt preferred width calculation is not affected by writing-mode: vertical-rl;+Pass msqrt layout is not affected by writing-mode: vertical-rl;+Pass msqrt preferred width calculation is not affected by white-space: normal;+Pass msqrt layout is not affected by white-space: normal;+Pass msqrt preferred width calculation is not affected by float: right;+Pass msqrt layout is not affected by float: right;+Pass msqrt preferred width calculation is not affected by align-content: end; justify-content: end;+Pass msqrt layout is not affected by align-content: end; justify-content: end;+Pass msqrt preferred width calculation is not affected by align-self: end; justify-self: end;+Pass msqrt layout is not affected by align-self: end; justify-self: end;Pass mstyle preferred width calculation is not affected by writing-mode: vertical-rl;Pass mstyle layout is not affected by writing-mode: vertical-rl;Pass mstyle preferred width calculation is not affected by white-space: normal;diff --git a/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/css-styling/not-participating-to-parent-layout.txt b/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/css-styling/not-participating-to-parent-layout.txtindex 58e217f84e1..eba60bdc0db 100644--- a/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/css-styling/not-participating-to-parent-layout.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/css-styling/not-participating-to-parent-layout.txt@@ -2,8 +2,7 @@ Harness status: OKFound 166 tests-152 Pass-14 Fail+166 PassPass a preferred width calculation is not affected by children with "display: none" stylePass a layout is not affected by children with "display: none" stylePass a preferred width calculation is not affected by children with "display: contents" style@@ -86,12 +85,12 @@ Pass mphantom preferred width calculation is not affected by children with "posiPass mphantom layout is not affected by children with "position: absolute" stylePass mphantom preferred width calculation is not affected by children with "position: fixed" stylePass mphantom layout is not affected by children with "position: fixed" style-Fail mroot preferred width calculation is not affected by children with "display: none" style-Fail mroot layout is not affected by children with "display: none" style-Fail mroot preferred width calculation is not affected by children with "position: absolute" style-Fail mroot layout is not affected by children with "position: absolute" style-Fail mroot preferred width calculation is not affected by children with "position: fixed" style-Fail mroot layout is not affected by children with "position: fixed" style+Pass mroot preferred width calculation is not affected by children with "display: none" style+Pass mroot layout is not affected by children with "display: none" style+Pass mroot preferred width calculation is not affected by children with "position: absolute" style+Pass mroot layout is not affected by children with "position: absolute" style+Pass mroot preferred width calculation is not affected by children with "position: fixed" style+Pass mroot layout is not affected by children with "position: fixed" stylePass mrow preferred width calculation is not affected by children with "display: none" stylePass mrow layout is not affected by children with "display: none" stylePass mrow preferred width calculation is not affected by children with "display: contents" style@@ -106,14 +105,14 @@ Pass ms preferred width calculation is not affected by children with "position:Pass ms layout is not affected by children with "position: absolute" stylePass ms preferred width calculation is not affected by children with "position: fixed" stylePass ms layout is not affected by children with "position: fixed" style-Fail msqrt preferred width calculation is not affected by children with "display: none" style-Fail msqrt layout is not affected by children with "display: none" style-Fail msqrt preferred width calculation is not affected by children with "display: contents" style-Fail msqrt layout is not affected by children with "display: contents" style-Fail msqrt preferred width calculation is not affected by children with "position: absolute" style-Fail msqrt layout is not affected by children with "position: absolute" style-Fail msqrt preferred width calculation is not affected by children with "position: fixed" style-Fail msqrt layout is not affected by children with "position: fixed" style+Pass msqrt preferred width calculation is not affected by children with "display: none" style+Pass msqrt layout is not affected by children with "display: none" style+Pass msqrt preferred width calculation is not affected by children with "display: contents" style+Pass msqrt layout is not affected by children with "display: contents" style+Pass msqrt preferred width calculation is not affected by children with "position: absolute" style+Pass msqrt layout is not affected by children with "position: absolute" style+Pass msqrt preferred width calculation is not affected by children with "position: fixed" style+Pass msqrt layout is not affected by children with "position: fixed" stylePass mstyle preferred width calculation is not affected by children with "display: none" stylePass mstyle layout is not affected by children with "display: none" stylePass mstyle preferred width calculation is not affected by children with "display: contents" stylediff --git a/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/css-styling/out-of-flow/absolutely-positioned-002.txt b/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/css-styling/out-of-flow/absolutely-positioned-002.txtindex db2f8c46f80..da643bec5dd 100644--- a/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/css-styling/out-of-flow/absolutely-positioned-002.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/css-styling/out-of-flow/absolutely-positioned-002.txt@@ -2,8 +2,8 @@ Harness status: OKFound 26 tests-23 Pass-3 Fail+25 Pass+1 FailPass position: absolute on <a> element itselfPass position: absolute on <maction> element itselfPass position: absolute on <menclose> element itself@@ -16,11 +16,11 @@ Pass position: absolute on <mo> element itselfPass position: absolute on <mover> element itselfPass position: absolute on <mpadded> element itselfPass position: absolute on <mphantom> element itself-Fail position: absolute on <mroot> element itself+Pass position: absolute on <mroot> element itselfPass position: absolute on <mrow> element itselfPass position: absolute on <ms> element itselfPass position: absolute on <mspace> element itself-Fail position: absolute on <msqrt> element itself+Pass position: absolute on <msqrt> element itselfPass position: absolute on <mstyle> element itselfPass position: absolute on <msub> element itselfPass position: absolute on <msubsup> element itselfdiff --git a/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/css-styling/out-of-flow/all-mathml-containers.txt b/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/css-styling/out-of-flow/all-mathml-containers.txtindex a559b3fb305..6b732cb5fae 100644--- a/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/css-styling/out-of-flow/all-mathml-containers.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/css-styling/out-of-flow/all-mathml-containers.txt@@ -2,8 +2,7 @@ Harness status: OKFound 50 tests-46 Pass-4 Fail+50 PassPass position: absolute; children in aPass position: absolute; children in mactionPass position: absolute; children in menclose@@ -16,10 +15,10 @@ Pass position: absolute; children in moPass position: absolute; children in moverPass position: absolute; children in mpaddedPass position: absolute; children in mphantom-Fail position: absolute; children in mroot+Pass position: absolute; children in mrootPass position: absolute; children in mrowPass position: absolute; children in ms-Fail position: absolute; children in msqrt+Pass position: absolute; children in msqrtPass position: absolute; children in mstylePass position: absolute; children in msubPass position: absolute; children in msubsup@@ -41,10 +40,10 @@ Pass position: fixed; children in moPass position: fixed; children in moverPass position: fixed; children in mpaddedPass position: fixed; children in mphantom-Fail position: fixed; children in mroot+Pass position: fixed; children in mrootPass position: fixed; children in mrowPass position: fixed; children in ms-Fail position: fixed; children in msqrt+Pass position: fixed; children in msqrtPass position: fixed; children in mstylePass position: fixed; children in msubPass position: fixed; children in msubsupdiff --git a/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/css-styling/padding-border-margin/border-002.txt b/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/css-styling/padding-border-margin/border-002.txtindex c428c52eb24..151d349aa62 100644--- a/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/css-styling/padding-border-margin/border-002.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/css-styling/padding-border-margin/border-002.txt@@ -2,8 +2,7 @@ Harness status: OKFound 51 tests-47 Pass-4 Fail+51 PassPass Border properties on aPass Border properties on a (rtl)Pass Border properties on maction@@ -28,15 +27,15 @@ Pass Border properties on mpaddedPass Border properties on mpadded (rtl)Pass Border properties on mphantomPass Border properties on mphantom (rtl)-Fail Border properties on mroot-Fail Border properties on mroot (rtl)+Pass Border properties on mroot+Pass Border properties on mroot (rtl)Pass Border properties on mrowPass Border properties on mrow (rtl)Pass Border properties on msPass Border properties on ms (rtl)Pass Border properties on mspace-Fail Border properties on msqrt-Fail Border properties on msqrt (rtl)+Pass Border properties on msqrt+Pass Border properties on msqrt (rtl)Pass Border properties on mstylePass Border properties on mstyle (rtl)Pass Border properties on msubdiff --git a/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/css-styling/padding-border-margin/margin-002.txt b/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/css-styling/padding-border-margin/margin-002.txtindex 5d43cbc2553..42a0846631f 100644--- a/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/css-styling/padding-border-margin/margin-002.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/css-styling/padding-border-margin/margin-002.txt@@ -2,8 +2,7 @@ Harness status: OKFound 76 tests-70 Pass-6 Fail+76 PassPass Margin properties on aPass Margin properties on a (rtl)Pass Margin properties on a (no margin-collapsing)@@ -40,9 +39,9 @@ Pass Margin properties on mpadded (no margin-collapsing)Pass Margin properties on mphantomPass Margin properties on mphantom (rtl)Pass Margin properties on mphantom (no margin-collapsing)-Fail Margin properties on mroot-Fail Margin properties on mroot (rtl)-Fail Margin properties on mroot (no margin-collapsing)+Pass Margin properties on mroot+Pass Margin properties on mroot (rtl)+Pass Margin properties on mroot (no margin-collapsing)Pass Margin properties on mrowPass Margin properties on mrow (rtl)Pass Margin properties on mrow (no margin-collapsing)@@ -50,9 +49,9 @@ Pass Margin properties on msPass Margin properties on ms (rtl)Pass Margin properties on ms (no margin-collapsing)Pass Margin properties on mspace-Fail Margin properties on msqrt-Fail Margin properties on msqrt (rtl)-Fail Margin properties on msqrt (no margin-collapsing)+Pass Margin properties on msqrt+Pass Margin properties on msqrt (rtl)+Pass Margin properties on msqrt (no margin-collapsing)Pass Margin properties on mstylePass Margin properties on mstyle (rtl)Pass Margin properties on mstyle (no margin-collapsing)diff --git a/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/css-styling/padding-border-margin/margin-003.txt b/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/css-styling/padding-border-margin/margin-003.txtindex 98d4892945c..4318fbbfb87 100644--- a/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/css-styling/padding-border-margin/margin-003.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/css-styling/padding-border-margin/margin-003.txt@@ -2,8 +2,7 @@ Harness status: OKFound 17 tests-15 Pass-2 Fail+17 PassPass Margin properties on the children of aPass Margin properties on the children of menclosePass Margin properties on the children of merror@@ -12,9 +11,9 @@ Pass Margin properties on the children of mmultiscriptsPass Margin properties on the children of moverPass Margin properties on the children of mpaddedPass Margin properties on the children of mphantom-Fail Margin properties on the children of mroot+Pass Margin properties on the children of mrootPass Margin properties on the children of mrow-Fail Margin properties on the children of msqrt+Pass Margin properties on the children of msqrtPass Margin properties on the children of mstylePass Margin properties on the children of msubPass Margin properties on the children of msubsupdiff --git a/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/css-styling/padding-border-margin/padding-002.txt b/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/css-styling/padding-border-margin/padding-002.txtindex 73c8a7de059..9da8b087d8b 100644--- a/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/css-styling/padding-border-margin/padding-002.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/css-styling/padding-border-margin/padding-002.txt@@ -2,8 +2,7 @@ Harness status: OKFound 51 tests-47 Pass-4 Fail+51 PassPass Padding properties on aPass Padding properties on a (rtl)Pass Padding properties on maction@@ -28,15 +27,15 @@ Pass Padding properties on mpaddedPass Padding properties on mpadded (rtl)Pass Padding properties on mphantomPass Padding properties on mphantom (rtl)-Fail Padding properties on mroot-Fail Padding properties on mroot (rtl)+Pass Padding properties on mroot+Pass Padding properties on mroot (rtl)Pass Padding properties on mrowPass Padding properties on mrow (rtl)Pass Padding properties on msPass Padding properties on ms (rtl)Pass Padding properties on mspace-Fail Padding properties on msqrt-Fail Padding properties on msqrt (rtl)+Pass Padding properties on msqrt+Pass Padding properties on msqrt (rtl)Pass Padding properties on mstylePass Padding properties on mstyle (rtl)Pass Padding properties on msubdiff --git a/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/css-styling/width-height-001.txt b/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/css-styling/width-height-001.txtindex c55e08cfd0b..a275bc066b0 100644--- a/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/css-styling/width-height-001.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/css-styling/width-height-001.txt@@ -2,8 +2,7 @@ Harness status: OKFound 103 tests-95 Pass-8 Fail+103 PassPass width and height properties on aPass inline-size and block-size properties on aPass width and height properties on a (content overflowing)@@ -52,10 +51,10 @@ Pass width and height properties on mphantomPass inline-size and block-size properties on mphantomPass width and height properties on mphantom (content overflowing)Pass width property on mphantom (preferred width)-Fail width and height properties on mroot-Fail inline-size and block-size properties on mroot-Fail width and height properties on mroot (content overflowing)-Fail width property on mroot (preferred width)+Pass width and height properties on mroot+Pass inline-size and block-size properties on mroot+Pass width and height properties on mroot (content overflowing)+Pass width property on mroot (preferred width)Pass width and height properties on mrowPass inline-size and block-size properties on mrowPass width and height properties on mrow (content overflowing)@@ -68,10 +67,10 @@ Pass width and height properties on mspacePass inline-size and block-size properties on mspacePass width and height properties on mspace (content overflowing)Pass width property on mspace (preferred width)-Fail width and height properties on msqrt-Fail inline-size and block-size properties on msqrt-Fail width and height properties on msqrt (content overflowing)-Fail width property on msqrt (preferred width)+Pass width and height properties on msqrt+Pass inline-size and block-size properties on msqrt+Pass width and height properties on msqrt (content overflowing)+Pass width property on msqrt (preferred width)Pass width and height properties on mstylePass inline-size and block-size properties on mstylePass width and height properties on mstyle (content overflowing)diff --git a/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/html5-tree/dynamic-childlist-002.txt b/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/html5-tree/dynamic-childlist-002.txtindex f4133691df0..3dd1a32213f 100644--- a/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/html5-tree/dynamic-childlist-002.txt+++ b/Tests/LibWeb/Text/expected/wpt-import/mathml/relations/html5-tree/dynamic-childlist-002.txt@@ -2,8 +2,7 @@ Harness status: OKFound 26 tests-24 Pass-2 Fail+26 PassPass Appending and removing children to aPass Appending and removing children to mactionPass Appending and removing children to menclose@@ -16,11 +15,11 @@ Pass Appending and removing children to moPass Appending and removing children to moverPass Appending and removing children to mpaddedPass Appending and removing children to mphantom-Fail Appending and removing children to mroot+Pass Appending and removing children to mrootPass Appending and removing children to mrowPass Appending and removing children to msPass Appending and removing children to mspace-Fail Appending and removing children to msqrt+Pass Appending and removing children to msqrtPass Appending and removing children to mstylePass Appending and removing children to msubPass Appending and removing children to msubsup