From 5613e81ee0c36c7da2d85ac83bc5f5342c9f3b01 Mon Sep 17 00:00:00 2001 From: Tab Atkins-Bittner Date: Thu, 13 Apr 2023 11:39:51 -0700 Subject: [PATCH 01/14] Remove top layer definitions, now that CSS Position 4 contains them. Reword algos as appropriate. --- fullscreen.bs | 118 ++++++++------------------------------------------ 1 file changed, 17 insertions(+), 101 deletions(-) diff --git a/fullscreen.bs b/fullscreen.bs index aad0df6..e1a3651 100644 --- a/fullscreen.bs +++ b/fullscreen.bs @@ -7,6 +7,7 @@ Text Macro: LATESTRD 2023-01 Abstract: The Fullscreen API standard defines an API for elements to display themselves fullscreen. Translation: ja https://triple-underscore.github.io/fullscreen-ja.html Markup Shorthands: css no +Ignore MDN Failure: ::backdrop-pseudo-element
@@ -661,6 +661,13 @@ delivered with the document through which it is nested.
 

This prevents e.g. content from third parties to go fullscreen without explicit permission. +

+ +This specification previously hosted the definitions of ::backdrop +and the concept of the [=Document/top layer=]. + +

Acknowledgments

From 5be19022d792ec1199f9876625cedcf7d2748b56 Mon Sep 17 00:00:00 2001 From: Tab Atkins Jr Date: Thu, 4 May 2023 10:49:16 -0700 Subject: [PATCH 04/14] Update fullscreen.bs Co-authored-by: Anne van Kesteren --- fullscreen.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fullscreen.bs b/fullscreen.bs index 9796436..db4ccfd 100644 --- a/fullscreen.bs +++ b/fullscreen.bs @@ -665,7 +665,7 @@ delivered with the document through which it is nested. Appendix A: Previously-Hosted Definitions This specification previously hosted the definitions of ::backdrop -and the concept of the [=Document/top layer=]. +and the concept of the document's [=Document/top layer=]. From 81fb7809440e3398c7845092622a8b0ab6d050c2 Mon Sep 17 00:00:00 2001 From: Tab Atkins-Bittner Date: Tue, 16 May 2023 16:31:23 -0700 Subject: [PATCH 05/14] When fullscreening, remove the element from the top layer before adding it, so it'll cycle to the end. #223 --- fullscreen.bs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fullscreen.bs b/fullscreen.bs index db4ccfd..eed071b 100644 --- a/fullscreen.bs +++ b/fullscreen.bs @@ -63,8 +63,8 @@ stated otherwise it is unset. is an ordered set of (string, element) tuples. It is initially empty.

To fullscreen an element, set element's fullscreen flag. -If element is not currently [=in the top layer=] of its node document, -[=add to the top layer|add it to the top layer=] of its node document. +[=Request removal from the top layer=] for |element| from its [=node document=], then +[=add to the top layer|add it to the top layer=] of its [=node document=].

To unfullscreen an element, unset element's fullscreen flag and iframe fullscreen flag (if any), and From b858a8c3784bbf42f18cec2562310f3a28bcc855 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= Date: Wed, 17 May 2023 11:22:37 +0200 Subject: [PATCH 06/14] Update fullscreen.bs --- fullscreen.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fullscreen.bs b/fullscreen.bs index eed071b..27c879a 100644 --- a/fullscreen.bs +++ b/fullscreen.bs @@ -68,7 +68,7 @@ is an ordered set of (string, element) tuples. It is

To unfullscreen an element, unset element's fullscreen flag and iframe fullscreen flag (if any), and -request removal from the top layer for it from its node document. +remove from the top layer immediately given |element|'s node document and |element|.

To unfullscreen a document, unfullscreen all elements, within document's From a20f5872ba842babc422cf0d7bc95cfa70be5a1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= Date: Wed, 17 May 2023 11:29:44 +0200 Subject: [PATCH 07/14] Apply suggestions from code review --- fullscreen.bs | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/fullscreen.bs b/fullscreen.bs index 27c879a..2c6f201 100644 --- a/fullscreen.bs +++ b/fullscreen.bs @@ -57,14 +57,14 @@ stated otherwise it is unset.

All documents have an associated fullscreen element. The fullscreen element is the topmost element in the document's -[=Document/top layer=] whose fullscreen flag is set, if any, and null otherwise. +top layer whose fullscreen flag is set, if any, and null otherwise.

All documents have an associated list of pending fullscreen events, which is an ordered set of (string, element) tuples. It is initially empty.

To fullscreen an element, set element's fullscreen flag. -[=Request removal from the top layer=] for |element| from its [=node document=], then -[=add to the top layer|add it to the top layer=] of its [=node document=]. +Request removal from the top layer given |element|'s node document and |element|, then +add to the top layer given |element|'s node document and |element|.

To unfullscreen an element, unset element's fullscreen flag and iframe fullscreen flag (if any), and @@ -83,7 +83,7 @@ is an ordered set of (string, element) tuples. It is

  • If document's fullscreen element is null, terminate these steps.

  • Unfullscreen elements whose fullscreen flag is - set, within document's [=Document/top layer=], except for document's + set, within document's top layer, except for document's fullscreen element.

  • Exit fullscreen document. @@ -111,11 +111,10 @@ these steps:

  • Otherwise, unfullscreen node.

  • -

    If document's [=Document/top layer=] contains node, - remove from the top layer immediately node from document's - [=Document/top layer=]. +

    If document's top layer contains node, + remove from the top layer immediately given document and node. -

    Other specifications can add and remove elements from [=Document/top layer=], so +

    Other specifications can add and remove elements from top layer, so node might not be document's fullscreen element. For example, node could be an open <{dialog}> element. @@ -403,9 +402,9 @@ getter steps are:

    A document is said to be a simple fullscreen document if there is exactly one -element in its [=Document/top layer=] that has its fullscreen flag set. +element in its top layer that has its fullscreen flag set. -

    A document with two elements in its [=Document/top layer=] can be a +

    A document with two elements in its top layer can be a simple fullscreen document. For example, in addition to the fullscreen element there could be an open <{dialog}> element. @@ -439,7 +438,7 @@ could be an open <{dialog}> element.

    This is the set of documents for which the fullscreen element will be unfullscreened, but the last document in docs might - have more than one element in its [=Document/top layer=] with the fullscreen flag set, + have more than one element in its top layer with the fullscreen flag set, in which case that document will still remain in fullscreen. @@ -665,7 +664,7 @@ delivered with the document through which it is nested. Appendix A: Previously-Hosted Definitions This specification previously hosted the definitions of ::backdrop -and the concept of the document's [=Document/top layer=]. +and the concept of the document's top layer. From bc648d4a1cfad1c2345ad0c7ccdc0afda2c0035b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= Date: Wed, 17 May 2023 11:30:06 +0200 Subject: [PATCH 08/14] Update fullscreen.bs --- fullscreen.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fullscreen.bs b/fullscreen.bs index 2c6f201..d473f29 100644 --- a/fullscreen.bs +++ b/fullscreen.bs @@ -72,7 +72,7 @@ is an ordered set of (string, element) tuples. It is

    To unfullscreen a document, unfullscreen all elements, within document's -[=Document/top layer=], whose fullscreen flag is set. +top layer, whose fullscreen flag is set.


    From 3669cee5f992b54b4df98db43db03cbcbb66cb31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= Date: Mon, 22 May 2023 13:09:25 +0200 Subject: [PATCH 09/14] Apply suggestions from code review --- fullscreen.bs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fullscreen.bs b/fullscreen.bs index bb3acff..456dcc0 100644 --- a/fullscreen.bs +++ b/fullscreen.bs @@ -69,14 +69,14 @@ is an ordered set of (string, element) tuples. It is
  • Set element's fullscreen flag. -

  • Request removal from the top layer given |element|'s node document and |element|. +

  • Request removal from the top layer given element. -

  • Add to the top layer given |element|'s node document and |element|. +
  • Add to the top layer given element.

    To unfullscreen an element, unset element's fullscreen flag and iframe fullscreen flag (if any), and -remove from the top layer immediately given |element|'s node document and |element|. +remove from the top layer immediately given element.

    To unfullscreen a document, unfullscreen all elements, within document's @@ -120,7 +120,7 @@ these steps:

  • If document's top layer contains node, - remove from the top layer immediately given document and node. + remove from the top layer immediately given node.

    Other specifications can add and remove elements from top layer, so node might not be document's fullscreen element. For example, From 2795f388ac5c8ff56b26e105a74da05ba33dd32d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= Date: Mon, 22 May 2023 13:16:10 +0200 Subject: [PATCH 10/14] Simplify top layer references using link-defaults --- fullscreen.bs | 47 +++++++++++++++++------------------------------ 1 file changed, 17 insertions(+), 30 deletions(-) diff --git a/fullscreen.bs b/fullscreen.bs index 456dcc0..fe9dc36 100644 --- a/fullscreen.bs +++ b/fullscreen.bs @@ -16,7 +16,9 @@ spec:dom spec:infra type:dfn; for:set; text:for each type:dfn; text:string -spec:css-position-4; type:selector; text: ::backdrop +spec:css-position-4 + type:selector; text: ::backdrop + type:dfn; text:top layer

  • @@ -57,30 +59,22 @@ stated otherwise it is unset.
     
     

    All documents have an associated fullscreen element. The fullscreen element is the topmost element in the document's -top layer whose fullscreen flag is set, if any, and null otherwise. +top layer whose fullscreen flag is set, if any, and null otherwise.

    All documents have an associated list of pending fullscreen events, which is an ordered set of (string, element) tuples. It is initially empty. -

    To fullscreen an element: - -

      -
    1. Run hide all popovers given element's node document. - -

    2. Set element's fullscreen flag. - -

    3. Request removal from the top layer given element. - -

    4. Add to the top layer given element. -
    +

    To fullscreen an element, set element's fullscreen flag. +Request removal from the top layer given |element|'s node document and |element|, then +add to the top layer given |element|'s node document and |element|.

    To unfullscreen an element, unset element's fullscreen flag and iframe fullscreen flag (if any), and -remove from the top layer immediately given element. +remove from the top layer immediately given |element|'s node document and |element|.

    To unfullscreen a document, unfullscreen all elements, within document's -top layer, whose fullscreen flag is set. +top layer, whose fullscreen flag is set.


    @@ -91,7 +85,7 @@ is an ordered set of (string, element) tuples. It is
  • If document's fullscreen element is null, terminate these steps.

  • Unfullscreen elements whose fullscreen flag is - set, within document's top layer, except for document's + set, within document's top layer, except for document's fullscreen element.

  • Exit fullscreen document. @@ -119,10 +113,10 @@ these steps:

  • Otherwise, unfullscreen node.

  • -

    If document's top layer contains node, - remove from the top layer immediately given node. +

    If document's top layer contains node, + remove from the top layer immediately given document and node. -

    Other specifications can add and remove elements from top layer, so +

    Other specifications can add and remove elements from top layer, so node might not be document's fullscreen element. For example, node could be an open <{dialog}> element. @@ -240,10 +234,6 @@ if all of the following are true, and false otherwise:

  • element's node document is allowed to use the "fullscreen" feature. - -

  • element namespace is not the HTML namespace or - element's popover visibility state is hidden.

    @@ -280,9 +270,6 @@ are: algorithm is triggered by a user generated orientation change. -
  • If error is false, then consume user activation given - pendingDoc's relevant global object. -

  • Return promise, and run the remaining steps in parallel.

  • @@ -417,9 +404,9 @@ getter steps are:

    A document is said to be a simple fullscreen document if there is exactly one -element in its top layer that has its fullscreen flag set. +element in its top layer that has its fullscreen flag set. -

    A document with two elements in its top layer can be a +

    A document with two elements in its top layer can be a simple fullscreen document. For example, in addition to the fullscreen element there could be an open <{dialog}> element. @@ -453,7 +440,7 @@ could be an open <{dialog}> element.

    This is the set of documents for which the fullscreen element will be unfullscreened, but the last document in docs might - have more than one element in its top layer with the fullscreen flag set, + have more than one element in its top layer with the fullscreen flag set, in which case that document will still remain in fullscreen. @@ -679,7 +666,7 @@ delivered with the document through which it is nested. Appendix A: Previously-Hosted Definitions This specification previously hosted the definitions of ::backdrop -and the concept of the document's top layer. +and the concept of the document's top layer. From 0dd19fc188328cd5519ff02c358334aa56865132 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= Date: Mon, 22 May 2023 13:22:57 +0200 Subject: [PATCH 11/14] Undo accidental changes from previous commit (based on old branch) --- fullscreen.bs | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/fullscreen.bs b/fullscreen.bs index fe9dc36..d3a7f94 100644 --- a/fullscreen.bs +++ b/fullscreen.bs @@ -64,13 +64,21 @@ stated otherwise it is unset.

    All documents have an associated list of pending fullscreen events, which is an ordered set of (string, element) tuples. It is initially empty. -

    To fullscreen an element, set element's fullscreen flag. -Request removal from the top layer given |element|'s node document and |element|, then -add to the top layer given |element|'s node document and |element|. +

    To fullscreen an element: + +

      +
    1. Run hide all popovers given element's node document. + +

    2. Set element's fullscreen flag. + +

    3. Request removal from the top layer given element. + +

    4. Add to the top layer given element. +

    To unfullscreen an element, unset element's fullscreen flag and iframe fullscreen flag (if any), and -remove from the top layer immediately given |element|'s node document and |element|. +remove from the top layer immediately given element.

    To unfullscreen a document, unfullscreen all elements, within document's @@ -114,7 +122,7 @@ these steps:

  • If document's top layer contains node, - remove from the top layer immediately given document and node. + remove from the top layer immediately given node.

    Other specifications can add and remove elements from top layer, so node might not be document's fullscreen element. For example, @@ -234,6 +242,10 @@ if all of the following are true, and false otherwise:

  • element's node document is allowed to use the "fullscreen" feature. + +

  • element namespace is not the HTML namespace or + element's popover visibility state is hidden.

    @@ -270,6 +282,9 @@ are: algorithm is triggered by a user generated orientation change. +
  • If error is false, then consume user activation given + pendingDoc's relevant global object. +

  • Return promise, and run the remaining steps in parallel.

  • From 0db37b2c430fc1b92f070798da0ed0ff51725204 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= Date: Mon, 22 May 2023 15:01:01 +0200 Subject: [PATCH 12/14] Update fullscreen.bs Co-authored-by: Anne van Kesteren --- fullscreen.bs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fullscreen.bs b/fullscreen.bs index d3a7f94..215cc2a 100644 --- a/fullscreen.bs +++ b/fullscreen.bs @@ -677,8 +677,7 @@ delivered with the document through which it is nested.

    This prevents e.g. content from third parties to go fullscreen without explicit permission. -

    + This specification previously hosted the definitions of ::backdrop and the concept of the document's top layer. From 47e99216d5fb4d644626d08b2c6086f5473601b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= Date: Tue, 23 May 2023 16:06:08 +0200 Subject: [PATCH 13/14] Remove from the top layer immediately --- fullscreen.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fullscreen.bs b/fullscreen.bs index 215cc2a..b1da951 100644 --- a/fullscreen.bs +++ b/fullscreen.bs @@ -71,7 +71,7 @@ is an ordered set of (string, element) tuples. It is
  • Set element's fullscreen flag. -

  • Request removal from the top layer given element. +

  • Remove from the top layer immediately given element.

  • Add to the top layer given element. From 2ff6c60b1ad367c8ed06f1986612da6536a51b7b Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Tue, 23 May 2023 16:53:09 +0200 Subject: [PATCH 14/14] Update fullscreen.bs --- fullscreen.bs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fullscreen.bs b/fullscreen.bs index b1da951..e72a51e 100644 --- a/fullscreen.bs +++ b/fullscreen.bs @@ -660,6 +660,7 @@ allow="fullscreen *">, as described in +

    Security and Privacy Considerations

    User agents should ensure, e.g. by means of an overlay, that the end user is aware something is @@ -677,6 +678,7 @@ delivered with the document through which it is nested.

    This prevents e.g. content from third parties to go fullscreen without explicit permission. +

    This specification previously hosted the definitions of ::backdrop