diff --git a/mozilla/layout/mathml/base/src/nsMathMLChar.cpp b/mozilla/layout/mathml/base/src/nsMathMLChar.cpp index cc63c7de2f7..88796ab9555 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLChar.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLChar.cpp @@ -1602,7 +1602,9 @@ nsMathMLChar::Stretch(nsPresContext* aPresContext, targetSize = aContainerSize.width; } // if we are not a largeop in display mode, return if size fits - if (targetSize <= 0 || (!largeop && IsSizeOK(charSize, targetSize, aStretchHint))) { + if ((targetSize <= 0) || + (!largeop && ((isVertical && charSize >= targetSize) || + IsSizeOK(charSize, targetSize, aStretchHint)))) { // ensure that the char later behaves like a normal char // (will be reset back to its intrinsic value in case of dynamic updates) mDirection = NS_STRETCH_DIRECTION_UNSUPPORTED;