From e05c5088297aa71bdc4359947b332b69922757eb Mon Sep 17 00:00:00 2001 From: Joey Arhar Date: Wed, 21 Jun 2023 00:56:09 -0700 Subject: [PATCH] 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: * https://github.com/w3c/csswg-drafts/issues/4998 * https://github.com/w3c/csswg-drafts/issues/6939 * https://github.com/w3c/csswg-drafts/issues/7845 * https://github.com/w3c/csswg-drafts/issues/8240 Tests: https://github.com/web-platform-tests/wpt/pull/39828. --- source | 46 ++++++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/source b/source index c1cc1a2d8e0..ecd13fd0e3b 100644 --- a/source +++ b/source @@ -3326,10 +3326,6 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute define how the Fullscreen API interacts with HTML:

The following features are defined in CSS Multi-column Layout. HTMLDialogElement : HTMLElement {

  • If this's node document's top layer does not - already contain this, then add this to this's node - document's top layer.

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

  • Set this's previously focused element to the focused element.

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

  • -

    If at any time a dialog element is removed from a Document, then if that dialog is in that - Document's top layer, it must be removed from it. Also, set the dialog element's - is modal flag to false. +

    The dialog HTML element removing steps, given removedNode + and oldParent, are if removedNode's node document's top + layer contains removedNode, then + remove an element from the top layer immediately given removedNode.

    The close(returnValue) method steps are: @@ -60444,8 +60444,8 @@ interface HTMLDialogElement : HTMLElement {

  • Remove subject's open attribute.

  • -
  • If the is modal flag of subject is true, then remove it from its Document's top layer.

  • +
  • If the is modal flag of subject is true, then request an + element to be removed from the top layer given subject.

  • Let wasModal be the value of subject's is modal flag.

  • @@ -77024,9 +77024,9 @@ interface VisibilityStateEntry : PerformanceEntry descendants can become inert in a similar fashion.

    The dialog element's showModal() method causes this mechanism to trigger, by - adding the dialog element to its node - document's top layer.

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

    The inert attribute

    @@ -82562,7 +82562,7 @@ dictionary DragEventInit : MouseEventInit {
  • Let originallyFocusedElement be document's focused area of the document's DOM anchor.

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

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

  • Set element's popover visibility state to showing.

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

    + +
  • Request an element to be removed from the top layer given + element.

  • -
  • Remove element from the top - layer.

  • +
  • Otherwise, remove an element from the top layer immediately given + element.

  • Set element's popover visibility state to hidden.

  • @@ -102444,6 +102447,9 @@ import "https://example.com/foo/../module2.mjs";
  • For each fully active Document in docs, update the rendering or user interface of that Document and its node navigable to reflect the current state.

  • + +
  • For each fully active Document doc in + docs run process top layer removals given doc.