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
--- 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);