From f347e0fc9f1a3256d854e0ed438e1ae5d72d6c3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Daoust?= Date: Wed, 24 Aug 2016 15:35:16 +0200 Subject: [PATCH 1/2] Clarified the default presentation request mechanism This update creates a definition of "default presentation request" in the "Common Idioms" section, and reformulates the intended behavior in controlling user agents that support this mechanism. In particular, the update tries to make it clear that support for this feature is optional, and moves the check on the sandboxed presentation browsing context flag to a note since it will be done as part of the "start a presentation" algorithm. --- index.html | 53 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/index.html b/index.html index c819164..5f6cb56 100644 --- a/index.html +++ b/index.html @@ -846,6 +846,12 @@

represented by a Promise that resolves with the presentation controllers monitor.

+

+ In a controlling browsing context, the default + presentation request, which is initially set to + null, represents the request to use when the user wishes + to initiate a presentation connection from the browser chrome. +

@@ -880,23 +886,16 @@

In a controlling user agent, the defaultRequest attribute MUST return the default presentation request if any, - null otherwise. In a receiving browsing - context, it MUST return null. + null otherwise. On setting, the default + presentation request MUST be set to the new value.

- If set by the controller, the value of the defaultRequest attribute SHOULD be used by the - controlling user agent as the default presentation - request for that controlling browsing context. If the - the document object's active sandboxing flag set has the - sandboxed presentation browsing context flag set, the - controlling user agent SHOULD consider the default - presentation request for that browsing context to be - null. When the controlling user agent wishes to - initiate a PresentationConnection on the behalf of that - browsing context, it MUST start a presentation using the - default presentation request for the controller (as - if the controller had called defaultRequest.start()). + In a user agent that is a receiving user agent but not a + controlling user agent, the defaultRequest attribute MUST always return + null, and setting the defaultRequest attribute MUST be treated as a + no-op.

The controlling user agent SHOULD initiate presentation @@ -904,6 +903,23 @@

has expressed an intention to do so via a user gesture, for example by clicking a button in the browser.

+

+ To initiate presentation using the default presentation + request, the controlling user agent MUST start a + presentation using the default presentation request (as + if the controller had called defaultRequest.start()), + skipping the first step of that algorithm. +

+
+ Subsequent security steps of the start a presentation + algorithm apply. For instance, the request will fail if the + document object's active sandboxing flag set has the + sandboxed presentation browsing context flag set. +
+

+ Support for the initiation of a presentation connection from + the browser chrome is OPTIONAL. +

If a controlling user agent does not support initiation of a presentation connection from the browser chrome, setting @@ -943,13 +959,6 @@

context is created. In any other browsing context, it MUST return null.

-

- A user agent that is a receiving user agent but not a - controlling user agent MUST always return null - for the defaultRequest attribute. It MUST - treat setting the defaultRequest - attribute as a no-op. -

A user agent that is a controlling user agent but not a receiving user agent MUST always return null From 7a491a15bf5b636beba5ba8d62954994b9178c21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Daoust?= Date: Mon, 29 Aug 2016 11:08:49 +0200 Subject: [PATCH 2/2] Clarify where partial Presentation interfaces are to be implemented To avoid confusing sentences about Presentation attributes that we don't expect to be present in controlling or receiving user agents, this update makes it clear which category of user agents is to implement which partial interface definition. Also dropped "chrome" from sentences that used "browser chrome", not to restrict the mechanism to interactions with the browser window. --- index.html | 43 ++++++++++++++++++------------------------- 1 file changed, 18 insertions(+), 25 deletions(-) diff --git a/index.html b/index.html index 5f6cb56..7fd73f8 100644 --- a/index.html +++ b/index.html @@ -850,7 +850,7 @@

In a controlling browsing context, the default presentation request, which is initially set to null, represents the request to use when the user wishes - to initiate a presentation connection from the browser chrome. + to initiate a presentation connection from the browser.

@@ -876,6 +876,10 @@

Controlling user agent

+

+ Controlling user agents + MUST implement the following partial interface: +

             partial interface Presentation {
               attribute PresentationRequest? defaultRequest;
@@ -883,20 +887,11 @@ 

- In a controlling user agent, the defaultRequest attribute MUST - return the default presentation request if any, - null otherwise. On setting, the default + The defaultRequest + attribute MUST return the default presentation request if + any, null otherwise. On setting, the default presentation request MUST be set to the new value.

-

- In a user agent that is a receiving user agent but not a - controlling user agent, the defaultRequest attribute MUST always return - null, and setting the defaultRequest attribute MUST be treated as a - no-op. -

The controlling user agent SHOULD initiate presentation using the default presentation request only when the user @@ -918,11 +913,11 @@

Support for the initiation of a presentation connection from - the browser chrome is OPTIONAL. + the browser is OPTIONAL.

If a controlling user agent does not support initiation of a - presentation connection from the browser chrome, setting + presentation connection from the browser, setting defaultRequest will have no effect.
@@ -944,6 +939,10 @@

Receiving user agent

+

+ Receiving user agents MUST + implement the following partial interface: +

             partial interface Presentation {
               [SameObject] readonly attribute PresentationReceiver? receiver;
@@ -951,19 +950,13 @@ 

- In a receiving user agent, the receiver attribute MUST return - the PresentationReceiver instance associated - with the receiving browsing context and created by the - receiving user agent when the receiving browsing + The receiver attribute + MUST return the PresentationReceiver instance + associated with the receiving browsing context and created + by the receiving user agent when the receiving browsing context is created. In any other browsing context, it MUST return null.

-

- A user agent that is a controlling user agent but not a - receiving user agent MUST always return null - for the receiver attribute. -