Closed Bug 2051398 Opened 18 days ago Closed 18 days ago

wpt unrelated-gesture-scroll-during-snap.html failing

Categories

(Core :: Panning and Zooming, defect, P2)

defect

Tracking

()

RESOLVED FIXED
154 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr140 --- unaffected
firefox152 --- unaffected
firefox153 --- unaffected
firefox154 --- fixed

People

(Reporter: ajakobi, Assigned: hiro)

References

(Regression, )

Details

(Keywords: regression)

Attachments

(1 file)

The test started failing on 25 Jun 2026 after bug 2048146 landed.
The issues reproduces locally on Linux, running the test with layout.disable-pixel-alignment=false lets it pass.

Hiro, can you please check?

Flags: needinfo?(hikezoe.birchill)
Target Milestone: --- → 154 Branch

Okay, the test has been failing on our CIs, specifically on Linux and Mac. I wonder why it has passed on wpt.fyi?

Anyways, from bug 2015367 comment 0:

  1. In the test the expected scroll position is based on Element.offset, because of %-based margin-bottom, the offset value can be fractional which will be different from the scroll position, we need to avoid the fractional difference, a way I found is adding scrollbar-width: none in the scroll container

this is necessary.

Flags: needinfo?(hikezoe.birchill)
See Also: → 2015367

The test scrolls an unrelated container and then asserts that its
scrollTop is exactly equal to the expected scroll offset, where the
expected value is taken from the second .snaparea's offsetTop.

Element.offsetTop is defined as a long, so the expected value is rounded
to a whole pixel, whereas the actual scroll offset can be fractional.
When a classic (space-taking) scrollbar is present, the container's
content/client geometry can land the snap target on a fractional offset,
so the equality assertion fails by a sub-pixel amount.

Set scrollbar-width: none so the scrollbar no longer takes space, keeping
the snap offsets integral and matching offsetTop.

Assignee: nobody → hikezoe.birchill
Status: NEW → ASSIGNED

Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/60979 for changes under testing/web-platform/tests

Status: ASSIGNED → RESOLVED
Closed: 18 days ago
Resolution: --- → FIXED

(In reply to Web Platform Test Sync Bot [:wpt-sync] (Matrix: #interop:mozilla.org) from comment #5)

Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/60979 for changes under testing/web-platform/tests

FYI this sync is now merged.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: