From ebb6706f3946af16be6877ed5dbd783262c48375 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Wang?= Date: Fri, 5 Aug 2011 12:57:27 +1200 Subject: [PATCH] b=669932 munderover: consider underscript vertical metrics during the underscript attachment phase instead of the overscript attachment phase. r=karlt --HG-- extra : transplant_source : %B6%29%E1%1B%D4%0D%84fV%B9%1F%16%15%3Cu%A4%22%A0%94%F1 --- layout/mathml/nsMathMLmunderoverFrame.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/layout/mathml/nsMathMLmunderoverFrame.cpp b/layout/mathml/nsMathMLmunderoverFrame.cpp index dc2c36796e9..60bab2205d2 100644 --- a/layout/mathml/nsMathMLmunderoverFrame.cpp +++ b/layout/mathml/nsMathMLmunderoverFrame.cpp @@ -419,8 +419,7 @@ nsMathMLmunderoverFrame::Place(nsRenderingContext& aRenderingContext, mBoundingMetrics.ascent = bmBase.ascent + overDelta1 + bmOver.ascent + bmOver.descent; - mBoundingMetrics.descent = - bmBase.descent + underDelta1 + bmUnder.ascent + bmUnder.descent; + mBoundingMetrics.descent = bmBase.descent; mBoundingMetrics.leftBearing = NS_MIN(dxBase + bmBase.leftBearing, dxOver + bmOver.leftBearing); mBoundingMetrics.rightBearing = @@ -463,6 +462,9 @@ nsMathMLmunderoverFrame::Place(nsRenderingContext& aRenderingContext, mBoundingMetrics.width = NS_MAX(dxAnonymousBase + bmAnonymousBase.width, dxUnder + bmUnder.width); + // At this point, mBoundingMetrics.ascent = bmAnonymousBase.ascent + mBoundingMetrics.descent = + bmAnonymousBase.descent + underDelta1 + bmUnder.ascent + bmUnder.descent; mBoundingMetrics.leftBearing = NS_MIN(dxAnonymousBase + bmAnonymousBase.leftBearing, dxUnder + bmUnder.leftBearing); mBoundingMetrics.rightBearing =