Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 61d9a441f90ea63b76127680b19c0d11df7a3bc5
      
https://github.com/WebKit/WebKit/commit/61d9a441f90ea63b76127680b19c0d11df7a3bc5
  Author: Brent Fulgham <[email protected]>
  Date:   2026-08-14 (Fri, 14 Aug 2026)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-svg-hittest-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-svg-hittest.html
    A 
LayoutTests/platform/ios/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-svg-hittest-expected.txt
    M Source/WebCore/html/HTMLDialogElement.cpp

  Log Message:
  -----------
  [Interop] Correct focus restore behavior to match spec
https://bugs.webkit.org/show_bug.cgi?id=321623
rdar://184751412

Reviewed by Tim Nguyen.

showModal() skipped the top layer insertion when the dialog was already in the 
top layer,
so a dialog whose open attribute was removed directly rather than via close() 
kept its old
stacking position when shown again. Per css-position-4, adding an element to 
the top layer
removes it first and re-appends it, making it topmost. This matches 
DocumentFullscreen's
existing behavior for fullscreen elements.

Note Chrome does not yet match this behavior.

This change also fixes a WPT test issue that caused our ports to fail. A button 
click
cleanup step that is present in other similar tests appears to have been lost 
when
the-dialog-element/inert-svg-hittest.html was adapted from 
inert/inert-svg-hittest.html.
This creates a cross-test state leak that may have affected other things 
(besides causing
this individual failure). This should be pushed upstream once this PR lands.

* 
LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-svg-hittest-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-svg-hittest.html:
* 
LayoutTests/platform/ios/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-svg-hittest-expected.txt:
 Copied from 
LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-svg-hittest-expected.txt.
* Source/WebCore/html/HTMLDialogElement.cpp:
(WebCore::HTMLDialogElement::showModal):
(WebCore::HTMLDialogElement::close):

Canonical link: https://commits.webkit.org/319173@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to