Bug 1289322 - Link clicking is detected in the wrong location. r=kats, a=lizzard
authorRandall Barker <rbarker@mozilla.com>
Tue, 12 Jul 2016 12:39:38 -0700
changeset 342353 00cc1779c7d78eebf36c67516100b7d93b3a099e
parent 342352 1d80b9b0c4d971934232aafd061b0ba7a8d08a21
child 342354 ccb0adb99c96ed3a67c7a48c8a92c3259436c973
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats, lizzard
bugs1289322
milestone49.0
Bug 1289322 - Link clicking is detected in the wrong location. r=kats, a=lizzard
gfx/layers/apz/util/APZCCallbackHelper.cpp
--- a/gfx/layers/apz/util/APZCCallbackHelper.cpp
+++ b/gfx/layers/apz/util/APZCCallbackHelper.cpp
@@ -164,17 +164,17 @@ ScrollFrame(nsIContent* aContent,
   // input events to compensate.
   // Note that if the main-thread had a change in its scroll position, we don't
   // want to record that difference here, because it can be large and throw off
   // input events by a large amount. It is also going to be transient, because
   // any main-thread scroll position change will be synced to APZ and we will
   // get another repaint request when APZ confirms. In the interval while this
   // is happening we can just leave the callback transform as it was.
   bool mainThreadScrollChanged =
-    sf && sf->CurrentScrollGeneration() != aMetrics.GetScrollGeneration();
+    sf && sf->CurrentScrollGeneration() != aMetrics.GetScrollGeneration() && nsLayoutUtils::CanScrollOriginClobberApz(sf->LastScrollOrigin());
   if (aContent && !mainThreadScrollChanged) {
     CSSPoint scrollDelta = apzScrollOffset - actualScrollOffset;
     aContent->SetProperty(nsGkAtoms::apzCallbackTransform, new CSSPoint(scrollDelta),
                           nsINode::DeleteProperty<CSSPoint>);
   }
 }
 
 static void