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"
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"...
(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.
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?