From 39bd5c99abca5c46de5d9d90b30a9d16cd99af23 Mon Sep 17 00:00:00 2001 From: Delan Azabani Date: Tue, 18 Aug 2020 21:18:57 +1000 Subject: [PATCH] FIXME --- mathml/support/box-comparison.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/mathml/support/box-comparison.js b/mathml/support/box-comparison.js index a574b01706..c3a291bc6f 100644 --- a/mathml/support/box-comparison.js +++ b/mathml/support/box-comparison.js @@ -72,22 +72,22 @@ function compareSizeWithAndWithoutStyle(tag, style) { throw `Invalid argument: ${tag}`; document.body.insertAdjacentHTML("beforeend", `
\ -
${MathMLFragments[tag]}
\ -
${MathMLFragments[tag]}
\ +
${MathMLFragments[tag]}
\ +
${MathMLFragments[tag]}
\
`); var div = document.body.lastElementChild; var styleDiv = div.firstElementChild; - var styleMath = styleDiv.firstElementChild; - var styleElement = FragmentHelper.element(styleMath); + var styleMrow = styleDiv.firstElementChild.firstElementChild; + var styleElement = FragmentHelper.element(styleMrow); styleElement.setAttribute("style", style); - var styleMathBox = styleMath.getBoundingClientRect(); + var styleMrowBox = styleMrow.getBoundingClientRect(); var styleElementBox = styleElement.getBoundingClientRect(); var noStyleDiv = div.lastElementChild; - var noStyleMath = noStyleDiv.firstElementChild; - var noStyleElement = FragmentHelper.element(noStyleMath); - var noStyleMathBox = noStyleMath.getBoundingClientRect(); + var noStyleMrow = noStyleDiv.firstElementChild.firstElementChild; + var noStyleElement = FragmentHelper.element(noStyleMrow); + var noStyleMrowBox = noStyleMrow.getBoundingClientRect(); var noStyleElementBox = noStyleElement.getBoundingClientRect(); var preferredWidthDelta = @@ -98,8 +98,8 @@ function compareSizeWithAndWithoutStyle(tag, style) { return { preferred_width_delta: preferredWidthDelta, - width_delta: styleMathBox.width - noStyleMathBox.width, - height_delta: styleMathBox.height - noStyleMathBox.height, + width_delta: styleMrowBox.width - noStyleMrowBox.width, + height_delta: styleMrowBox.height - noStyleMrowBox.height, element_width_delta: styleElementBox.width - noStyleElementBox.width, element_height_delta: styleElementBox.height - noStyleElementBox.height }; -- 2.20.1