Bug 890196 - Remove unnecessary code to fill out nsSVGTextFrame2::mPositions when more characters are specified than positions. r=longsonr

This commit is contained in:
Cameron McCormack 2013-07-04 18:31:24 +10:00
parent f52ec81b93
commit 6e9bd2754f

View File

@ -4762,26 +4762,7 @@ nsSVGTextFrame2::DoGlyphPositioning()
}
}
// Fill in any remaining character positions after the specified
// x/y/rotate positions.
//
// XXX This may not be needed since ResolvePositions now initializes
// mPositions with an (unspecified) value for each character.
for (uint32_t i = mPositions.Length(); i < charPositions.Length(); i++) {
nscoord dx = charPositions[i].x - charPositions[i - 1].x;
nscoord dy = charPositions[i].y - charPositions[i - 1].y;
gfxPoint pt(mPositions[i - 1].mPosition.x +
presContext->AppUnitsToGfxUnits(dx) * cssPxPerDevPx,
mPositions[i - 1].mPosition.y +
presContext->AppUnitsToGfxUnits(dy) * cssPxPerDevPx);
mPositions.AppendElement(CharPosition(pt / mFontSizeScaleFactor,
mPositions[i - 1].mAngle));
if (i < deltas.Length()) {
mPositions[i].mPosition += deltas[i];
}
}
MOZ_ASSERT(mPositions.Length() == charPositions.Length());
AdjustChunksForLineBreaks();
AdjustPositionsForClusters();