backing out 404820 in case it caused Linux Ts regression

This commit is contained in:
roc+@cs.cmu.edu 2007-11-30 18:18:16 -08:00
Родитель 518ad9ea7a
Коммит d61c11fcb7
1 изменённых файлов: 7 добавлений и 8 удалений

Просмотреть файл

@ -373,24 +373,23 @@ gfxFont::Measure(gfxTextRun *aTextRun,
PRBool aTightBoundingBox, gfxContext *aRefContext, PRBool aTightBoundingBox, gfxContext *aRefContext,
Spacing *aSpacing) Spacing *aSpacing)
{ {
const gfxTextRun::CompressedGlyph *charGlyphs = aTextRun->GetCharacterGlyphs();
const PRUint32 appUnitsPerDevUnit = aTextRun->GetAppUnitsPerDevUnit(); const PRUint32 appUnitsPerDevUnit = aTextRun->GetAppUnitsPerDevUnit();
PRBool isRTL = aTextRun->IsRightToLeft();
double direction = aTextRun->GetDirection();
// Current position in appunits // Current position in appunits
const gfxFont::Metrics& fontMetrics = GetMetrics(); const gfxFont::Metrics& fontMetrics = GetMetrics();
RunMetrics metrics; RunMetrics metrics;
metrics.mAscent = fontMetrics.maxAscent*appUnitsPerDevUnit; metrics.mAscent = fontMetrics.maxAscent*appUnitsPerDevUnit;
metrics.mDescent = fontMetrics.maxDescent*appUnitsPerDevUnit; metrics.mDescent = fontMetrics.maxDescent*appUnitsPerDevUnit;
if (!aTightBoundingBox) { metrics.mAdvanceWidth = 0;
if (aTightBoundingBox) {
metrics.mBoundingBox = gfxRect(0, 0, 0, 0);
} else {
metrics.mBoundingBox = gfxRect(0, -metrics.mAscent, 0, metrics.mAscent + metrics.mDescent); metrics.mBoundingBox = gfxRect(0, -metrics.mAscent, 0, metrics.mAscent + metrics.mDescent);
} }
if (aStart == aEnd) {
// exit now before we look at aSpacing[0], which is undefined
return metrics;
}
const gfxTextRun::CompressedGlyph *charGlyphs = aTextRun->GetCharacterGlyphs();
PRBool isRTL = aTextRun->IsRightToLeft();
double direction = aTextRun->GetDirection();
gfxGlyphExtents *extents = gfxGlyphExtents *extents =
(!aTightBoundingBox && !NeedsGlyphExtents(aTextRun) && !aTextRun->HasDetailedGlyphs()) ? nsnull (!aTightBoundingBox && !NeedsGlyphExtents(aTextRun) && !aTextRun->HasDetailedGlyphs()) ? nsnull
: GetOrCreateGlyphExtents(aTextRun->GetAppUnitsPerDevUnit()); : GetOrCreateGlyphExtents(aTextRun->GetAppUnitsPerDevUnit());