From 666438755d2f252be1d1f73d8214ac494489d32c Mon Sep 17 00:00:00 2001 From: Tab Atkins Jr Date: Tue, 23 May 2023 07:54:56 -0700 Subject: [PATCH] Remove top layer definitions, now that CSS Position 4 contains them MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/whatwg/html/pull/9093 for HTML changes. Co-authored-by: Anne van Kesteren Co-authored-by: Philip Jägenstedt --- fullscreen.bs | 111 ++++++++------------------------------------------ 1 file changed, 18 insertions(+), 93 deletions(-) diff --git a/fullscreen.bs b/fullscreen.bs index 2d77c61..e72a51e 100644 --- a/fullscreen.bs +++ b/fullscreen.bs @@ -16,6 +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 + type:dfn; text:top layer
@@ -68,13 +71,14 @@ is an ordered set of (string, element) tuples. It is
 
  
  • Set element's fullscreen flag. -

  • Add element to element's node document's - top layer. +

  • Remove from the top layer immediately given 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 it from -its node document's top layer. +fullscreen flag and iframe fullscreen flag (if any), and +remove from the top layer immediately given element.

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

  • If document's top layer contains node, - remove node from document's top layer. + 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, @@ -585,88 +589,6 @@ or call to {{Document/exitFullscreen()}} whenever the user agent deems it necess

    This section is to be interpreted equivalently to the Rendering section of HTML. [[!HTML]] -

    Long term CSS will define the top layer concept and its associated -::backdrop pseudo-element as part of CSS' stacking context model. Patching CSS -as done here is sketchy as hell. - - -

    New stacking layer

    - -

    This specification introduces a new stacking layer to the -Elaborate description of Stacking Contexts of CSS -2.1. It is called the top layer, comes after step 10 in the painting order, and is -therefore rendered closest to the user within a viewport. Each document has one -associated viewport and therefore also one top layer. [[!CSS]] - -

    The terminology used in this and following subsection attempts to match CSS 2.1 -Appendix E. - -

    The top layer is an ordered set of elements, rendered in the order they appear in -the set. The last element in the set is rendered last, and thus appears on top. - -

    The z-index property has no effect in the top layer. - -

    Each element and ::backdrop pseudo-element in a top layer has the -following characteristics: - -

      -
    • It generates a new stacking context. - -

    • Its parent stacking context is the root stacking context. - -

    • If it consists of multiple layout boxes, the first box is used. - - -

    • -

      It is rendered as an atomic unit as if it were a sibling of its root. - -

      Ancestor elements with overflow, opacity, masks, etc. cannot affect - it. - -

    • If its position property computes to fixed, its containing block - is the viewport, and the initial containing block otherwise. - -

    • If it is an element, it and its ::backdrop pseudo-element are not - rendered if its shadow-including inclusive ancestor has the display property - set to none. - -

    • If its specified display property is contents, it computes to - block. - -

    • If its specified position property is not absolute or - fixed, it computes to absolute. - -

    • Its outline, if any, is to be rendered before step 10 in the painting order. - -

    • Unless overridden by another specification, its static position for left, - right, and top is zero. -

    - -

    To add an element to a top layer, -remove it from top layer and then append it to -top layer. - -

    In other words, element is moved to the end of top layer if it -is already present. - - -

    ::backdrop pseudo-element

    - -

    Each element in a top layer has a -::backdrop pseudo-element. This pseudo-element -is a box rendered immediately below the element (and above the element before the element in the -set, if any), within the same top layer. - -

    The ::backdrop pseudo-element can be used to create a backdrop -that hides the underlying document for an element in a top layer (such as an element that is -displayed fullscreen). - -

    It does not inherit from any element and is not inherited from. No restrictions are made on what -properties apply to this pseudo-element either. - - -

    :fullscreen pseudo-class

    @@ -711,11 +633,6 @@ iframe:fullscreen { padding:0 !important; } -::backdrop { - position:fixed; - inset:0; -} - *|*:not(:root):fullscreen::backdrop { background:black; } @@ -743,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 @@ -761,6 +679,13 @@ delivered with the document through which it is nested. +

    + +This specification previously hosted the definitions of ::backdrop +and the concept of the document's top layer. + + +

    Acknowledgments

    Many thanks to Robert O'Callahan for designing the initial model and being awesome. @@ -791,7 +716,7 @@ Riff Jiang, Rune Lillesveen, Sigbjørn Vik, Simon Pieters, -Tab Atkins, +Tab Atkins-Bittner, Takayoshi Kochi, Theresa O'Connor, triple-underscore,