Reduce the sizes in WPT unreachable-snap-positions-003.html to avoid failures for windows < 600px wide
Categories
(Core :: Layout: Scrolling and Overflow, task)
Tracking
()
| 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.
| Assignee | ||
Comment 1•1 year ago
|
||
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.
Updated•1 year ago
|
| Assignee | ||
Comment 2•1 year ago
|
||
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).
| Assignee | ||
Comment 3•1 year ago
|
||
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.
| Assignee | ||
Comment 4•1 year ago
|
||
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!)
Description
•