Bug 1572211 - Do not rely on AxisHeight for the layout of mfrac elements without bar. r=emilio
authorFrédéric Wang <fwang@igalia.com>
Tue, 13 Aug 2019 15:05:26 +0000
changeset 487785 aa4c230df929a0387b38bb4e0d13c24142000113
parent 487784 e68e7235513e0aff02ebde6a83f7e4a1bdae940c
child 487786 25b77061eb1a06d327afa89210293ac9fdc2d752
push id36430
push userdvarga@mozilla.com
push dateWed, 14 Aug 2019 04:09:17 +0000
treeherdermozilla-central@d3deef805f92 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemilio
bugs1572211
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1572211 - Do not rely on AxisHeight for the layout of mfrac elements without bar. r=emilio AxisHeight is not involved in the layout of <mfrac> with zero linethickness: https://mathml-refresh.github.io/mathml-core/#fraction-with-zero-line-thickness Confirmed by Microsoft: https://lists.w3.org/Archives/Public/public-mathml4/2019Aug/0019.html See https://github.com/mathml-refresh/mathml/issues/123 Differential Revision: https://phabricator.services.mozilla.com/D41189
layout/mathml/nsMathMLmfracFrame.cpp
--- a/layout/mathml/nsMathMLmfracFrame.cpp
+++ b/layout/mathml/nsMathMLmfracFrame.cpp
@@ -311,20 +311,16 @@ nsresult nsMathMLmfracFrame::PlaceIntern
       nscoord minClearance =
           displayStyle ? 7 * defaultRuleThickness : 3 * defaultRuleThickness;
       if (mathFont) {
         minClearance = mathFont->MathTable()->Constant(
             displayStyle ? gfxMathTable::StackDisplayStyleGapMin
                          : gfxMathTable::StackGapMin,
             oneDevPixel);
       }
-      // Factor in axis height
-      // http://www.mathml-association.org/MathMLinHTML5/S3.html#SS3.SSS2
-      numShift += axisHeight;
-      denShift += axisHeight;
 
       nscoord actualClearance =
           (numShift - bmNum.descent) - (bmDen.ascent - denShift);
       // actualClearance should be >= minClearance
       if (actualClearance < minClearance) {
         nscoord halfGap = (minClearance - actualClearance) / 2;
         numShift += halfGap;
         denShift += halfGap;