Bug 735141. Clear imageContainer to indicate that we're not using that optimization. r=tnikkel,a=akeybl
authorRobert O'Callahan <robert@ocallahan.org>
Mon, 19 Mar 2012 20:26:39 +1300
changeset 91867 ed87206d099a12c8030c19270b6f415d1c38fe4a
parent 91866 15924311257a29c8b89021e0612cf070d34b4da7
child 91868 f11042d416a09cddba479dc265dc8885250d5570
push idunknown
push userunknown
push dateunknown
reviewerstnikkel, akeybl
bugs735141
milestone13.0a2
Bug 735141. Clear imageContainer to indicate that we're not using that optimization. r=tnikkel,a=akeybl
layout/base/FrameLayerBuilder.cpp
layout/reftests/scrolling/image-1.html
layout/reftests/scrolling/reftest.list
--- a/layout/base/FrameLayerBuilder.cpp
+++ b/layout/base/FrameLayerBuilder.cpp
@@ -1039,24 +1039,25 @@ ContainerState::PopThebesLayerData()
     mNewChildLayers.InsertElementAt(index + 1, layer);
 
     // Hide the ThebesLayer. We leave it in the layer tree so that we
     // can find and recycle it later.
     data->mLayer->IntersectClipRect(nsIntRect());
     data->mLayer->SetVisibleRegion(nsIntRegion());
   } else {
     layer = data->mLayer;
+    imageContainer = nsnull;
   }
 
   gfxMatrix transform;
   if (!layer->GetTransform().Is2D(&transform)) {
     NS_ERROR("Only 2D transformations currently supported");
   }
   
-  //ImageLayers are already configured with a visible region
+  // ImageLayers are already configured with a visible region
   if (!imageContainer) {
     NS_ASSERTION(!transform.HasNonIntegerTranslation(),
                  "Matrix not just an integer translation?");
     // Convert from relative to the container to relative to the
     // ThebesLayer itself.
     nsIntRegion rgn = data->mVisibleRegion;
     rgn.MoveBy(-nsIntPoint(PRInt32(transform.x0), PRInt32(transform.y0)));
     layer->SetVisibleRegion(rgn);
new file mode 100644
--- /dev/null
+++ b/layout/reftests/scrolling/image-1.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<div style="height:300px; overflow:hidden" class="scrollTop">
+  <div style="height:5px; background:yellow;"></div>
+  <img style="display:block" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAMgAQMAAACj7s1kAAAAA1BMVEWAAABGTyZaAAAANElEQVR4nO3BAQEAAACCIP+vbkhAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAfBl54AAB4qBHuAAAAABJRU5ErkJggg==">
+</div>
+<script src="scrolling.js"></script>
+</body>
+</html>
--- a/layout/reftests/scrolling/reftest.list
+++ b/layout/reftests/scrolling/reftest.list
@@ -1,14 +1,15 @@
 HTTP == fixed-1.html fixed-1.html?ref
 HTTP == fixed-opacity-1.html fixed-opacity-1.html?ref
 HTTP == fixed-opacity-2.html fixed-opacity-2.html?ref
 HTTP == fixed-text-1.html fixed-text-1.html?ref
 HTTP == fixed-text-2.html fixed-text-2.html?ref
 == iframe-border-radius.html iframe-border-radius-ref.html
+random-if(Android) HTTP == image-1.html image-1.html?ref
 HTTP == opacity-mixed-scrolling-1.html opacity-mixed-scrolling-1.html?ref
 random-if(cocoaWidget) HTTP == opacity-mixed-scrolling-2.html opacity-mixed-scrolling-2.html?ref # see bug 625357
 HTTP == simple-1.html simple-1.html?ref
 HTTP == text-1.html text-1.html?ref
 HTTP == transformed-1.html transformed-1.html?ref
 HTTP == transformed-1.html?up transformed-1.html?ref
 == uncovering-1.html uncovering-1-ref.html
 == uncovering-2.html uncovering-2-ref.html