From ab44f481ad79798d6f72f08a062d38320fe9f6a1 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Wed, 10 Apr 2013 23:04:28 +1000 Subject: [PATCH] Bug 839957 - Followup for review comment. --- layout/svg/nsSVGTextFrame2.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/layout/svg/nsSVGTextFrame2.cpp b/layout/svg/nsSVGTextFrame2.cpp index 035ae8912ac3..7690b017f7a6 100644 --- a/layout/svg/nsSVGTextFrame2.cpp +++ b/layout/svg/nsSVGTextFrame2.cpp @@ -4599,20 +4599,22 @@ nsSVGTextFrame2::DoGlyphPositioning() if (!deltas.IsEmpty()) { mPositions[0].mPosition += deltas[0]; } + + double factor = cssPxPerDevPx / mFontSizeScaleFactor; for (uint32_t i = 1; i < mPositions.Length(); i++) { // Fill in unspecified x position. if (!mPositions[i].IsXSpecified()) { nscoord d = charPositions[i].x - charPositions[i - 1].x; mPositions[i].mPosition.x = mPositions[i - 1].mPosition.x + - presContext->AppUnitsToGfxUnits(d) * cssPxPerDevPx / mFontSizeScaleFactor; + presContext->AppUnitsToGfxUnits(d) * factor; } // Fill in unspecified y position. if (!mPositions[i].IsYSpecified()) { nscoord d = charPositions[i].y - charPositions[i - 1].y; mPositions[i].mPosition.y = mPositions[i - 1].mPosition.y + - presContext->AppUnitsToGfxUnits(d) * cssPxPerDevPx / mFontSizeScaleFactor; + presContext->AppUnitsToGfxUnits(d) * factor; } // Add in dx/dy. if (i < deltas.Length()) {