Bug 1242690 - Don't apply the main-thread callback transform for events in a drag block. r=rbarker
authorKartikaya Gupta <kgupta@mozilla.com>
Thu, 10 Mar 2016 18:25:49 -0500
changeset 288134 1d931aacb06118b0c182fea0d6d3d529b380cdb6
parent 288133 fd968c710a39ca00cd06ee94dad35179501e42f0
child 288135 e0a4ca7f68a1205c63144acb7ba2dd9769ab5180
push id73317
push userkgupta@mozilla.com
push dateThu, 10 Mar 2016 23:26:59 +0000
treeherdermozilla-inbound@1d931aacb061 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrbarker
bugs1242690
milestone48.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 1242690 - Don't apply the main-thread callback transform for events in a drag block. r=rbarker MozReview-Commit-ID: 9C471AJaKjt
gfx/layers/apz/src/APZCTreeManager.cpp
--- a/gfx/layers/apz/src/APZCTreeManager.cpp
+++ b/gfx/layers/apz/src/APZCTreeManager.cpp
@@ -713,16 +713,22 @@ APZCTreeManager::ReceiveInputEvent(Input
           ScreenToParentLayerMatrix4x4 transformToApzc = GetScreenToApzcTransform(apzc);
           ParentLayerToScreenMatrix4x4 transformToGecko = GetApzcToGeckoTransform(apzc);
           ScreenToScreenMatrix4x4 outTransform = transformToApzc * transformToGecko;
           Maybe<ScreenPoint> untransformedRefPoint = UntransformBy(
             outTransform, mouseInput.mOrigin);
           if (untransformedRefPoint) {
             mouseInput.mOrigin = *untransformedRefPoint;
           }
+        } else {
+          // Likewise, if the input was targeted at a scrollbar, we don't want to
+          // apply the callback transform in the main thread, so we remove the
+          // scrollid from the guid. We need to keep the layersId intact so
+          // that the response from the child process doesn't get discarded.
+          aOutTargetGuid->mScrollId = FrameMetrics::NULL_SCROLL_ID;
         }
       }
       break;
     } case SCROLLWHEEL_INPUT: {
       FlushRepaintsToClearScreenToGeckoTransform();
 
       ScrollWheelInput& wheelInput = aEvent.AsScrollWheelInput();