Closed Bug 535559 Opened 16 years ago Closed 16 years ago

[Regression] Special case fullscreen/maximized in resize handler

Categories

(Firefox for Android Graveyard :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: mfinkle, Unassigned)

Details

Attachments

(1 file)

Attached patch patchSplinter Review
If we know we will be fullscreen/maximized, we can skip any resizes until we see a width that is the screen width. This regressed when we added sizemode="fullscreen", previously it was sizemode="maximized" Tested on N900
Attachment #418169 - Flags: review?(gavin.sharp)
Comment on attachment 418169 [details] [diff] [review] patch >diff --git a/chrome/content/browser.js b/chrome/content/browser.js > function resizeHandler(e) { >- if (maximize && w > screen.width) >+ // Special case the fullscreen/mximized mode. We only need to do the >+ // resize code if we are at the final size. >+ let sizemode = document.documentElement.getAttribute("sizemode"); >+ if (w != screen.width && (sizemode == "fullscreen" || sizemode == "maximized")) I'm a bit worried that there are cases when screen.width will not be equal to w even with sizemode="fullscreen"/"maximized", which would result in us never resizing controls. Doesn't seem to happen on n900, but what about winmo or other devices? nit: check sizemode before screen.width?
This patch causes a sizing glitch on startup on my n900. The window briefly displays at it's "default" size and then snaps back into place. I suppose this is because we're now resizing after displaying rather than before (i.e. resize event that takes effect is later). Not sure what the best tradeoff here is...
Attachment #418169 - Flags: review?(gavin.sharp)
This patch is quite old, but since i'm just playing around in that area right now i want to add that this does not work with rotation. Or am I wrong?
let's just close this bug
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: