Bug 1160250 - Put in a missing transfomToAncestor scaling factor. r=botond,tn
authorKartikaya Gupta <kgupta@mozilla.com>
Thu, 07 May 2015 14:44:02 -0400
changeset 242820 0c9790f3db34ef8c4d18183ed19f4d84d6b22cb8
parent 242819 c997b5af752d5f058b81bd0fcf074d0f92f3503a
child 242821 03152183293a551a00543001e38fe7481febd686
push id59523
push userkgupta@mozilla.com
push dateThu, 07 May 2015 18:44:18 +0000
treeherdermozilla-inbound@bec29299cb7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbotond, tn
bugs1160250
milestone40.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 1160250 - Put in a missing transfomToAncestor scaling factor. r=botond,tn
layout/base/nsLayoutUtils.cpp
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -7687,20 +7687,21 @@ nsLayoutUtils::CalculateCompositionSizeF
 
   nsPresContext* presContext = aFrame->PresContext();
   nsIPresShell* presShell = presContext->PresShell();
 
   bool isRootContentDocRootScrollFrame = presContext->IsRootContentDocument()
                                       && aFrame == presShell->GetRootScrollFrame();
   if (isRootContentDocRootScrollFrame) {
     ParentLayerRect compBounds;
-    // TODO: The UpdateCompositionBoundsForRCDRSF below doesn't take into
-    // account the mTransformScale as part of the LayerToParentLayerScale.
+    LayoutDeviceToLayerScale2D cumulativeResolution(
+        presShell->GetCumulativeResolution()
+      * nsLayoutUtils::GetTransformToAncestorScale(aFrame));
     if (UpdateCompositionBoundsForRCDRSF(compBounds, presContext, aFrame->GetRect(),
-        false, LayoutDeviceToParentLayerScale2D(presShell->GetCumulativeResolution()))) {
+        false, cumulativeResolution)) {
       int32_t auPerDevPixel = presContext->AppUnitsPerDevPixel();
       size = nsSize(compBounds.width * auPerDevPixel, compBounds.height * auPerDevPixel);
     }
   }
 
   if (aSubtractScrollbars && DeflateScrollbarAreaFromCompositionBoundsFor(aFrame)) {
     MOZ_ASSERT(scrollableFrame);
     nsMargin margins = scrollableFrame->GetActualScrollbarSizes();