Closed Bug 766142 Opened 12 years ago Closed 11 years ago

Pinch and zoom do not work for in-process content

Categories

(Core :: Layout, defect)

x86_64
Windows 8.1
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: jimm, Unassigned)

Details

(Keywords: feature, Whiteboard: [metro-mvp][LOE:3])

This needs investigating. Bug 593168 may be at fault or it may be something else. Since desktop has no issues, I'm not sure why we can't implement what we do there in the metro front end. Currently zoom works fine for out of process content, but we've decided not to use that for the foreseeable future.
Component: Tabbed Browser → General
Assignee: jmathies → nobody
Component: General → Layout
Product: Firefox → Core
Depends on: 593168
Desktop uses "fullZoom" or (optionally) "textZoom" which both change the scale of content but keep the viewport equal to the window size.  So the layout of the content changes as you zoom, because the scale is larger but the viewport is the same (physical) size.

In contrast, in mobile browsers (including Metro IE10, and Fennec) the viewport is not fixed to the window size.  When you zoom in, the CSS viewport and the page contents are physically scaled up together, so the layout of the page doesn't change.  Instead you end up viewing a cropped portion of the CSS viewport.

[If that's not clear, http://quirksmode.org/mobile/viewports2.html has a longer explanation with pictures.]

If we want Metro Firefox to behave like "mobile" browsers with a "virtual" viewport, then we need something like bug 593168.  In an early version of single-process Fennec we actually implemented this in the front-end just by scaling the <browser> element with CSS transforms; maybe that would work here.

Alternately, we could make Metro Firefox behave just like desktop Firefox: disable the <meta name=viewport> code, and enable zooming with nsIMarkupDocumentViewer.fullZoom.
Whiteboard: metro-preview?
Blocks: 789332
Here's the original patch that added viewport scrolling:

https://bugzilla.mozilla.org/attachment.cgi?id=471743&action=diff
(In reply to Matt Brubeck (:mbrubeck) from comment #1)
> Desktop uses "fullZoom" or (optionally) "textZoom" which both change the
> scale of content but keep the viewport equal to the window size.  So the
> layout of the content changes as you zoom, because the scale is larger but
> the viewport is the same (physical) size.
> 
> In contrast, in mobile browsers (including Metro IE10, and Fennec) the
> viewport is not fixed to the window size.  When you zoom in, the CSS
> viewport and the page contents are physically scaled up together, so the
> layout of the page doesn't change.  Instead you end up viewing a cropped
> portion of the CSS viewport.
> 
> [If that's not clear, http://quirksmode.org/mobile/viewports2.html has a
> longer explanation with pictures.]
> 
> If we want Metro Firefox to behave like "mobile" browsers with a "virtual"
> viewport, then we need something like bug 593168.  In an early version of
> single-process Fennec we actually implemented this in the front-end just by
> scaling the <browser> element with CSS transforms; maybe that would work
> here.
> 
> Alternately, we could make Metro Firefox behave just like desktop Firefox:
> disable the <meta name=viewport> code, and enable zooming with
> nsIMarkupDocumentViewer.fullZoom.

It seems to me that we should go with the virtual viewport: I would think that most users expect pinch+zoom to leave the layout of the page unchanged and simply zoom in to a section of it.
Whiteboard: metro-preview? → [metro-beta]
Whiteboard: [metro-beta] → [metro-mvp]
Keywords: feature
Blocks: 803926
Whiteboard: [metro-mvp] → [metro-mvp][LOE:3]
No longer blocks: 803926
Depends on: metro-omtc
No longer blocks: desktop-zoom-win, 789332
Status: NEW → RESOLVED
Closed: 11 years ago
No longer depends on: 593168, metro-omtc
Resolution: --- → INVALID
OS: Windows 8 Metro → Windows 8.1
You need to log in before you can comment on or make changes to this bug.