The Viewport Segments APIs allows developers to adapt their website/webapp layout to target foldable devices. The viewport segments defines the position and dimensions of a logically separate region of the viewport. Viewport segments are created when the viewport is split by one or more hardware features (such as a fold or a hinge between separate displays) that act as a divider; segments are the regions of the viewport that can be treated as logically distinct by the author. This is the sister of the Device Posture API (which is already stable) and both APIs are expected to be used to fully target foldable devices. Developers can access the information using JavaScript or CSS.
This is a new API, risk is that it fails to get adoption.
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
None
Besides the usual DevTools debugging of the CSS and JavaScript API, few specific devices have been added into the Device Emulation mode.
Windows and Android are for now the platforms where the viewport segment make the most sense (there is no available devices on the other OSes).
There are hooks in WebDriver to allow emulating various type of folds (size, orientation, position).
Shipping on desktop | 138 |
Origin trial desktop first | 125 |
Origin trial desktop last | 128 |
DevTrial on desktop | 116 |
Shipping on Android | 138 |
Origin trial Android first | 125 |
Origin trial Android last | 128 |
DevTrial on Android | 123 |
Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).
NoneThanks!Would it be possible to update the explainer to point to all the different moving parts of this, and ping the TAG and the vendor position requests, as they all seem rather old.
The TAG specifically didn't really review this 5 years ago, and delegated to the CSSWG. It's worthwhile to ask them if they are happy with this as it turned out.
Looking at the linked WPTs, just 1 out of 3 is passing in Chrome Canary with experimental features enabled: https://wpt.fyi/results/viewport-segments?label=master&label=experimental&alignedIs that the expected result?
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/b80f2a43-2c3d-47d9-89a0-5061698ab093n%40chromium.org.