Use the text run's font group for the tab width instead of recomputing it from the frame. (Bug 627842, patch 7) r=roc

This commit is contained in:
L. David Baron 2011-11-15 17:02:01 +13:00
parent aa9ba3f977
commit 1986127472

View File

@ -2757,8 +2757,7 @@ ComputeTabWidthAppUnits(nsIFrame* aFrame, gfxTextRun* aTextRun)
// Round the space width when converting to appunits the same way
// textruns do
gfxFloat spaceWidthAppUnits =
NS_round(GetFirstFontMetrics(
GetFontGroupForFrame(aFrame)).spaceWidth *
NS_round(GetFirstFontMetrics(aTextRun->GetFontGroup()).spaceWidth *
aTextRun->GetAppUnitsPerDevUnit());
return textStyle->mTabSize * spaceWidthAppUnits;
}