Bug 846971 - Don't create layers that are scaled to 0. r=roc
authorMatt Woodrow <mwoodrow@mozilla.com>
Wed, 06 Mar 2013 09:04:40 +1300
changeset 124162 4b1dd2c08d8da47b4a0118fdd313140317e3fa23
parent 124161 f505903671a7a940a50c592ea7b3be563777ad18
child 124163 b1557651f08a3d941895ae400da55d386a0f4deb
push id24408
push userryanvm@gmail.com
push dateFri, 08 Mar 2013 04:58:11 +0000
treeherdermozilla-central@cb432984d5ce [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs846971
milestone22.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 846971 - Don't create layers that are scaled to 0. r=roc
layout/base/FrameLayerBuilder.cpp
--- a/layout/base/FrameLayerBuilder.cpp
+++ b/layout/base/FrameLayerBuilder.cpp
@@ -2851,16 +2851,20 @@ FrameLayerBuilder::BuildContainerLayerFo
 {
   uint32_t containerDisplayItemKey =
     aContainerItem ? aContainerItem->GetPerFrameKey() : nsDisplayItem::TYPE_ZERO;
   NS_ASSERTION(aContainerFrame, "Container display items here should have a frame");
   NS_ASSERTION(!aContainerItem ||
                aContainerItem->GetUnderlyingFrame() == aContainerFrame,
                "Container display item must match given frame");
 
+  if (!aParameters.mXScale || !aParameters.mYScale) {
+    return nullptr;
+  }
+
   nsRefPtr<ContainerLayer> containerLayer;
   if (aManager == mRetainingManager) {
     // Using GetOldLayerFor will search merged frames, as well as the underlying
     // frame. The underlying frame can change when a page scrolls, so this
     // avoids layer recreation in the situation that a new underlying frame is
     // picked for a layer.
     Layer* oldLayer = nullptr;
     if (aContainerItem) {