зеркало из https://github.com/mozilla/gecko-dev.git
Now that overflow areas are split, change nsIFrame::ComputeTightBounds to use visual overflow. While it really only needs to include frame bounds, glyph bounds, and text decorations, since glyph bounds are not part of scrollable overflow, it must use visual overflow. (Bug 542595, patch 15) r=roc a2.0=blocking2.0:beta8
This commit is contained in:
Родитель
f2d0213cb0
Коммит
44ad3bb392
|
@ -834,7 +834,7 @@ nsBlockFrame::ComputeTightBounds(gfxContext* aContext) const
|
|||
{
|
||||
// be conservative
|
||||
if (GetStyleContext()->HasTextDecorations())
|
||||
return GetOverflowRect();
|
||||
return GetVisualOverflowRect();
|
||||
return ComputeSimpleTightBounds(aContext);
|
||||
}
|
||||
|
||||
|
|
|
@ -3439,7 +3439,7 @@ nsFrame::ComputeSize(nsIRenderingContext *aRenderingContext,
|
|||
nsRect
|
||||
nsIFrame::ComputeTightBounds(gfxContext* aContext) const
|
||||
{
|
||||
return GetOverflowRect();
|
||||
return GetVisualOverflowRect();
|
||||
}
|
||||
|
||||
nsRect
|
||||
|
@ -3450,7 +3450,7 @@ nsFrame::ComputeSimpleTightBounds(gfxContext* aContext) const
|
|||
GetStyleDisplay()->mAppearance) {
|
||||
// Not necessarily tight, due to clipping, negative
|
||||
// outline-offset, and lots of other issues, but that's OK
|
||||
return GetOverflowRect();
|
||||
return GetVisualOverflowRect();
|
||||
}
|
||||
|
||||
nsRect r(0, 0, 0, 0);
|
||||
|
|
|
@ -1586,6 +1586,11 @@ public:
|
|||
* that encloses the pixels that are actually drawn. We're allowed to be
|
||||
* conservative and currently we don't try very hard. The rectangle is
|
||||
* in appunits and relative to the origin of this frame.
|
||||
*
|
||||
* This probably only needs to include frame bounds, glyph bounds, and
|
||||
* text decorations, but today it sometimes includes other things that
|
||||
* contribute to visual overflow.
|
||||
*
|
||||
* @param aContext a rendering context that can be used if we need
|
||||
* to do measurement
|
||||
*/
|
||||
|
|
|
@ -231,7 +231,7 @@ nsInlineFrame::ComputeTightBounds(gfxContext* aContext) const
|
|||
{
|
||||
// be conservative
|
||||
if (GetStyleContext()->HasTextDecorations())
|
||||
return GetOverflowRect();
|
||||
return GetVisualOverflowRect();
|
||||
return ComputeSimpleTightBounds(aContext);
|
||||
}
|
||||
|
||||
|
|
|
@ -6075,7 +6075,7 @@ nsTextFrame::ComputeTightBounds(gfxContext* aContext) const
|
|||
eCompatibility_NavQuirks == PresContext()->CompatibilityMode()) ||
|
||||
(GetStateBits() & TEXT_HYPHEN_BREAK)) {
|
||||
// This is conservative, but OK.
|
||||
return GetOverflowRect();
|
||||
return GetVisualOverflowRect();
|
||||
}
|
||||
|
||||
gfxSkipCharsIterator iter = const_cast<nsTextFrame*>(this)->EnsureTextRun();
|
||||
|
|
Загрузка…
Ссылка в новой задаче