Bug 592131. Don't propagate invalidations across document boundaries where the child document's docshell is inactive (e.g., a hidden tab). r=tnikkel,a=blocking

--HG--
extra : rebase_source : 468f5fab9b2a50f515d50e147fb79bdb8d6a845c
This commit is contained in:
Robert O'Callahan 2010-08-31 17:02:08 +12:00
Родитель 6bb1b5d4f8
Коммит 2f81729760
2 изменённых файлов: 6 добавлений и 3 удалений

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

@ -7189,7 +7189,7 @@ PresShell::IsVisible()
NS_IMETHODIMP_(PRBool) NS_IMETHODIMP_(PRBool)
PresShell::ShouldIgnoreInvalidation() PresShell::ShouldIgnoreInvalidation()
{ {
return mPaintingSuppressed; return mPaintingSuppressed || !mIsActive;
} }
NS_IMETHODIMP_(void) NS_IMETHODIMP_(void)

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

@ -361,7 +361,8 @@ ViewportFrame::InvalidateInternal(const nsRect& aDamageRect,
PRUint32 aFlags) PRUint32 aFlags)
{ {
nsRect r = aDamageRect + nsPoint(aX, aY); nsRect r = aDamageRect + nsPoint(aX, aY);
PresContext()->NotifyInvalidation(r, aFlags); nsPresContext* presContext = PresContext();
presContext->NotifyInvalidation(r, aFlags);
if ((mState & NS_FRAME_HAS_CONTAINER_LAYER) && if ((mState & NS_FRAME_HAS_CONTAINER_LAYER) &&
!(aFlags & INVALIDATE_NO_THEBES_LAYERS)) { !(aFlags & INVALIDATE_NO_THEBES_LAYERS)) {
@ -372,8 +373,10 @@ ViewportFrame::InvalidateInternal(const nsRect& aDamageRect,
nsIFrame* parent = nsLayoutUtils::GetCrossDocParentFrame(this); nsIFrame* parent = nsLayoutUtils::GetCrossDocParentFrame(this);
if (parent) { if (parent) {
if (!presContext->PresShell()->IsActive())
return;
nsPoint pt = -parent->GetOffsetToCrossDoc(this); nsPoint pt = -parent->GetOffsetToCrossDoc(this);
PRInt32 ourAPD = PresContext()->AppUnitsPerDevPixel(); PRInt32 ourAPD = presContext->AppUnitsPerDevPixel();
PRInt32 parentAPD = parent->PresContext()->AppUnitsPerDevPixel(); PRInt32 parentAPD = parent->PresContext()->AppUnitsPerDevPixel();
r = r.ConvertAppUnitsRoundOut(ourAPD, parentAPD); r = r.ConvertAppUnitsRoundOut(ourAPD, parentAPD);
parent->InvalidateInternal(r, pt.x, pt.y, this, parent->InvalidateInternal(r, pt.x, pt.y, this,