Closed Bug 596969 Opened 12 years ago Closed 12 years ago

Viewport is resized when switching tabs


(Firefox for Android Graveyard :: General, defect)

Not set



Tracking Status
fennec 2.0b1+ ---


(Reporter: mbrubeck, Assigned: cjones)



(Keywords: qablocker)


(1 file, 1 obsolete file)

Steps to reproduce:
1. Open a page with non-default viewport width, e.g.
2. Switch to a different tab, then back to the first tab

Expected results: Page layout remains the same
Actual results: Viewport width changes

This is a regression from bug 576192.
This seems to (maybe?) happen as a result of nsFrameLoader::ShowRemoteFrame calling GetSubDocumentSize and then TabParent::Move - the dimensions passed to Move do not match the explicit viewport metadata.
tracking-fennec: --- → ?
tracking-fennec: ? → 2.0b1+
This might be helped by the new API proposed in bug 589337 to replace Show/Hide for switching tabs.
Depends on: 589337
Keywords: qablocker
We'd like to change the platform to *not* change the CSS viewport size on window/widget resize, if an override has been set using nsIDOMWindowUtils.setCSSViewport.
Assignee: mbrubeck → jones.chris.g
To be clear, the fennec frontend wants to use this feature to implement the <meta viewport> tag available to web content, in such a way that the frontend doesn't have to always listen for resizes (e.g. on device orientation change) and reset them back to the <meta viewport>.  That's a bit tricky and can be expensive if we don't prevent the reflow in time.
Attachment #477753 - Flags: superreview?(dbaron)
Blocks: 597580
How should we call ResizeReflowOverride from the frontend?  Should nsDOMWindowUtils::SetCSSViewport call it for us (maybe optionally)?
Thanks Matt!  I didn't change the nsDOMWindowUtils callsite, and my test was wrong.
Attachment #477753 - Attachment is obsolete: true
Attachment #477787 - Flags: superreview?(dbaron)
Attachment #477753 - Flags: superreview?(dbaron)
This is working great, but it seems to make bug 597230 happen more often.  Working on a patch in that bug.
Depends on: 597230
No longer depends on: 589337
Comment on attachment 477787 [details] [diff] [review]
Allow a document's CSS viewport to be permanently overridden by chrome script, v2

Attachment #477787 - Flags: superreview?(dbaron) → superreview+
Closed: 12 years ago
Resolution: --- → FIXED
verified FIXED on builds:
Mozilla/5.0 (Maemo; Linux armv71; rv:2.0b6pre) Gecko/20100927 Namoroka/4.0b7pre Fennec/2.0b1pre


Mozilla/5.0 (Android; Linux armv71; rv:2.0b6pre) Gecko/20100927 Namoroka/4.0b7pre Fennec/2.0b1pre
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.