Closed Bug 682037 Opened 9 years ago Closed 9 years ago

Allow the browser widget to be smaller than the chrome window


(Firefox for Android Graveyard :: General, defect)

Not set


(Not tracked)

Firefox 9


(Reporter: mbrubeck, Assigned: mbrubeck)



(Whiteboard: [QA-])


(3 files)

Fennec has a lot of code that assumes the <browser> widget is the same width and height as the chrome window.  We need to fix this, because bug 677669 will break this assumption.
Elements that are direct children of the main <stack> will inherit its width and height by default; we don't need to set their width/height/top/left explicitly.  As far as I can tell, we can remove all this code with no effect.
Attachment #555796 - Flags: review?(ben)
Comment on attachment 555796 [details] [diff] [review]
part 1: Remove unnecessary window-width and window-height classes

Yes. This.

If window-width is now never used (except when it really wants browser-width), could we just s/window-width/browser-width/ after this patch?
Attachment #555796 - Flags: review?(ben) → review+
Here's another one we can get rid of.
Attachment #555800 - Flags: review?(ben)
Comment on attachment 555800 [details] [diff] [review]
part 2: Don't use window-width for fullscreen video

Whoa, we were appending them to main-window before?? I don't see any problems doing this, though you probably want to make sure find in page still works right.
Attachment #555800 - Flags: review?(ben) → review+
Third and final part.  This uses ViewableAreaObserver.width for things that should be as wide as the browser instead of the screen.  Currently this is synonymous with window.innerWidth, so this should not change anything, but in bug 677669 when the browser width becomes different from the window width, we can make sure ViewableAreaObserver.width is updated to still reflect the browser width.

There may be more of these, but I don't think we'll be able to catch and fix them until bug 677669 is fixed.  I'm not planning any more work as part of this bug.

I'm kind of sad that I haven't fully killed off window-width and window-height.  They're still used so that we can initialize the preference panel while hiding it off-screen.  There's probably another way to do that, but it can be done in a new bug.
Attachment #555824 - Flags: review?(ben)
Whiteboard: [has patch]
Attachment #555824 - Flags: review?(ben) → review+
Closed: 9 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → Firefox 9
Whiteboard: [QA?]
Whiteboard: [QA?] → [QA-]
You need to log in before you can comment on or make changes to this bug.