Closed
Bug 1253132
Opened 9 years ago
Closed 9 years ago
Support window states in the browser.windows API
Categories
(WebExtensions :: Untriaged, defect)
WebExtensions
Untriaged
Tracking
(firefox47 fixed)
Tracking | Status | |
---|---|---|
firefox47 | --- | fixed |
People
(Reporter: kmag, Assigned: kmag)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [windows])
Attachments
(1 file)
Chrome supports "normal", "minimized", "maximized", "fullscreen", and "docked". This bug covers the first four. The last may have to be handled in a follow-up.
Assignee | ||
Updated•9 years ago
|
Blocks: webext-windows
Whiteboard: [windows]
Assignee | ||
Updated•9 years ago
|
Iteration: --- → 47.3 - Mar 7
Assignee | ||
Comment 1•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/38071/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/38071/
Attachment #8726511 -
Flags: review?(wmccloskey)
Comment on attachment 8726511 [details]
MozReview Request: Bug 1253132: [webext] Support window states in browser.windows APIs. r?billm
https://reviewboard.mozilla.org/r/38071/#review34829
::: browser/components/extensions/ext-utils.js:688
(Diff revision 1)
> + if (window.fullScreen) {
> + state = "fullscreen";
> + }
It looks like there's a STATE_FULLSCREEN too. Does that work?
::: browser/components/extensions/ext-windows.js:144
(Diff revision 1)
> + window.document.documentElement.setAttribute("sizemode", createData.state);
I guess I don't know much about XUL window sizing. Why use this sizemode thing here and use WindowManager.setState (which calls .maximize, etc.) elsewhere?
Attachment #8726511 -
Flags: review?(wmccloskey) → review+
Assignee | ||
Comment 3•9 years ago
|
||
https://reviewboard.mozilla.org/r/38071/#review34829
> It looks like there's a STATE_FULLSCREEN too. Does that work?
Nope. It returns MAXIMIZED when in fullscreen mode. I'm not sure if the constant is left-over, or if it's actually used somewhere, but it's not used here.
> I guess I don't know much about XUL window sizing. Why use this sizemode thing here and use WindowManager.setState (which calls .maximize, etc.) elsewhere?
Setting the attribute only works before the window is shown. Calling the methods only works after. I considered just waiting for the window to be shown, and then calling setState in all cases, but I don't like the idea of having the window show in one state, and then immediately resizing.
OK, sounds good.
Assignee | ||
Comment 5•9 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/2e3b78d27f7b0d036d29435d7bb2241947823bb5
Bug 1253132: [webext] Support window states in browser.windows APIs. r=billm
Comment 6•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox47:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•