Bug 821995 - Revert an incorrect change to matrix multiplication in ChooseScaleAndSetTransform. r=roc, a=bajaj
authorMatt Woodrow <mwoodrow@mozilla.com>
Tue, 18 Dec 2012 18:58:44 +1300
changeset 122579 9c6d54fa7bdeac189ced2cc9d8db02e19cb147ae
parent 122576 6e6fb2828156741494826737bb2887bfe5e1e8f4
child 122580 6b8f1007e2f85f22ebc4fd93c9602a9ac01e3f9f
push id2027
push userryanvm@gmail.com
push dateSun, 13 Jan 2013 16:09:37 +0000
treeherdermozilla-beta@75e3211747e1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc, bajaj
bugs821995
milestone19.0
Bug 821995 - Revert an incorrect change to matrix multiplication in ChooseScaleAndSetTransform. r=roc, a=bajaj
layout/base/FrameLayerBuilder.cpp
--- a/layout/base/FrameLayerBuilder.cpp
+++ b/layout/base/FrameLayerBuilder.cpp
@@ -2733,19 +2733,17 @@ ChooseScaleAndSetTransform(FrameLayerBui
     // for a css transform would have 0,0 as their offset to the reference frame, so this doesn't
     // matter.
     nsPoint appUnitOffset = aDisplayListBuilder->ToReferenceFrame(aContainerFrame);
     nscoord appUnitsPerDevPixel = aContainerFrame->PresContext()->AppUnitsPerDevPixel();
     offset = nsIntPoint(
         int32_t(NSAppUnitsToDoublePixels(appUnitOffset.x, appUnitsPerDevPixel)*aIncomingScale.mXScale),
         int32_t(NSAppUnitsToDoublePixels(appUnitOffset.y, appUnitsPerDevPixel)*aIncomingScale.mYScale));
   }
-  transform = gfx3DMatrix::Translation(aIncomingScale.mOffset.x, aIncomingScale.mOffset.y, 0) * 
-              transform * 
-              gfx3DMatrix::Translation(offset.x, offset.y, 0);
+  transform = transform * gfx3DMatrix::Translation(offset.x + aIncomingScale.mOffset.x, offset.y + aIncomingScale.mOffset.y, 0);
 
 
   bool canDraw2D = transform.CanDraw2D(&transform2d);
   gfxSize scale;
   bool isRetained = aLayer->Manager()->IsWidgetLayerManager();
   // Only fiddle with scale factors for the retaining layer manager, since
   // it only matters for retained layers
   // XXX Should we do something for 3D transforms?