Web facing PSA: Shipping virtual-viewport pinch zoom

20 views
Skip to first unread message

David Bokan

unread,
Jan 5, 2015, 4:09:33 PM1/5/15
to blink-dev, chromi...@chromium.org, inpu...@chromium.org, Rick Byers, Alexandre Elias
tldr; Pinch to zoom will behave rationally with respect to position:fixed elements starting with M40 on Android, M41 on desktop. The change is fairly significant so please keep an eye out for regressions and broken pages.

I've turned on --enable-pinch-virtual-viewport on all platforms now and it should be shipping in M40 on Android and M41 on Linux/Mac/Win (it's already on for CrOS). I'm sending out a PSA rather than an intent to ship since there this shouldn't affect any APIs but there are still some significant changes people may want to be aware of.

The most significant change here is how position: fixed elements are handled under pinch to zoom; they no longer stick to the visual viewport during a pinch-zoom (see the desktop nytimes.com site's navbar on Android for an example). Another change is that Chrome on Android can now consistently respect the overflow:hidden property on the root element. It was previously ignored if the page was scrolled on the fast path (but honored on the slow path!). This rationalizes a common developer pitfall, though has the potential to break some sites that assume the the property is ignored. The discussion on this is tracked in http://crbug.com/444581. These two changes bring Chrome in line with IE but away from Safari.

Turning this on means taking lots of new code paths; please keep an eye out for bugs, especially related to viewport scroll jumps and boundaries (top controls in particular on Android have seen lots of edge cases). --disable-pinch-virtual-viewport will disable the feature for easy comparison with the old code path. I'm maintaining a bug list under the 'pinch-to-zoom' crbug label. Please assign any bugs to me.

For more information see the design doc:

Or a more informal introduction slide-deck:

Thanks!
David

David Bokan

unread,
Jan 5, 2015, 4:17:27 PM1/5/15
to blin...@chromium.org, inpu...@chromium.org, rby...@google.com, ael...@google.com, bo...@google.com, Chromium-dev
+Chromium-dev
Reply all
Reply to author
Forward
0 new messages