Bug 1663535. Handle scroll snapping with desktop zooming scrollbars. r=kats

If we need to snap we just don't use the desktop zooming scrollbar path.

A quick look into the scroll snapping code looks like it uses layout only aware things. This should be good enough for now, we can look into supporting scroll snap + pinch zoom later if we need to.

Differential Revision: https://phabricator.services.mozilla.com/D89400
This commit is contained in:
Timothy Nikkel 2020-09-08 08:08:32 +00:00
Родитель 992e6196f4
Коммит 41900951e9
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -4563,8 +4563,8 @@ void ScrollFrameHelper::ScrollBy(nsIntPoint aDelta, ScrollUnit aUnit,
return;
}
// xxx need to handle scroll snapping
if (gfxPlatform::UseDesktopZoomingScrollbars() &&
if ((aSnap != nsIScrollableFrame::ENABLE_SNAP || !NeedsScrollSnap()) &&
gfxPlatform::UseDesktopZoomingScrollbars() &&
nsLayoutUtils::AsyncPanZoomEnabled(mOuter) &&
!nsLayoutUtils::ShouldDisableApzForElement(mOuter->GetContent()) &&
(WantAsyncScroll() || mZoomableByAPZ)) {