Closed Bug 1822433 Opened 2 years ago Closed 2 years ago

Make scroll-snap-type-on-root-element.html pass

Categories

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

defect

Tracking

()

RESOLVED FIXED
113 Branch
Tracking Status
firefox113 --- fixed

People

(Reporter: hiro, Assigned: hiro)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

I was misunderstanding that the test failure is caused by incorrect writing-mode propagation stuff. But I was wrong. In fact the test fails at two different places

assert_equals(document.scrollingElement.scrollLeft, 200, "block should not snap");

and

assert_equals(document.scrollingElement.scrollTop, 800, "block should not snap");

In the former case the scroll snap align on X axis is none and the test tries to do scrollTo( 200, 800). We incorrectly snap to 0 on X axis due to this line, we choose the original start position if we didn't find any candidates on the axis. We need to snap to the specified 200px point if the given scroll operation is an intended end position operation (e.g. scrollTo).

The latter case fails due to the same reason.

Pushed by hikezoe.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/de233af59c21 Snap to the scroll destination in the case of `intended-end-position` scroll operation if there's no snap target points. r=botond
Backout by mlaza@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9f4ca9ac1f76 Backed out changeset de233af59c21 for wpt failures on scroll-snap-type-on-root-element.html.

Backed out changeset de233af59c21 (Bug 1822433) for wpt failures on scroll-snap-type-on-root-element.html.
Backout link
Push with failures <--> wpt7
Failure Log

Flags: needinfo?(hikezoe.birchill)

Two tweaks here;

  1. Add a meta viewport tag
    Without speciying minimum-scale=1 the content gets shrink to fit to the
    device screen so that it prevent from scrolling/snapping to the expected
    position
  2. Change the snap target element position
    On our CIs our browser's content height is 1136px even with above 1), thus
    the original snap target position on Y axis 1000px isn't suitable to be
    snapped to scroll-snap-align: end becasue it's originally inside the
    scrollport

Looks like Chrome hasn't run any web platform tests on mobile environments and Webkit hasn't either.

Flags: needinfo?(hikezoe.birchill)
Pushed by hikezoe.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d1f59c7a2743 Snap to the scroll destination in the case of `intended-end-position` scroll operation if there's no snap target points. r=botond https://hg.mozilla.org/integration/autoland/rev/59d6c667ab66 Tweak scroll-snap-type-on-root-element.html to run the test as expected on mobile environments. r=botond
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/39026 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: