Skip to content

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.rs
index 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-accent
fn 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.txt
index 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: OK
Found 54 tests
-37 Pass
-17 Fail
+43 Pass
+11 Fail
Pass 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 file
diff --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.txt
index 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: OK
Found 2 tests
-2 Fail
-Fail LTR Direction
+1 Pass
+1 Fail
+Pass LTR Direction
Fail RTL Direction
\ No newline at end of file
diff --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.txt
index 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: OK
Found 260 tests
-240 Pass
-20 Fail
+260 Pass
Pass 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; j
Pass 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.txt
index 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: OK
Found 166 tests
-152 Pass
-14 Fail
+166 Pass
Pass a preferred width calculation is not affected by children with "display: none" style
Pass a layout is not affected by children with "display: none" style
Pass 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 "posi
Pass mphantom layout is not affected by children with "position: absolute" style
Pass mphantom preferred width calculation is not affected by children with "position: fixed" style
Pass 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" style
Pass mrow preferred width calculation is not affected by children with "display: none" style
Pass mrow layout is not affected by children with "display: none" style
Pass 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" style
Pass ms preferred width calculation is not affected by children with "position: fixed" style
Pass 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" style
Pass mstyle preferred width calculation is not affected by children with "display: none" style
Pass mstyle layout is not affected by children with "display: none" style
Pass mstyle preferred width calculation is not affected by children with "display: contents" style
diff --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.txt
index 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: OK
Found 26 tests
-23 Pass
-3 Fail
+25 Pass
+1 Fail
Pass position: absolute on <a> element itself
Pass position: absolute on <maction> element itself
Pass position: absolute on <menclose> element itself
@@ -16,11 +16,11 @@ Pass position: absolute on <mo> element itself
Pass position: absolute on <mover> element itself
Pass position: absolute on <mpadded> element itself
Pass position: absolute on <mphantom> element itself
-Fail position: absolute on <mroot> element itself
+Pass position: absolute on <mroot> element itself
Pass position: absolute on <mrow> element itself
Pass position: absolute on <ms> element itself
Pass position: absolute on <mspace> element itself
-Fail position: absolute on <msqrt> element itself
+Pass position: absolute on <msqrt> element itself
Pass position: absolute on <mstyle> element itself
Pass position: absolute on <msub> element itself
Pass position: absolute on <msubsup> element itself
diff --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.txt
index 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: OK
Found 50 tests
-46 Pass
-4 Fail
+50 Pass
Pass position: absolute; children in a
Pass position: absolute; children in maction
Pass position: absolute; children in menclose
@@ -16,10 +15,10 @@ Pass position: absolute; children in mo
Pass position: absolute; children in mover
Pass position: absolute; children in mpadded
Pass position: absolute; children in mphantom
-Fail position: absolute; children in mroot
+Pass position: absolute; children in mroot
Pass position: absolute; children in mrow
Pass position: absolute; children in ms
-Fail position: absolute; children in msqrt
+Pass position: absolute; children in msqrt
Pass position: absolute; children in mstyle
Pass position: absolute; children in msub
Pass position: absolute; children in msubsup
@@ -41,10 +40,10 @@ Pass position: fixed; children in mo
Pass position: fixed; children in mover
Pass position: fixed; children in mpadded
Pass position: fixed; children in mphantom
-Fail position: fixed; children in mroot
+Pass position: fixed; children in mroot
Pass position: fixed; children in mrow
Pass position: fixed; children in ms
-Fail position: fixed; children in msqrt
+Pass position: fixed; children in msqrt
Pass position: fixed; children in mstyle
Pass position: fixed; children in msub
Pass position: fixed; children in msubsup
diff --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.txt
index 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: OK
Found 51 tests
-47 Pass
-4 Fail
+51 Pass
Pass Border properties on a
Pass Border properties on a (rtl)
Pass Border properties on maction
@@ -28,15 +27,15 @@ Pass Border properties on mpadded
Pass Border properties on mpadded (rtl)
Pass Border properties on mphantom
Pass 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 mrow
Pass Border properties on mrow (rtl)
Pass Border properties on ms
Pass 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 mstyle
Pass Border properties on mstyle (rtl)
Pass Border properties on msub
diff --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.txt
index 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: OK
Found 76 tests
-70 Pass
-6 Fail
+76 Pass
Pass Margin properties on a
Pass 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 mphantom
Pass 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 mrow
Pass Margin properties on mrow (rtl)
Pass Margin properties on mrow (no margin-collapsing)
@@ -50,9 +49,9 @@ Pass Margin properties on ms
Pass 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 mstyle
Pass 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.txt
index 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: OK
Found 17 tests
-15 Pass
-2 Fail
+17 Pass
Pass Margin properties on the children of a
Pass Margin properties on the children of menclose
Pass Margin properties on the children of merror
@@ -12,9 +11,9 @@ Pass Margin properties on the children of mmultiscripts
Pass Margin properties on the children of mover
Pass Margin properties on the children of mpadded
Pass Margin properties on the children of mphantom
-Fail Margin properties on the children of mroot
+Pass Margin properties on the children of mroot
Pass Margin properties on the children of mrow
-Fail Margin properties on the children of msqrt
+Pass Margin properties on the children of msqrt
Pass Margin properties on the children of mstyle
Pass Margin properties on the children of msub
Pass Margin properties on the children of msubsup
diff --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.txt
index 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: OK
Found 51 tests
-47 Pass
-4 Fail
+51 Pass
Pass Padding properties on a
Pass Padding properties on a (rtl)
Pass Padding properties on maction
@@ -28,15 +27,15 @@ Pass Padding properties on mpadded
Pass Padding properties on mpadded (rtl)
Pass Padding properties on mphantom
Pass 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 mrow
Pass Padding properties on mrow (rtl)
Pass Padding properties on ms
Pass 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 mstyle
Pass Padding properties on mstyle (rtl)
Pass Padding properties on msub
diff --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.txt
index 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: OK
Found 103 tests
-95 Pass
-8 Fail
+103 Pass
Pass width and height properties on a
Pass inline-size and block-size properties on a
Pass width and height properties on a (content overflowing)
@@ -52,10 +51,10 @@ Pass width and height properties on mphantom
Pass inline-size and block-size properties on mphantom
Pass 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 mrow
Pass inline-size and block-size properties on mrow
Pass width and height properties on mrow (content overflowing)
@@ -68,10 +67,10 @@ Pass width and height properties on mspace
Pass inline-size and block-size properties on mspace
Pass 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 mstyle
Pass inline-size and block-size properties on mstyle
Pass 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.txt
index 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: OK
Found 26 tests
-24 Pass
-2 Fail
+26 Pass
Pass Appending and removing children to a
Pass Appending and removing children to maction
Pass Appending and removing children to menclose
@@ -16,11 +15,11 @@ Pass Appending and removing children to mo
Pass Appending and removing children to mover
Pass Appending and removing children to mpadded
Pass Appending and removing children to mphantom
-Fail Appending and removing children to mroot
+Pass Appending and removing children to mroot
Pass Appending and removing children to mrow
Pass Appending and removing children to ms
Pass Appending and removing children to mspace
-Fail Appending and removing children to msqrt
+Pass Appending and removing children to msqrt
Pass Appending and removing children to mstyle
Pass Appending and removing children to msub
Pass Appending and removing children to msubsup