Intent to Implement: Window Placement

89 views
Skip to first unread message

Michael Wasserman

unread,
Nov 7, 2019, 3:50:27 PM11/7/19
to blin...@chromium.org

Contact emails

m...@chromium.org


Explainer

https://github.com/spark008/window-placement/blob/master/EXPLAINER.md



Design docs/spec

TBD


TAG review

To be requested


Summary

Allow web developers greater control over the placement of content windows when multiple screens are connected to a single device.


Motivation

As multi-display computing becomes a more common and critical part of user experiences, it becomes more important to give web developers information and tools to leverage that expanded visual environment.


This API provides tools to leverage information from the proposed Screen Enumeration feature, to enable many powerful multi-screen windowing behaviors. Use cases these APIs would enable include:


* Slide show presentation: opening the presentation, speaker notes, and presenter controls on the most appropriate screen for each window.

* Financial applications with multi-window dashboards: starting the app (re-)opens the dashboard windows across multiple monitors.

* Creative professional and medical applications that want to target display hardware with specific color depths and resolutions.


Currently, Chrome clamps window placement within the current screen, and users must manually drag windows to the desired display.


Risks


Interoperability and Compatibility

This feature aims to make Chrome's basic multi-screen window placement behavior more consistent with other browsers. New APIs will provide feature detection, so applications should be able to handle different levels of browser support.


This work will be included in the W3C Second Screen CG charter for 2020 to seek consensus and broad interoperability: https://raw.githack.com/webscreens/cg-charter/charter-2020/index.html


Firefox: No public signals


Firefox already supports window.open/moveTo/moveBy coordinates on multiple-screens. Chrome compatibility with that behavior is an early goal of this feature work.


Edge: No public signals


Microsoft has a related "Window Segments Enumeration API" proposal for dual-screen / foldable devices: https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/master/Foldables/explainer.md


Safari: No public signals

Web developers: Positive (https://github.com/spark008/screen-enumeration/issues?utf8=%E2%9C%93&q=)

This would help GSuite / Google Slides.


Ergonomics

The window.open() features string has poor ergonomics right now and this intent does NOT propose improving those ergonomics; see <https://developer.mozilla.org/en-US/docs/Web/API/Window/open#Window_features>. Instead, early work aims to align Chrome's treatment of position and size feature values with other browsers. Additional API surfaces may be extended or added, allowing for a more ergonomic shape (eg. extending async clients.openWindow() with a dictionary parameter of window options).


Activation

This feature is heavily reliant upon information about the set of screens connected to the device, which should be provided through the Screen Enumeration feature. Given that information, developers should be able to easily use this feature without waiting for third-party libraries to add support.


Security

Discussions with the security team are ongoing to explore restrictions on window placement. Firefox currently supports multi-screen window placement, so we are confident that we'll be able to navigate the security risks inherent in exposing this capability. For more information, see the W3C Security & Privacy Self-Review Questionnaire: https://github.com/spark008/window-placement/blob/master/security_and_privacy.md



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux,

Chrome OS, Android, and Android WebView)?

Yes

All Blink platforms may run on a device that is connected to multiple displays, so applications that build multi-display features may expect those features to work on any platform. Subsets of this API may function in a limited fashion (e.g. clamping requested values) when the underlying platform restricts the placement and sizing of windows. The overall API will be exposed everywhere except WebView. This API will not be supported on Android WebView because developers have primarily voiced interest for use cases in desktop applications, and the added complexity strongly exceeds developer enthusiasm for WebView support. All other Blink platforms will be supported.

Is this feature fully tested by web-platform-tests?

Yes

We plan to have full WPT coverage of this feature, but WPT does not yet cover pre-existing window placement functionality. Chrome's existing test coverage will be expanded and updated to support the new feature, and corresponding cross-browser Web Platform Tests should be added:

https://cs.chromium.org/chromium/src/third_party/blink/web_tests/fast/dom/Window/window-moveto-popup.html

https://cs.chromium.org/chromium/src/third_party/blink/web_tests/fast/dom/Window/window-resize.html


Link to entry on the Chrome Platform Status

https://www.chromestatus.com/feature/5252960583942144



This intent message was generated by Chrome Platform Status.


Reply all
Reply to author
Forward
0 new messages