Bug 421353 - "Moving the mouse over text hyperlinks which become underlined spikes cpu usage" (Fix incorrect use of units in previous patch) [p=reg@openpave.org (Jeremy Lea) r+sr=roc a1.9=beltzner]
git-svn-id: svn://10.0.0.236/trunk@249605 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
34ed6bc6f5
commit
b3191d6a01
@ -4929,16 +4929,6 @@ FindFirstLetterRange(const nsTextFragment* aFrag,
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
static nsRect ConvertGfxRectOutward(const gfxRect& aRect)
|
||||
{
|
||||
nsRect r;
|
||||
r.x = NSToCoordFloor(aRect.X());
|
||||
r.y = NSToCoordFloor(aRect.Y());
|
||||
r.width = NSToCoordCeil(aRect.XMost()) - r.x;
|
||||
r.height = NSToCoordCeil(aRect.YMost()) - r.y;
|
||||
return r;
|
||||
}
|
||||
|
||||
static PRUint32
|
||||
FindStartAfterSkippingWhitespace(PropertyProvider* aProvider,
|
||||
nsIFrame::InlineIntrinsicWidthData* aData,
|
||||
@ -5587,8 +5577,7 @@ nsTextFrame::Reflow(nsPresContext* aPresContext,
|
||||
mAscent = aMetrics.ascent;
|
||||
|
||||
// Handle text that runs outside its normal bounds.
|
||||
nsRect boundingBox =
|
||||
ConvertGfxRectOutward(textMetrics.mBoundingBox + gfxPoint(0, mAscent));
|
||||
nsRect boundingBox = RoundOut(textMetrics.mBoundingBox) + nsPoint(0, mAscent);
|
||||
aMetrics.mOverflowArea.UnionRect(boundingBox,
|
||||
nsRect(0, 0, aMetrics.width, aMetrics.height));
|
||||
|
||||
@ -5812,8 +5801,7 @@ nsTextFrame::RecomputeOverflowRect()
|
||||
ComputeTransformedLength(provider), PR_FALSE, nsnull,
|
||||
&provider);
|
||||
|
||||
nsRect boundingBox =
|
||||
ConvertGfxRectOutward(textMetrics.mBoundingBox + gfxPoint(0, mAscent));
|
||||
nsRect boundingBox = RoundOut(textMetrics.mBoundingBox) + nsPoint(0, mAscent);
|
||||
boundingBox.UnionRect(boundingBox,
|
||||
nsRect(nsPoint(0,0), GetSize()));
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user