Closed Bug 1929309 Opened 1 year ago Closed 1 year ago

Reduce the sizes in WPT unreachable-snap-positions-003.html to avoid failures for windows < 600px wide

Categories

(Core :: Layout: Scrolling and Overflow, task)

task

Tracking

()

RESOLVED FIXED
134 Branch
Tracking Status
firefox134 --- fixed

People

(Reporter: dholbert, Assigned: dholbert)

References

Details

Attachments

(1 file)

Per https://github.com/web-platform-tests/wpt/issues/48968 , our WPT https://wpt.live/css/css-scroll-snap/unreachable-snap-positions-003.html fails if your viewport width is on the order of 600px wide (which is allowed and maybe will become the standard WPT reftest viewport height at some point).

The test fails because there's content that expects to be 800px wide, and that width is wider than our viewport; and the element reaches that width using max-width:800px which is only an upper-limit, so it ends up actually taking on the viewport width via width:auto, which ends up producing a different layout).

We can address this issue by cutting the horizontal sizes there in half. I'll post a patch to do that.

This patch just halves the widths and the scrollLeft values in this test.
While we're at it, this patch also changes to use width rather than
max-width to size the scroller element, so that that element's sizing isn't
at-the-mercy of the viewport size.

The test still passes in all browsers (and now reliably passes in windows
at or smaller-than 600px wide).

The test also still fails in builds from before the associated fix landed (from
bug 1905247), so it still works as a regression test for that bug.

Attachment #9435428 - Attachment description: Bug 1929309: Reduce the horizontal sizes in WPT unreachable-snap-positions-003.html to avoid spurious failures for WPT-standard 600px-wide viewport. r?hiro → Bug 1929309: Reduce the horizontal sizes in WPT unreachable-snap-positions-003.html to avoid spurious failures in WPT harness with 600px-wide viewport. r?hiro

Actually, we can also probably remove the test's initial-scale=0.5 meta-viewport-tag now, too -- based on bug 1905247 comment 12, I think that was working around this same issue on mobile (with a mobile viewport that was too skinny to fit the 800px-wide scroller in the original test here).

Hmm -- testing in RDM with a variety of viewport-widths, it seems like a meta-viewport tag is actually beneficial here. (I think maybe because otherwise the viewport-size-dependent zoom-factor causes some sort of rounding differences in the final scroll position, maybe due to device-pixels-per-css-pixel variability from that zoom factor.)

Let's just use the standard <meta name="viewport" content="width=device-width, initial-scale=1"> tag and remove the 0.5 scale since that part definitely seems to not be needed anymore.

Green Try run:
https://treeherder.mozilla.org/jobs?repo=try&revision=b26c102c58cdfade9eefca4c12435243cd59918d

Orange Try run (as-expected) with this test run on a build from before bug 1905247's fix:
https://treeherder.mozilla.org/jobs?repo=try&revision=d38b361cc531bdeac1c1e221f58567b6198805f9
(So: the test is still an effective regression test. Hooray!)

Pushed by dholbert@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/428c0fbb4a8c Reduce the horizontal sizes in WPT unreachable-snap-positions-003.html to avoid spurious failures in WPT harness with 600px-wide viewport. r=hiro
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/48994 for changes under testing/web-platform/tests
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 134 Branch
Upstream PR merged by moz-wptsync-bot
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: