Closed Bug 477653 Opened 15 years ago Closed 15 years ago

sizemode=maximized causes multiple resize events

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dougt, Assigned: mfinkle)

Details

Attachments

(1 file)

when using sizemode=maximized in our window define, we see multiple resize events on linux and windows mobile.

http://mxr.mozilla.org/mobile-browser/source/chrome/content/browser.xul#55

However, when we use fixed sizes like 'width="720" height="420"', there is only resize event fired.

On linux:

without sizemode=maximized:
resize: 720x420

with sizemode=maximized:
resize: 1025x800
resize: 1025x800
resize: 720x420

This problem was uncovered when we switched from our browser window having a fixed size to just using the sizemode attribute in bug:

https://bugzilla.mozilla.org/show_bug.cgi?id=476705
This patch adds some logic to the resizeHandler to ignore any resize attempts that aren't at the final width - based on sizemode="maximized"
Attachment #365212 - Flags: review?(gavin.sharp)
The patch does not stop the platform from sending the initializtion resizes. The patch merely ignores any resizes it can and does reduce the resize speed regressions to 1 effective resize.
Comment on attachment 365212 [details] [diff] [review]
mobile-browser fix

I'm assuming you tested this on the n810 to make sure it worked as expected... My only concern is that there are platforms (WinCE?) where availWidth will not match window width even when "maximized"...
Attachment #365212 - Flags: review?(gavin.sharp) → review+
(In reply to comment #3)
> (From update of attachment 365212 [details] [diff] [review])
> I'm assuming you tested this on the n810 to make sure it worked as expected...
> My only concern is that there are platforms (WinCE?) where availWidth will not
> match window width even when "maximized"...

Yes, I did test on the n810 and screen.availWidth does match final window.innerWidth

I did not test on WinMo yet. Also, orientation might cause things to not match up either.
http://hg.mozilla.org/mobile-browser/rev/be656c9463a9
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
filed bug 481243 to look into this on a platform level.
What would be a good way to verify this?
We can do an assertJS across winMo and Maemo devices via console with screen.availWidth and window.innerWidth equaling each other.

Mark, Brad, Gavin; what do you guys think?
bugspam
Assignee: nobody → mark.finkle
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: