Bug 615714. When computing visibility of display lists we don't need a underlying frame to consider items opaque. r=roc a=bzbarsky
authorTimothy Nikkel <tnikkel@gmail.com>
Thu, 09 Dec 2010 22:33:34 -0600
changeset 59057 a7fc3787c93564e8efc4a6aa4addfe3b2282e521
parent 59056 5eaab51cd9374e956cca7bd057680d16d58f12af
child 59058 8be85c96f56053bf0adeef3a2a574f67344ba64c
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
reviewersroc, bzbarsky
bugs615714
milestone2.0b8pre
Bug 615714. When computing visibility of display lists we don't need a underlying frame to consider items opaque. r=roc a=bzbarsky
layout/base/nsDisplayList.cpp
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -355,19 +355,18 @@ nsDisplayList::ComputeVisibilityForSubli
     nsRect bounds = item->GetBounds(aBuilder);
 
     nsRegion itemVisible;
     itemVisible.And(*aVisibleRegion, bounds);
     item->mVisibleRect = itemVisible.GetBounds();
 
     if (item->ComputeVisibility(aBuilder, aVisibleRegion)) {
       anyVisible = PR_TRUE;
-      nsIFrame* f = item->GetUnderlyingFrame();
       PRBool transparentBackground = PR_FALSE;
-      if (TreatAsOpaque(item, aBuilder, &transparentBackground) && f) {
+      if (TreatAsOpaque(item, aBuilder, &transparentBackground)) {
         // Subtract opaque item from the visible region
         aBuilder->SubtractFromVisibleRegion(aVisibleRegion, nsRegion(bounds));
       }
       forceTransparentSurface = forceTransparentSurface || transparentBackground;
     }
     AppendToBottom(item);
   }