Bug 1022612. Part 18: When ComputeVisibility returns false, RecomputeVisibility should avoid painting the item. r=mattwoodrow
authorRobert O'Callahan <robert@ocallahan.org>
Fri, 20 Jun 2014 17:24:31 +1200
changeset 215942 bfc64afa1c1ac8b41404cec4c17d68c3772bc0a3
parent 215941 c15aca57456725acac7ec43f5b52ecf6df60a821
child 215943 58d7c85b017e6ff1f5fce7198332230aba87095d
push id3857
push userraliiev@mozilla.com
push dateTue, 02 Sep 2014 16:39:23 +0000
treeherdermozilla-beta@5638b907b505 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1022612
milestone33.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1022612. Part 18: When ComputeVisibility returns false, RecomputeVisibility should avoid painting the item. r=mattwoodrow
layout/base/nsDisplayList.cpp
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -1738,18 +1738,20 @@ nsDisplayItem::RecomputeVisibility(nsDis
 
   nsRegion itemVisible;
   itemVisible.And(*aVisibleRegion, bounds);
   mVisibleRect = itemVisible.GetBounds();
 
   // When we recompute visibility within layers we don't need to
   // expand the visible region for content behind plugins (the plugin
   // is not in the layer).
-  if (!ComputeVisibility(aBuilder, aVisibleRegion, nsRect()))
+  if (!ComputeVisibility(aBuilder, aVisibleRegion, nsRect())) {
+    mVisibleRect = nsRect();
     return false;
+  }
 
   nsRegion opaque = TreatAsOpaque(this, aBuilder);
   aBuilder->SubtractFromVisibleRegion(aVisibleRegion, opaque);
   return true;
 }
 
 nsRect
 nsDisplayItem::GetClippedBounds(nsDisplayListBuilder* aBuilder)