Closed Bug 1253132 Opened 9 years ago Closed 9 years ago

Support window states in the browser.windows API

Categories

(WebExtensions :: Untriaged, defect)

defect
Not set
normal

Tracking

(firefox47 fixed)

RESOLVED FIXED
mozilla47
Iteration:
47.3 - Mar 7
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.
Whiteboard: [windows]
Iteration: --- → 47.3 - Mar 7
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+
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.
https://hg.mozilla.org/integration/fx-team/rev/2e3b78d27f7b0d036d29435d7bb2241947823bb5 Bug 1253132: [webext] Support window states in browser.windows APIs. r=billm
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Blocks: 1258867
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: