Closed Bug 1648796 Opened 5 years ago Closed 5 years ago

Mark WPT tests that rely on scrollport size with user-scalable=no

Categories

(Core :: Panning and Zooming, defect)

Unspecified
Android
defect

Tracking

()

RESOLVED FIXED
mozilla79
Tracking Status
firefox79 --- fixed

People

(Reporter: kats, Assigned: kats)

References

Details

Attachments

(1 file)

Spinoff from https://bugzilla.mozilla.org/show_bug.cgi?id=1647034#c10

The patches in bug 1647034 will make it so that the visual viewport get set earlier - from the very first reflow, rather than waiting until the load event. This also means that any shrink-to-fit behaviour (i.e. zoom out to render the entire content width) will happen on those first reflows as well. In particular, this changes the scroll port dimensions of the root scrollframe, and can make things like document.scrollingElement.scrollTop = 100 or whatever not work, because there's no scroll range when zoomed out.

There are a handful of WPT tests which assume this will not happen. Currently it appears that these tests do not wait for the load event to run, or they would already be failing. But the fix is pretty easy, we can add a user-scalable=no meta tag to these tests to disable the shrink-to-fit behavior and that will uphold the assumptions the test makes.

Note that this is only a problem on Android because that's where we do the shrink-to-fit behaviour.

On Android, if user-scalable=no is not set, Gecko uses the "minimum scale size"
as the scrollport size, to allow for the user zooming out all the way to the
minimum allowed scale. This has a number of effects, such as dropping the
layout scroll range to zero for the root scrollframe. This can causes a
number of WPT tests to fail; they currently pass only because the minimum
scale size changes take effect after the test is already done. However,
moving the minimum scale size changes to happen earlier causes these tests
to fail. It's better to modify the tests to disable this behaviour, so that the
assumptions in the test are not invalidated.

Pushed by kgupta@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dc28a52cb810 Mark a handful of tests with user-scalable=no. r=hiro
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/24366 for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla79
Upstream PR merged by moz-wptsync-bot
See Also: → 1654910
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: