Bug 585258. Part 1: Don't make visible region arbitrarily complex in RecomputeVisibility. r=dbaron,a=blocking
authorRobert O'Callahan <robert@ocallahan.org>
Tue, 04 Jan 2011 21:45:24 +1300
changeset 59825 35013af94ec7715e0d0387c6fa19c435bcaf7736
parent 59824 aa5e8e362cb2e02209767833ec7e5a215b713230
child 59826 c3825c079c0051dc199e6dc960567385e46755a2
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
reviewersdbaron, blocking
bugs585258
milestone2.0b9pre
Bug 585258. Part 1: Don't make visible region arbitrarily complex in RecomputeVisibility. r=dbaron,a=blocking
layout/base/nsDisplayList.cpp
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -698,17 +698,17 @@ PRBool nsDisplayItem::RecomputeVisibilit
   itemVisible.And(*aVisibleRegion, bounds);
   mVisibleRect = itemVisible.GetBounds();
 
   if (!ComputeVisibility(aBuilder, aVisibleRegion))
     return PR_FALSE;
 
   PRBool forceTransparentBackground;
   nsRegion opaque = TreatAsOpaque(this, aBuilder, &forceTransparentBackground);
-  aVisibleRegion->Sub(*aVisibleRegion, opaque);
+  aBuilder->SubtractFromVisibleRegion(aVisibleRegion, opaque);
   return PR_TRUE;
 }
 
 void nsDisplaySolidColor::Paint(nsDisplayListBuilder* aBuilder,
                                 nsIRenderingContext* aCtx) {
   aCtx->SetColor(mColor);
   aCtx->FillRect(mVisibleRect);
 }