From bc455f0e52aed6773d97aa0d5793713c46271536 Mon Sep 17 00:00:00 2001 From: Hiroyuki Ikezoe Date: Mon, 28 Jan 2019 21:48:30 +0000 Subject: [PATCH] Bug 1522724 - Don't clobber visualScrollOffsetUpdate flag if the visual scroll update is higher priority. r=kats,botond We need to do both of updates in the case where both updates in the same transaction. Differential Revision: https://phabricator.services.mozilla.com/D17582 --HG-- extra : moz-landing-system : lando --- gfx/layers/apz/src/AsyncPanZoomController.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gfx/layers/apz/src/AsyncPanZoomController.cpp b/gfx/layers/apz/src/AsyncPanZoomController.cpp index 6c943eb6c927..b2f6ca39288a 100644 --- a/gfx/layers/apz/src/AsyncPanZoomController.cpp +++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp @@ -4285,7 +4285,9 @@ void AsyncPanZoomController::NotifyLayersUpdated( // locations (via e.g. both updates being eRestore). bool visualScrollOffsetUpdated = aLayerMetrics.GetVisualScrollUpdateType() != FrameMetrics::eNone; - if (aLayerMetrics.GetScrollUpdateType() == FrameMetrics::eMainThread || + if ((aLayerMetrics.GetScrollUpdateType() == FrameMetrics::eMainThread && + aLayerMetrics.GetVisualScrollUpdateType() != + FrameMetrics::eMainThread) || smoothScrollRequested) { visualScrollOffsetUpdated = false; }