Last Comment Bug 409095 - sizemode attribute always set to 'normal'
: sizemode attribute always set to 'normal'
Status: RESOLVED FIXED
[fixed by bug 539601]
:
Product: Core
Classification: Components
Component: Widget: Cocoa (show other bugs)
: Trunk
: x86 Mac OS X
: -- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on: 539601
Blocks: songbird 385424 408948 670026
  Show dependency treegraph
 
Reported: 2007-12-19 14:27 PST by Florian Quèze [:florian] [:flo]
Modified: 2012-03-30 12:32 PDT (History)
8 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Florian Quèze [:florian] [:flo] 2007-12-19 14:27:27 PST
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.

Actual result:
 sizemode always set to 'normal'

Expected result:
 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.
Comment 1 Nick Kreeger 2008-02-23 23:19:45 PST
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.
Comment 2 Nick Kreeger 2008-02-26 09:45:32 PST
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.

See:
http://bugzilla.songbirdnest.com/show_bug.cgi?id=4657
Comment 3 Eric Promislow 2008-11-19 10:55:54 PST
Also see Komodo bug

http://bugs.activestate.com/show_bug.cgi?id=81042

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).
Comment 4 Karl Tomlinson (:karlt) 2011-07-11 19:03:45 PDT
A test was added for this but it is not run on Mac.
http://hg.mozilla.org/mozilla-central/rev/299c005302cd
Comment 5 Paul O'Shannessy [:zpao] (not reading much bugmail, email directly) 2011-12-29 11:29:39 PST
(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.
Comment 6 Paul O'Shannessy [:zpao] (not reading much bugmail, email directly) 2012-03-30 12:32:53 PDT
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

Note You need to log in before you can comment on or make changes to this bug.