If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

sizemode=maximized causes multiple resize events

RESOLVED FIXED

Status

Fennec Graveyard
General
--
major
RESOLVED FIXED
9 years ago
6 years ago

People

(Reporter: dougt, Assigned: mfinkle)

Tracking

Details

Attachments

(1 attachment)

(Reporter)

Description

9 years ago
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
Created attachment 365212 [details] [diff] [review]
mobile-browser fix

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
Last Resolved: 9 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.