[Webkit-unassigned] [Bug 107997] Implement desktop compatibility viewport

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jan 27 01:49:48 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=107997


Alexandre Elias <aelias at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |anicolao at chromium.org,
                   |                            |jamesr at chromium.org,
                   |                            |rbyers at chromium.org,
                   |                            |wjmaclean at chromium.org




--- Comment #5 from Alexandre Elias <aelias at chromium.org>  2013-01-27 01:51:42 PST ---
We would keep track of two separate viewports at all times, the normal viewport and the desktop compatibility viewport (which we also refer to as the "inner" and "outer" viewports as the normal viewport is always contained within the desktop compatibility viewport).  Given only scroll interactions, these would remain in perfect sync, but in the presence of pinch zoom, they would diverge as follows:

- Pinch zoom scales the normal viewport but the size of the desktop compatibility viewport is unaffected, always remaining at the initial unzoomed size.
- The desktop compatibility viewport is positioned relative to the normal viewport with an offset that is always negative or zero (pointing to its upper-left).  This offset is initialized at (0,0) on page load.
- If at any point, the sum of normal viewport offset and desktop compatibility viewport offset would position the desktop compatibility viewport A) partially outside the bounds of the document or B) non-fully-intersecting with the normal viewport, then the desktop compatibility viewport offset is clamped to avoid this.  The clamped value is assigned to it in a persistent manner.
- When a scaling gesture affects the size of the normal viewport, we also adjust the desktop compatibility viewport's offset so that its absolute position does not change.  However, during scrolling, no such adjustment is made (aside from the clamping).

Fixed position elements would layout in exactly the normal manner, but they would simply consider this newly defined rectangle to be the "viewport" instead of the one the user sees.

The idea behind this is that fixed-pos elements would normally get out of the way when zooming in, unless the user expresses some intent to see the fixed-pos element.  If a user pinch zooms into the center of the viewport, a top fixed position bar would quickly slide away from view and not reappear if they scroll downwards.  However, if they scroll back up to the very top of the document, then the fixed-pos element will come into view (and then stay in view even if they scroll back down).  Alternatively, if they had pinched near the top of the screen in the first place, then the fixed-pos element would stay in view.  Also, fully zooming out will always bring the two viewports back in sync and all the fixed position elements into view.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list