bug 750334 - rotating image appears too big during transition, then snaps to correct size r=roc a=blocking-fennec1.0
authorMatt Woodrow <mwoodrow@mozilla.com>
Tue, 15 May 2012 10:31:39 +1200
changeset 94385 4f318c1fea777e6469b6ce6ff9fb5bfd903d51af
parent 94384 a5bae202976b134b29ced766048b16e98073393b
child 94386 efe05056199fb9159c07717de7ae4dc74e5ad62e
push id1371
push userjdrew@mozilla.com
push dateFri, 25 May 2012 19:07:06 +0000
treeherdermozilla-aurora@4f318c1fea77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc, blocking-fennec1
bugs750334
milestone14.0a2
bug 750334 - rotating image appears too big during transition, then snaps to correct size r=roc a=blocking-fennec1.0
layout/base/FrameLayerBuilder.cpp
--- a/layout/base/FrameLayerBuilder.cpp
+++ b/layout/base/FrameLayerBuilder.cpp
@@ -1026,22 +1026,20 @@ ContainerState::PopThebesLayerData()
   if ((data->mIsSolidColorInVisibleRegion || imageContainer) &&
       data->mLayer->GetValidRegion().IsEmpty()) {
     NS_ASSERTION(!(data->mIsSolidColorInVisibleRegion && imageContainer),
                  "Can't be a solid color as well as an image!");
     if (imageContainer) {
       nsRefPtr<ImageLayer> imageLayer = CreateOrRecycleImageLayer();
       imageLayer->SetContainer(imageContainer);
       data->mImage->ConfigureLayer(imageLayer);
-      if (mParameters.mInActiveTransformedSubtree) {
-        // The layer's current transform is applied first, then the result is scaled.
-        gfx3DMatrix transform = imageLayer->GetTransform()*
-          gfx3DMatrix::ScalingMatrix(mParameters.mXScale, mParameters.mYScale, 1.0f);
-        imageLayer->SetTransform(transform);
-      }
+      // The layer's current transform is applied first, then the result is scaled.
+      gfx3DMatrix transform = imageLayer->GetTransform()*
+        gfx3DMatrix::ScalingMatrix(mParameters.mXScale, mParameters.mYScale, 1.0f);
+      imageLayer->SetTransform(transform);
       NS_ASSERTION(data->mImageClip.mRoundedClipRects.IsEmpty(),
                    "How did we get rounded clip rects here?");
       if (data->mImageClip.mHaveClipRect) {
         nsIntRect clip = ScaleToNearestPixels(data->mImageClip.mClipRect);
         imageLayer->IntersectClipRect(clip);
       }
       layer = imageLayer;
     } else {