Closed Bug 1766386 Opened 3 years ago Closed 2 years ago

Consider changing the default scroll snap proximity threshold

Categories

(Core :: Layout: Scrolling and Overflow, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
118 Branch
Tracking Status
firefox118 --- fixed

People

(Reporter: hiro, Assigned: hiro)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

Severity: -- → S3
Priority: -- → P3
See Also: → 1778257
Blocks: 1753188

It looks like the Chrome's threshold isn't a fixed value, it's 1/3 of scrollport?

And it looks like Webkit threshold isn't a fixed value, it's 0.3 of the scrollport.

Blocks: 1841307

Now the threshold is 0.3*snapport size, it's mostly same as WebKit [1].
A difference is WebKit's threshold is based on the scrollport size. Given that
if scroll-padding was specified due to a position: fixed element or some
such, using snapport size (i.e. offsetted by the scroll-padding) is more
reasonable than using scrollport size.

[1] https://searchfox.org/wubkat/rev/d1911bf073cc55fc8ca76bcee8b4783539e43c2e/Source/WebCore/page/scrolling/ScrollSnapOffsetsInfo.cpp#207-208

Assignee: nobody → hikezoe.birchill
Status: NEW → ASSIGNED
See Also: → 1848574
See Also: → 1848576
Pushed by hikezoe.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/bdeed1276a35 Make scroll snap proximity threshold based on the snapport size rather than using a fixed preference value. r=dlrobertson

Backed out for causing mochitest failures in helper_scroll_snap_resnap_after_async_scroll.html

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: TEST-UNEXPECTED-FAIL | gfx/layers/apz/test/mochitest/test_group_scroll_snap.html | helper_scroll_snap_resnap_after_async_scroll.html | snap to 200px - got 468, expected 200
Flags: needinfo?(hikezoe.birchill)

I was misunderstanding that this scrollDelta value for promiseMoveMouseAndScrollWheelOver means that promiseMoveMouseAndScrollWheelOver scrolls the given delta, but it's just used for creating OS internal events so it's hard to predict how far promiseMoveMouseAndScrollWheelOver scrolls to.

I did tweak the scroll delta depending on platforms to make the test pass on all desktop platforms and android.

Flags: needinfo?(hikezoe.birchill)
Pushed by hikezoe.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a5bcd3edffd7 Make scroll snap proximity threshold based on the snapport size rather than using a fixed preference value. r=dlrobertson
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 118 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: