Closed Bug 1692997 Opened 4 years ago Closed 4 years ago

make scrollbar button click + hold (repeat mode) go through apz

Categories

(Core :: Panning and Zooming, defect)

defect

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: tnikkel, Assigned: tnikkel)

References

Details

Attachments

(2 files)

It come up in bug 1688453/bug 1682919 that this mode did not use the same apz path that (almost?) all other scrollbar performed scrolling goes through.

(Almost?) all other scrollbar performed scrolling goes through apz already (this effort was called "desktop_zooming_scrollbars").

This one mode was missed. It uses a repeating timer and setting the curpos attribute to trigger scrolling.

Unfortunately xul trees use this path as well, so we have to keep the old path around for them.

This makes one notable change in behaviour. Both before and after this patch single clicks on scrollbar buttons pass ENABLE_SNAP to the scroll from when they request scrolling (in nsScrollbarButtonFrame::HandleButtonPress). However for repeat scrolling when clicking and holding (which is handled by nsScrollbarFrame::MoveToNewPosition), before this patch the scrolling would not use ENABLE_SNAP. This is not super clear because MoveToNewPosition sets the curpos attributes, and then ScrollFrameHelper::CurPosAttributeChanged( would get called in response to that, and it would call ScrollToWithOrigin to the do scrolling, and it does not specify the snap mode, but the default is DISABLE_SNAP. This patch changes that so that we explicitly pass ENABLE_SNAP in MoveToNewPosition. It seems that this was likely overlooked (not hard to do when it's not clear like this) when adding snapping support. It makes sense to handle snapping the same way for single clicks and clicking and holding. If this turns out to be the wrong idea we can easily change it back.

Needs a test.

Assignee: nobody → tnikkel
Status: NEW → ASSIGNED
Attached file Bug 1692997. Add test. r?botond (deleted) —
Keywords: leave-open
Keywords: leave-open
Pushed by tnikkel@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a4bd7da863f0 Make scrollbar button click + hold (repeat mode) go through apz. r=botond
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
Regressions: 1695418
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: