Intent to Implement: Device Cutout Support (incl. CSS User Agent variables)

102 views
Skip to first unread message

Becca Hughes

unread,
Apr 23, 2018, 7:27:35 PM4/23/18
to blink-dev, Mounir Lamouri

Contact emails

becca...@chromium.org, mlam...@chromium.org


Design doc/Spec

Design Doc


CSS user agent properties spec

CSS safe area properties

viewport=fit spec


Summary

We are adding support for display cutouts in Blink through CSS User Agent properties and the viewport-fit meta tag. This is to add support for the display cutout API that is being released in Android P.


Motivation

Without this feature developers cannot extend their content to take advantage of the full area of the screen. This results in a degraded experience compared to native apps which will be able to take advantage of this functionality.


Risks

Interoperability and Compatibility

Edge: No signals

Firefox: No signals

Safari: Shipped (link)

Web developers: No signals


Activation

Developers can use the device cutout emulation feature in Android for testing. Widespread adoption of this feature is blocked by the release of Android P which has the Device Cutout API.


Debuggability

In the future we should add support for emulating device cutouts in the devtools but for now Android can emulate different cutouts.


Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Android and Android WebView.


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

No, but we should work with Safari to see if we can cover this with WPT.


Link to entry on the feature dashboard

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


Requesting approval to ship?

No

shospo...@gmail.com

unread,
Apr 29, 2018, 7:06:21 PM4/29/18
to blink-dev, mlam...@chromium.org
CSS constant() (mentioned via the links) changed to the standardized environment variables env(): https://drafts.csswg.org/css-env-1/

L. David Baron

unread,
Jun 15, 2018, 4:09:48 PM6/15/18
to Becca Hughes, blink-dev, Mounir Lamouri
On Monday 2018-04-23 16:27 -0700, Becca Hughes wrote:
> *Contact emailsbe...@chromium.org <becca...@chromium.org>,
> mlam...@chromium.org <mlam...@chromium.org>Design doc/SpecDesign Doc
> <https://docs.google.com/document/d/1j3jqmGRXAHzpeKeS_tLlOo4C9DsrvPOf_-PMnFzTmeE/edit?usp=sharing>CSS
> user agent properties spec
> <https://github.com/w3c/csswg-drafts/pull/1817/files>CSS safe area
> properties
> <https://github.com/w3c/csswg-drafts/pull/1819/files>viewport=fit spec
> <https://www.w3.org/TR/css-round-display-1/#viewport-fit-descriptor>SummaryWe
> are adding support for display cutouts in Blink through CSS User Agent
> properties and the viewport-fit meta tag. This is to add support for the
> display cutout API that is being released in Android P.MotivationWithout
> this feature developers cannot extend their content to take advantage of
> the full area of the screen. This results in a degraded experience compared
> to native apps which will be able to take advantage of this
> functionality.RisksInteroperability and CompatibilityEdge: No
> signalsFirefox: No signalsSafari: Shipped (link
> <https://webkit.org/blog/7929/designing-websites-for-iphone-x/>)Web
> developers: No signalsActivationDevelopers can use the device cutout
> emulation feature in Android for testing. Widespread adoption of this
> feature is blocked by the release of Android P which has the Device Cutout
> API.DebuggabilityIn the future we should add support for emulating device
> cutouts in the devtools but for now Android can emulate different cutouts.
> Will this feature be supported on all six Blink platforms (Windows, Mac,
> Linux, Chrome OS, Android, and Android WebView)?Android and Android
> WebView.Is this feature fully tested by web-platform-tests
> <https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_platform_tests.md>?No,
> but we should work with Safari to see if we can cover this with WPT.Link to
> entry on the feature dashboard
> <https://www.chromestatus.com/>https://www.chromestatus.com/feature/5710044637167616
> <https://www.chromestatus.com/feature/5710044637167616>Requesting approval
> to ship?No*

So a concern with this from Gecko implementors is that the spec
currently at https://drafts.csswg.org/css-env-1/#environment says
("ISSUE 3: define list of predefined vars") that the spec is
*going* to define the list of predefined user-agent variables, but
the spec doesn't actually have that list yet.

It's disturbing to have a spec that's getting its second
implementation already, and yet the spec doesn't contain remotely
enough information for other implementations to follow. Normally I
would expect (when the first implementor didn't do it) the second
implementor to raise (and if necessary, fix) spec issues to get the
spec to be good enough for new implementors to interoperate with
existing implementations.

-David

--
𝄞 L. David Baron http://dbaron.org/ 𝄂
𝄢 Mozilla https://www.mozilla.org/ 𝄂
Before I built a wall I'd ask to know
What I was walling in or walling out,
And to whom I was like to give offense.
- Robert Frost, Mending Wall (1914)
signature.asc

becca...@chromium.org

unread,
Jun 21, 2018, 1:55:40 PM6/21/18
to blink-dev, becca...@chromium.org, mlam...@chromium.org, Tab Atkins
+ Tab

This feature is mainly about backwards compatibility as Safari have already shipped their display cutout support.
Reply all
Reply to author
Forward
0 new messages