Intent to Ship: Conditional Focus

221 views
Skip to first unread message

Elad Alon

unread,
Oct 13, 2022, 4:24:11 PM10/13/22
to blink-dev

Contact emails

elad...@chromium.org

Explainer

https://github.com/WICG/conditional-focus/blob/main/README.md

Specification

https://w3c.github.io/mediacapture-screen-share/#dom-capturecontroller-setfocusbehavior

Design docs

https://docs.google.com/document/d/1LHJRt-ry9hwzFTbPxKrmD0VvtEFEU6lvqsD7k6wwGKM
(Note that this reflects the old API shape. There is no substantive difference; the same functionality is simply exposed on a different surface now.)

Summary

Extend the getDisplayMedia() API by adding a CaptureController object which can be passed in as a parameter. This object exposes a setFocusBehavior() method. By calling this method, an app can control whether the captured tab/window is focused when capture starts, or whether the capturing page should retain focus.



Blink component

Blink

TAG review

https://github.com/w3ctag/design-reviews/issues/679

TAG review status

Pending

Risks



Interoperability and Compatibility



Gecko: Positive (https://github.com/mozilla/standards-positions/issues/697) Jan-Ivar Bruaroey from Mozilla, and Youenn Fablet from Apple, have both collaborated with us closely in shaping the PRs of this API. They have then approved merging the PRs into w3c/mediacapture-screen-share. This is implicit support, so I'd consider it POSITIVE even though, as of the time of this writing, the official request for position has not yet been answered.

WebKit: Positive (https://github.com/WebKit/standards-positions/issues/73) Jan-Ivar Bruaroey from Mozilla, and Youenn Fablet from Apple, have both collaborated with us closely in shaping the PRs of this API. They have then approved merging the PRs into w3c/mediacapture-screen-share. This is implicit support, so I'd consider it POSITIVE even though, as of the time of this writing, the official request for position has not yet been answered.

Web developers: Positive (https://github.com/WICG/proposals/issues/37) Support from Web developers inside+outside of Google.

Other signals:

Ergonomics

N/A



Activation

N/A



Security

See design-doc.



WebView application risks

N/A



Debuggability

N/A



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

No

Supported on all Desktop platforms.



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

No

Flag name

ConditionalFocus

Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1215480

Launch bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1214483

Sample links

https://wicg.github.io/conditional-focus/demo

Estimated milestones

   Expected full-ship milestone: 109
OriginTrial desktop last108 (or up to and including 111 if delays are encountered; already approved.)
OriginTrial desktop first102


Anticipated spec changes

N/A



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5646614535340032

Links to previous Intent discussions

Intent to prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/lbuqOGx07xY
Intent to Experiment: https://groups.google.com/a/chromium.org/g/blink-dev/c/I4RE2pbocTg
Intent to Extend Experiment: https://groups.google.com/a/chromium.org/g/blink-dev/c/CLmSojRQHoc/m/X-AroW-UAQAJ


This intent message was generated by Chrome Platform Status.

Elad Alon

unread,
Oct 18, 2022, 3:44:47 AM10/18/22
to blink-dev, Elad Alon
Update - Firefox have officially marked this as "positive".

Yoav Weiss

unread,
Oct 18, 2022, 11:11:52 PM10/18/22
to Elad Alon, blink-dev
Any particular reason?
 


Flag name

ConditionalFocus

Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1215480

Launch bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1214483

Sample links

https://wicg.github.io/conditional-focus/demo

Estimated milestones

   Expected full-ship milestone: 109
OriginTrial desktop last108 (or up to and including 111 if delays are encountered; already approved.)
OriginTrial desktop first102


Anticipated spec changes

N/A



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5646614535340032

Links to previous Intent discussions

Intent to prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/lbuqOGx07xY
Intent to Experiment: https://groups.google.com/a/chromium.org/g/blink-dev/c/I4RE2pbocTg
Intent to Extend Experiment: https://groups.google.com/a/chromium.org/g/blink-dev/c/CLmSojRQHoc/m/X-AroW-UAQAJ


This intent message was generated by Chrome Platform Status.

--
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 on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAMO6jDNmAMDVMxEKQRgVtHv7Cx_3%2BiHYWOCBi-VZ9%3DWqX6t5pw%40mail.gmail.com.

Elad Alon

unread,
Oct 19, 2022, 3:36:21 AM10/19/22
to blink-dev, yoav...@chromium.org, blink-dev, Elad Alon
The main reason for partial WPT coverage is that the API is formulated with some key MAY-s, in order to accommodate Safari's different media-picker model. The errors should be the same on all platforms, and are tested. But whether the focus goes to the captured or capturing page is left to the UA to decide, and so cannot be effectively tested by WPT. (Chromium does have browser tests for that.)

A strong secondary reason, btw, is the disproportionate difficulty of testing this API reliably using WPT.

Yoav Weiss

unread,
Oct 19, 2022, 4:39:13 AM10/19/22
to Elad Alon, blink-dev
OK, so we have WPTs covering the currently testable parts of the API, as required by spec and browser tests covering the UA-specific parts. Makes sense.


On Wed, Oct 19, 2022 at 9:36 AM Elad Alon <elad...@google.com> wrote:
The main reason for partial WPT coverage is that the API is formulated with some key MAY-s, in order to accommodate Safari's different media-picker model. The errors should be the same on all platforms, and are tested. But whether the focus goes to the captured or capturing page is left to the UA to decide, and so cannot be effectively tested by WPT. (Chromium does have browser tests for that.)

A strong secondary reason, btw, is the disproportionate difficulty of testing this API reliably using WPT.

Might be worthwhile to file bugs against WPT/TestDriver for issues you ran into, or missing features.

Chris Harrelson

unread,
Oct 19, 2022, 11:53:47 AM10/19/22
to Yoav Weiss, Elad Alon, blink-dev
LGTM1

Nit: please don't record a result unless it was noted explicitly on the standards position issue.
 

Yoav Weiss

unread,
Oct 19, 2022, 11:55:05 AM10/19/22
to blink-dev, Chris Harrelson, elad...@google.com, blink-dev, Yoav Weiss
LGTM2

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Elad Alon

unread,
Oct 19, 2022, 11:55:37 AM10/19/22
to blink-dev, yoav...@chromium.org, Chris Harrelson, Elad Alon, blink-dev

Daniel Bratell

unread,
Oct 19, 2022, 11:58:25 AM10/19/22
to Elad Alon, blink-dev, yoav...@chromium.org, Chris Harrelson

LGTM3

/Daniel

Sent with my Thunderbird

Elad Alon

unread,
Oct 20, 2022, 10:37:23 AM10/20/22
to blink-dev, Daniel Bratell, yoav...@chromium.org, Chris Harrelson, Elad Alon
Thanks for approving.
May this be a gapless ship? This would show consideration to our OT partners and their effort.

Chris Harrelson

unread,
Oct 20, 2022, 11:30:16 AM10/20/22
to Elad Alon, blink-dev, Daniel Bratell, yoav...@chromium.org


On Thu, Oct 20, 2022, 7:37 AM 'Elad Alon' via blink-dev <blin...@chromium.org> wrote:
Thanks for approving.
May this be a gapless ship? This would show consideration to our OT partners and their effort.

Per a recent policy change, gapless is always allowed without approvals needed.


Reply all
Reply to author
Forward
0 new messages