From 4abbad51c72b7cbc94cb6a7a7e3d883d128c35f0 Mon Sep 17 00:00:00 2001 From: Botond Ballo Date: Mon, 4 Dec 2023 01:51:12 +0000 Subject: [PATCH] Bug 1846935 - Use FuzzyEqualsCoordinate in the computation of userScrolled. r=hiro Differential Revision: https://phabricator.services.mozilla.com/D193393 --- gfx/layers/apz/src/AsyncPanZoomController.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gfx/layers/apz/src/AsyncPanZoomController.cpp b/gfx/layers/apz/src/AsyncPanZoomController.cpp index 5ae39a4ec476..c49735f652da 100644 --- a/gfx/layers/apz/src/AsyncPanZoomController.cpp +++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp @@ -5314,10 +5314,11 @@ void AsyncPanZoomController::NotifyLayersUpdated( // XXX Suspicious comparison between layout and visual scroll offsets. // This may not do the right thing when we're zoomed in. CSSPoint lastScrollOffset = mLastContentPaintMetrics.GetLayoutScrollOffset(); - bool userScrolled = !FuzzyEqualsAdditive(Metrics().GetVisualScrollOffset().x, - lastScrollOffset.x) || - !FuzzyEqualsAdditive(Metrics().GetVisualScrollOffset().y, - lastScrollOffset.y); + bool userScrolled = + !FuzzyEqualsCoordinate(Metrics().GetVisualScrollOffset().x, + lastScrollOffset.x) || + !FuzzyEqualsCoordinate(Metrics().GetVisualScrollOffset().y, + lastScrollOffset.y); if (aScrollMetadata.DidContentGetPainted()) { mLastContentPaintMetadata = aScrollMetadata;