From 5cbf9956665b26ede51cc6582aff680a241f2a0d Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Wed, 3 Jul 2013 15:31:44 +1000 Subject: [PATCH] Bug 889221 - Record dominant-baseline values correctly when traversing SVG text frames. r=roc --HG-- extra : rebase_source : 0cd8bdd1d140f8991913355988ff26afdd65df2b --- layout/svg/nsSVGTextFrame2.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/layout/svg/nsSVGTextFrame2.cpp b/layout/svg/nsSVGTextFrame2.cpp index 117e3b33cdc6..f46dded2b60e 100644 --- a/layout/svg/nsSVGTextFrame2.cpp +++ b/layout/svg/nsSVGTextFrame2.cpp @@ -1732,11 +1732,10 @@ void TextFrameIterator::PushBaseline(nsIFrame* aNextFrame) { uint8_t baseline = aNextFrame->StyleSVGReset()->mDominantBaseline; - if (baseline != NS_STYLE_DOMINANT_BASELINE_AUTO) { - mBaselines.AppendElement(baseline); - } else { - mBaselines.AppendElement(mBaselines[mBaselines.Length() - 1]); + if (baseline == NS_STYLE_DOMINANT_BASELINE_AUTO) { + baseline = mBaselines.LastElement(); } + mBaselines.AppendElement(baseline); } void