Skip to content
This repository was archived by the owner on Mar 19, 2021. It is now read-only.

Commit d250e8c

Browse files
authored
MathML: Make box comparison more reliable by using an absolutely-positioned div. (#18276)
It seems padding/border/margin-002 tests may fail because of interaction between sibling divs. Although this probably need separate debugging/testing, these tests are intended to verify each subtest individually, so make the testing divs absolutely-positioned in order to isolate them from the rest of the layout.
1 parent c83df3d commit d250e8c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mathml/support/box-comparison.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function compareSpaceWithAndWithoutStyle(tag, style, parentStyle, direction) {
2222

2323
if (!direction)
2424
direction = "ltr";
25-
document.body.insertAdjacentHTML("beforeend", `<div>\
25+
document.body.insertAdjacentHTML("beforeend", `<div style="position: absolute;">\
2626
<math><mrow dir="${direction}">${MathMLFragments[tag]}</mrow></math>\
2727
<math><mrow dir="${direction}">${MathMLFragments[tag]}</mrow></math>\
2828
</div>`);
@@ -64,7 +64,7 @@ function compareSizeWithAndWithoutStyle(tag, style) {
6464
if (!FragmentHelper.isValidChildOfMrow(tag))
6565
throw `Invalid argument: ${tag}`;
6666

67-
document.body.insertAdjacentHTML("beforeend", `<div>\
67+
document.body.insertAdjacentHTML("beforeend", `<div style="position: absolute;">\
6868
<math>${MathMLFragments[tag]}</math>\
6969
<math>${MathMLFragments[tag]}</math>\
7070
</div>`);

0 commit comments

Comments
 (0)