Steps to reproduce:
Open DOM Inspector on a normal browser window and look at the attribute values of the 'window' element.
Click on the green '+' on the browser window and see in DOM Inspector the value of the sizemode attribute.
sizemode always set to 'normal'
sizemode set to 'maximized' when the window is maximized.
Additionally, when a window is maximized the height and width values should not be changed.
This bug has visible effects on windows that persist height, width and sizemode attributes.
See bug 408948 for an example.
I'm going to take a late-night guess and suggest that this is because |nsSizeModeEvent| is not generated and posted from the cocoa-widget code.
This bug seems to be affecting all platforms (not just cocoa).
Songbird is using this attribute to control some of the window sizing (maximum, etc) events.
Also see Komodo bug
If anyone can explain why Komodo has a window.windowState
property but not a window.document.documentElement@sizemode
attribute, I'd appreciate that.
On OS X, with Firefox 3.0 I see that maximizing a window
changes the sizemode attribute, but minimizing it doesn't
change it. In Komodo on OS X (based on Moz 1.9),
window.windowState is always 3 (nsIDOMChromeWindow.STATE_NORMAL).
A test was added for this but it is not run on Mac.
(In reply to Nick Kreeger from comment #1)
> I'm going to take a late-night guess and suggest that this is because
> |nsSizeModeEvent| is not generated and posted from the cocoa-widget code.
Nearly 4 years later, but here's some confirmation... you're right!. I can't remember right now if this is still a problem for non-fullscreen (we should be firing size mode events on windowDidResize)
I filed bug 539601 a while back and did some work there. I've folded that into my work for lion fullscreen support (bug 639705) since they're intrinsically linked. So this should end up being resolved by one of those soon.
I'm pretty sure this is now working correctly, post bug 539601.
(In reply to Eric Promislow from comment #3)
> On OS X, with Firefox 3.0 I see that maximizing a window
> changes the sizemode attribute, but minimizing it doesn't
> change it.
sizemode="minimized" is explicitly not updated: https://hg.mozilla.org/mozilla-central/file/a30fd69f1e0c/xpfe/appshell/src/nsXULWindow.cpp#l1522