Bug 810275 - Remove the inactive layer tree offset when compute the active scrolled root position. r=roc
authorMatt Woodrow <mwoodrow@mozilla.com>
Thu, 22 Nov 2012 18:33:37 +1300
changeset 114050 4d2479573ecdeb3d622a2f5c324a8e245aef6264
parent 114049 a2858a64fe77536590e4b5b943b226ff5fc5e7db
child 114051 daa8d72e3e9185461758d3ebe4713a40139b21b9
push id18519
push usermwoodrow@mozilla.com
push dateFri, 23 Nov 2012 00:28:45 +0000
treeherdermozilla-inbound@daa8d72e3e91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs810275
milestone20.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 810275 - Remove the inactive layer tree offset when compute the active scrolled root position. r=roc
layout/base/FrameLayerBuilder.cpp
--- a/layout/base/FrameLayerBuilder.cpp
+++ b/layout/base/FrameLayerBuilder.cpp
@@ -1402,17 +1402,17 @@ ContainerState::CreateOrRecycleThebesLay
   gfxMatrix matrix;
   matrix.Translate(gfxPoint(pixOffset.x, pixOffset.y));
   layer->SetBaseTransform(gfx3DMatrix::From2D(matrix));
 
   // FIXME: Temporary workaround for bug 681192 and bug 724786.
 #ifndef MOZ_ANDROID_OMTC
   // Calculate exact position of the top-left of the active scrolled root.
   // This might not be 0,0 due to the snapping in ScaleToNearestPixels.
-  gfxPoint activeScrolledRootTopLeft = scaledOffset - matrix.GetTranslation();
+  gfxPoint activeScrolledRootTopLeft = scaledOffset - matrix.GetTranslation() + mParameters.mOffset;
   // If it has changed, then we need to invalidate the entire layer since the
   // pixels in the layer buffer have the content at a (subpixel) offset
   // from what we need.
   if (!activeScrolledRootTopLeft.WithinEpsilonOf(data->mActiveScrolledRootPosition, SUBPIXEL_OFFSET_EPSILON)) {
     data->mActiveScrolledRootPosition = activeScrolledRootTopLeft;
     InvalidateEntireThebesLayer(layer, aActiveScrolledRoot);
   } else if (didResetScrollPositionForLayerPixelAlignment) {
     data->mActiveScrolledRootPosition = activeScrolledRootTopLeft;