Repository navigation
Add Additional Windowing Controls API to the spec - #157
Conversation
This commit adds the Additional Windowing Controls API to Window Management spec.
This commit modifies the definitions of CSS properties as well as separates the definition of display-state.
|
Nice, let split the PR, since it's easier to review and accept the separate Explainer and security and privacy files, which should be marked as experimental enhancements to this spec. Are those direct copies of https://github.com/explainers-by-googlers/additional-windowing-controls files? From a cursory glance there seem to be some extra line breaks? Updating the index.bs spec file will have a higher bar, since most existing content reflects functionality that was reviewed by W3C groups (Second Screen WG, TAG, privacy, security, accessibility, CSS, etc.) and has already shipped by default in Chromium. We'll likely want to mark any separate PR's spec changes as experimental, and request similar reviews through an dev trial and origin trial incubation process. +CC @anssiko and @tidoust who might know the right way to coordinate this effort with the Second Screen WG and kick off the right reviews for incremental enhancements. Please also share some context about the ongoing Chromium experimentation, is the Explainer's limited I'll. take a closer look after those initial points are addressed. |
|
Thanks for the contribution. I assume web-platform-tests/wpt@1b61e4e matches this PR. At Working Draft stage, failing tests in https://wpt.fyi/results/window-management is an appropriate way to signal experimental status of a feature. Such features can be manually marked as experimental in the spec too, but that’s not a requirement at WD. When significant changes are made to the spec, from time to time, we will seek review feedback from various horizontal groups in a non-blocking manner. Smaller PRs do help this WG review the contribution in a timely manner. |
|
Thanks for taking a look! The Explainer and security and privacy files are just copies from the https://github.com/explainers-by-googlers/additional-windowing-controls with just removing a leftover about the The algorithm already mentions transient activation, but not the For the Platform Support I was planning to release it initially on ChromeOS because there's already a high business need for it, and from the Chromium codebase we have the most control over the host operating system window transitions. It works quite well on X11 Linux, Windows and MacOS with some flakyness in the browser tests, but that might be a problem with the test suite. From my manual testing it worked fine. Wayland Linux is the most problematic, as the window transitions are not implemented correctly and it doesn't expose an event to indicate the window has been minimized, but I'm trying to do something about this. If having a bulletproof implementation is not required, the origin trials for all platforms at once seem to me like a better idea. As for Android freeform, I haven't yet tried it. Correct, these are the tests to the feature. They are not very thorough - I couldn't find a way to create a standalone web application window/set web app scope using the web platform test (there's only a Chromium internal function |
This commit adds the installed application requirement to use the Additional Windowing Controls methods (window.maximize, window.minimize, window.restore and window.setResizable).
|
I updated the spec to feature a requirement for the app to be an installed web application. |
michaelwasserman
left a comment
There was a problem hiding this comment.
This is in decent shape, I just have a couple comments. Thanks for your patience.
This commit incorporates feedback from the review, that is abstracting a method to request a window display state change and changing one paragraph title.
michaelwasserman
left a comment
There was a problem hiding this comment.
lgtm with a heading update.
I also left some non-blocking thoughts for potential followup.
| The browsing context is displayed in the [=display state/maximized=] display state. | ||
| <dt><dfn>fullscreen</dfn> | ||
| <dd> | ||
| The browsing context is displayed in the [=display state/fullscreen=] display state. |
There was a problem hiding this comment.
Not blocking, just a thought: This might deserve a note about the possible distinctions between browser window fullscreen and web content fullscreen (e.g. when a DOM element is fullscreen, vs when the browser window is made fullscreen).
|
|
||
| 1. Let |promise| be [=/a new promise=]. | ||
|
|
||
| 1. If [=this=]'s [=relevant global object=]'s [=associated Document=] is not [=allowed to use=] the [=policy-controlled feature=] named "{{PermissionPolicy/window-management}}", then [=/reject=] |promise| with a {{"NotAllowedError"}} {{DOMException}} and abort these steps. |
There was a problem hiding this comment.
Eventually, this should consider interactions between separate windows; e.g. windowA can call windowB = open('foo.html', '_blank', 'popup') and then call windowB.restore (from minimized) when the user clicks on windowA, so there might be two separate relevant global objects, and we'd want to consume transient activation from one while invoking the window display state change on another.
SHA: ae0b0dc Reason: push, by michaelwasserman Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: ae0b0dc Reason: push, by michaelwasserman Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit adds the Additional Windowing Controls API to Window Management spec.
Preview | Diff