Skip to content

Commit 8430871

Browse files
authored
Rely on CSS Positioned Layout Module for top layer
This change moves the top layer references from Fullscreen to CSS and uses the new algorithms to add and remove from the top layer. Moving the top layer concept to CSS has been discussed in these issues: * w3c/csswg-drafts#4998 * w3c/csswg-drafts#6939 * w3c/csswg-drafts#7845 * w3c/csswg-drafts#8240 Tests: web-platform-tests/wpt#39828.
1 parent 3824cd6 commit 8430871

File tree

1 file changed

+26
-20
lines changed

1 file changed

+26
-20
lines changed

source

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3326,10 +3326,6 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
33263326
define how the Fullscreen API interacts with HTML:

33273327

33283328
    3329-
  • top layer (an
  • 3330-
    ordered set) and its
    3331-
    add
    3332-
    operation
    33333329
  • requestFullscreen()
  • 33343330
  • run the fullscreen steps
  • 33353331
  • fullscreen flag
  • @@ -3799,6 +3795,12 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
    37993795
  • absolutely-positioned
  • 38003796
  • The 'position' property and its
  • 38013797
    'static' value
    3798+
  • The top layer
  • 3799+
    (an ordered set)
    3800+
  • add an element to the top layer
  • 3801+
  • request an element to be removed from the top layer
  • 3802+
  • remove an element from the top layer immediately
  • 3803+
  • process top layer removals
  • 38023804
    38033805

    38043806

    The following features are defined in CSS Multi-column Layout.

    @@ -60348,9 +60350,8 @@ interface HTMLDialogElement : HTMLElement {
    6034860350
    6034960351

    6035060352
  • If this's node document's top layer does not

  • 60351-
    already contain this, then
    60352-
    data-x="top-layer-add">add this to this's node
    60353-
    document's top layer.

    60353+
    already contain this, then add an element
    60354+
    to the top layer given this.

    6035460355

    6035560356
  • Set this's previously focused element to the

  • 6035660357
    focused element.

    @@ -60400,11 +60401,10 @@ interface HTMLDialogElement : HTMLElement {
    6040060401
  • Set topDocument's autofocus processed flag to true.

  • 6040160402
    6040260403

    60403-

    If at any time a dialog element is

    60404-
    document">removed from a Document, then if that dialog is in that
    60405-
    Document's top layer, it must be
    60406-
    data-x="list remove">removed from it. Also, set the dialog element's
    60407-
    is modal flag to false.
    60404+

    The dialog HTML element removing steps, given removedNode

    60405+
    and oldParent, are if removedNode's node document's top
    60406+
    layer contains removedNode, then
    60407+
    remove an element from the top layer immediately given removedNode.

    6040860408

    6040960409

    The

    6041060410
    data-x="dom-dialog-close">close(returnValue) method steps are:
    @@ -60425,8 +60425,8 @@ interface HTMLDialogElement : HTMLElement {
    6042560425
  • Remove subject's open

  • 6042660426
    attribute.

    6042760427

    60428-
  • If the is modal flag of subject is true, then data-x="list

  • 60429-
    remove">remove it from its Document's top layer>.

    60428+
  • If the is modal flag of subject is true, then >request an

  • 60429+
    element to be removed from the top layer given subject>.

    6043060430

    6043160431
  • Let wasModal be the value of subject's is

  • 6043260432
    modal flag.

    @@ -77005,9 +77005,9 @@ interface VisibilityStateEntry : PerformanceEntry
    7700577005
    tree descendants can become inert in a similar fashion.

    7700677006

    7700777007

    The dialog element's

    77008-
    data-x="dom-dialog-showModal">showModal() method causes this mechanism to trigger, by
    77009-
    data-x="top-layer-add">adding the dialog element to its node
    77010-
    document's top layer.

    77008+
    data-x="dom-dialog-showModal">showModal() method causes this mechanism to trigger, by
    77009+
    data-x="add an element to the top layer">adding the dialog element to its
    77010+
    node document's top layer.

    7701177011

    7701277012

    The inert attribute

    7701377013

    @@ -82543,7 +82543,7 @@ dictionary DragEventInit : MouseEventInit {
    8254382543
  • Let originallyFocusedElement be document's focused area of the

  • 8254482544
    document's DOM anchor.

    8254582545

    82546-
  • Add element to document's top layer>.

  • 82546+
  • Add an element to the top layer given element>.

  • 8254782547

    8254882548
  • Set element's popover visibility state to

  • 8254982549
    data-x="popover-showing-state">showing.

    @@ -82678,11 +82678,14 @@ dictionary DragEventInit : MouseEventInit {
    8267882678
    data-x="event-beforetoggle">beforetoggle event could have disconnected
    8267982679
    element or changed its popover attribute.

    8268082680
    82681+
    82682+
  • Request an element to be removed from the top layer given

  • 82683+
    element.

    8268182684
    8268282685
    8268382686

    82684-
  • Removespan> element from the <span>top

  • 82685-
    layer>.

    82687+
  • Otherwise, <span>remove an element from the top layer immediatelyspan> given

  • 82688+
    element>.

    8268682689

    8268782690
  • Set element's popover visibility state to

  • 8268882691
    data-x="popover-hidden-state">hidden.

    @@ -102139,6 +102142,9 @@ import "https://example.com/foo/../module2.mjs";
    102139102142
  • For each fully active Document in docs, update the

  • 102140102143
    rendering or user interface of that Document and its node navigable
    102141102144
    to reflect the current state.

    102145+
    102146+
  • For each fully active Document doc in

  • 102147+
    docs run process top layer removals given doc.

    102142102148
    102143102149
    102144102150

    0 commit comments

    Comments
     (0)