Investigate why overscroll-snap.html has started failing again on wpt.fyi since bug 2008571
Categories
(Core :: Panning and Zooming, task, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox150 | --- | fixed |
People
(Reporter: hiro, Assigned: hiro)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
Attachments
(1 file)
Here is a comparison view between the last success run and the first failure run;
https://wpt.fyi/results/css/css-scroll-snap?run_id=5156882370265088&run_id=6205813376155648
As you can see overscroll-snap.html failed on the left side column of Firefox, the test succeeded on the right column.
On the other hand, snap-at-user-scroll-end.html succeeded on the left column, and failed on the right column.
snap-at-user-scroll-end.html has succeeded since bug 2008571, so I am pretty sure that bug 2008571 changed something on wpt.fyi.
This bug would be tough since overscroll-snap.html hasn't failed on our CIs.
| Assignee | ||
Comment 2•2 months ago
|
||
The code in question is ScrollSnapRange::IsValid;
// Returns true if |aPoint| is a valid snap position in this range.
bool IsValid(nscoord aPoint, nscoord aSnapportSize) const {
MOZ_ASSERT(End() - Start() > aSnapportSize);
return Start() <= aPoint && aPoint <= End() - aSnapportSize;
}
In this overscroll-snap.html case, End() is 1942.5pxin CSS unit, it's the child element height. aSnapportSize is 400px, it's the container's height. So far so good.
The aPoint is 1543px, it's clamped in MaybeAdjustDeltaForScrollSnapping;
CSSPoint destination = Metrics().CalculateScrollRange().ClampPoint(
aStartPosition + ToCSSPixels(aDelta));
Metrics().CalculateScrollRange() is unfortunately aligned to 1543px, ideally it should be 1542.5px (= 1942.5 - 400).
With the aligned 1543px value, IsValid() returns false since it's outside of the snapport, thus it's not considered a valid snap position.
Note about the test itself. It was landed along with a chromium bug fix in https://chromium-review.googlesource.com/c/chromium/src/+/4774422, as I understand it, the chromium bug is pretty much same what we see in this bug, in other words, the test properly hits our bug too! The way how chrome fixed the bug is to add a tolerance in the comparison. We may need to the same approach here. Though I am not a big fan of the tolerance.
| Assignee | ||
Comment 3•2 months ago
|
||
The test, overscroll-snap.html, is a clone of
testing/web-platform/tests/css/css-scroll-snap/overscroll-snap.html, but
it runs with layout.disable-pixel-alignment=false.
Updated•2 months ago
|
Updated•2 months ago
|
Description
•