Closed Bug 1442521 Opened 6 years ago Closed 6 years ago

Meaning of width/height and {min,max}{width,height} on <window> are unclear

Categories

(Core :: XUL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- wontfix
firefox61 --- fixed

People

(Reporter: xidorn, Assigned: xidorn)

References

Details

Attachments

(1 file, 1 obsolete file)

Funny... although it fixes some failures from bug 1439875, it seems to break more...

Need to see why's that...
Comment on attachment 8955404 [details]
Bug 1442521 - Treat args of nsXULWindow::SetSpecifiedSize as client area size and convert them to outer window size for SetSize.

Cancel review request for now...
Attachment #8955404 - Flags: review?(bugs)
Err... It seems the width and height in nsXULWindow is quite a mess... It sometimes means outer size sometimes inner size...
Summary: nsXULWindow::SetSpecifiedSize should call into SetSize with window outer size → Meaning of width/height and {min,max}{width,height} on <window> are unclear
Attachment #8955404 - Attachment is obsolete: true
This patch as itself looks fine now... except the macOS a11y crash which seems weird...
https://treeherder.mozilla.org/#/jobs?repo=try&revision=257786ee7eb464ae79fa9cd3ade22b9fda2f1fcf
bz, could you review this patch? smaug is probably in Tokyo for Web Components F2F so may not be able to get to this soonish.
Flags: needinfo?(bzbarsky)
FWIW, I'll have time tomorrow.
Comment on attachment 8955451 [details]
Bug 1442521 - Make width/height attr on <window> mean the inner size in nsXULWindow.

https://reviewboard.mozilla.org/r/224612/#review231166

So this is going to cause an issue with restoration of persisted window sizes, right?  That is, right now we're persisting outer window sizes but the first update to a build with this patch will treat them as inner ones?  I guess after that the new (slightly larger) window sizes will be stable...  And switching back will just go back to the slightly smaller sizes?

r=me, but I really hope that this won't confuse things on update.  Please test how updating across this change works when restoring maximized windows, etc...
Attachment #8955451 - Flags: review+
Flags: needinfo?(bzbarsky)
Attachment #8955451 - Flags: review?(bugs)
(In reply to Boris Zbarsky [:bz] (no decent commit message means r-) from comment #9)
> Comment on attachment 8955451 [details]
> Bug 1442521 - Make width/height attr on <window> mean the inner size in
> nsXULWindow.
> 
> https://reviewboard.mozilla.org/r/224612/#review231166
> 
> So this is going to cause an issue with restoration of persisted window
> sizes, right?  That is, right now we're persisting outer window sizes but
> the first update to a build with this patch will treat them as inner ones? 
> I guess after that the new (slightly larger) window sizes will be stable... 
> And switching back will just go back to the slightly smaller sizes?

Yes, exactly. I didn't take this into consider, but indeed it behaves as you described here. I guess it's not a big deal?

> r=me, but I really hope that this won't confuse things on update.  Please
> test how updating across this change works when restoring maximized windows,
> etc...

I tested it for restoring maximized windows, and it seems everything works just the same as what is described above. I think that means it works as expected.
Pushed by xquan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7d40106bafeb
Make width/height attr on <window> mean the inner size in nsXULWindow. r=bz
https://hg.mozilla.org/mozilla-central/rev/7d40106bafeb
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
Depends on: 1444045
Depends on: 1444525
Julian, given the regression bug 1446343 and the trickiness of fixing widget code, I suggest we backout this bug from 60beta and continue fixing stuff in 61. Could you help with that?
Flags: needinfo?(jcristau)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: