Bug 1022612. Part 18: When ComputeVisibility returns false, RecomputeVisibility should avoid painting the item. r=mattwoodrow
☠☠ backed out by 572653d0538e ☠ ☠
authorRobert O'Callahan <robert@ocallahan.org>
Fri, 20 Jun 2014 17:24:31 +1200
changeset 215929 376c45f4d905aff7b1f4161fd6bf8a52c7b286ba
parent 215928 549e3cb9e1118b1e26d48e3d637c961c51644380
child 215930 b4b6049145dcca3aef82b3514cf023d5c5b458b7
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [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
@@ -1732,18 +1732,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)