Bug 1366365 - Request a repaint in AsyncPanZoomController::HandleDragEvent() if we're no longer able to drag because the content changed from under us. r=kats draft
authorBotond Ballo <botond@mozilla.com>
Fri, 19 May 2017 15:55:17 -0400
changeset 581386 b4ce99173ba291d875d5e40a12c7990e6a2d19b7
parent 581385 8bbf626d8797f1c029623dde461919a15a2d5ebc
child 629568 7bb8ee45ec1b82c491f25520b53fc9dec289d46c
push id59859
push userbballo@mozilla.com
push dateFri, 19 May 2017 20:01:21 +0000
reviewerskats
bugs1366365
milestone55.0a1
Bug 1366365 - Request a repaint in AsyncPanZoomController::HandleDragEvent() if we're no longer able to drag because the content changed from under us. r=kats MozReview-Commit-ID: 61hufCzicDs
gfx/layers/apz/src/AsyncPanZoomController.cpp
--- a/gfx/layers/apz/src/AsyncPanZoomController.cpp
+++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp
@@ -903,16 +903,20 @@ nsEventStatus AsyncPanZoomController::Ha
 
   if (aEvent.mType != MouseInput::MouseType::MOUSE_MOVE) {
     return nsEventStatus_eConsumeNoDefault;
   }
 
   RefPtr<HitTestingTreeNode> node =
     GetApzcTreeManager()->FindScrollThumbNode(aDragMetrics);
   if (!node) {
+    // One possible reason why we couldn't find the scroll thumb node is that
+    // the page content has changed from under us. In such a case, request a
+    // repaint to make sure the new page content is shown.
+    ScheduleCompositeAndMaybeRepaint();
     return nsEventStatus_eConsumeNoDefault;
   }
 
   const ScrollThumbData& thumbData = node->GetScrollThumbData();
 
   mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS,
       (uint32_t) ScrollInputMethod::ApzScrollbarDrag);