Title: [291071] branches/safari-613-branch/LayoutTests
Revision
291071
Author
repst...@apple.com
Date
2022-03-09 14:16:05 -0800 (Wed, 09 Mar 2022)

Log Message

Cherry-pick r290556. rdar://problem/89525864

    Re-import inert and <dialog> WPT
    https://bugs.webkit.org/show_bug.cgi?id=237243

    Reviewed by Youenn Fablet.

    Upstream commit: https://github.com/web-platform-tests/wpt/commit/9261ca87db106c1f31f1ab4f54b8f4a2617cbc24

    LayoutTests/imported/w3c:

    * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-replaced-renderer-expected.html:
    * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-replaced-renderer-ref.html:
    * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-replaced-renderer.html:
    * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-table-column-expected.html:
    * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-table-column-ref.html:
    * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-table-column.html:
    * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/w3c-import.log:
    * web-platform-tests/inert/inert-and-contenteditable.tentative-expected.txt: Added.
    * web-platform-tests/inert/inert-and-contenteditable.tentative.html: Added.
    * web-platform-tests/inert/inert-iframe-hittest.tentative-expected.txt:
    * web-platform-tests/inert/inert-iframe-hittest.tentative.html:
    * web-platform-tests/inert/inert-iframe-tabbing.tentative-expected.txt:
    * web-platform-tests/inert/inert-iframe-tabbing.tentative.html:
    * web-platform-tests/inert/w3c-import.log:

    LayoutTests:

    * TestExpectations:
    * platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-iframe-hittest.tentative-expected.txt:
    * platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-iframe-tabbing.tentative-expected.txt:

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@290556 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Added Paths

Diff

Modified: branches/safari-613-branch/LayoutTests/ChangeLog (291070 => 291071)


--- branches/safari-613-branch/LayoutTests/ChangeLog	2022-03-09 22:15:52 UTC (rev 291070)
+++ branches/safari-613-branch/LayoutTests/ChangeLog	2022-03-09 22:16:05 UTC (rev 291071)
@@ -1,5 +1,54 @@
 2022-03-09  Russell Epstein  <repst...@apple.com>
 
+        Cherry-pick r290556. rdar://problem/89525864
+
+    Re-import inert and <dialog> WPT
+    https://bugs.webkit.org/show_bug.cgi?id=237243
+    
+    Reviewed by Youenn Fablet.
+    
+    Upstream commit: https://github.com/web-platform-tests/wpt/commit/9261ca87db106c1f31f1ab4f54b8f4a2617cbc24
+    
+    LayoutTests/imported/w3c:
+    
+    * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-replaced-renderer-expected.html:
+    * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-replaced-renderer-ref.html:
+    * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-replaced-renderer.html:
+    * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-table-column-expected.html:
+    * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-table-column-ref.html:
+    * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-table-column.html:
+    * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/w3c-import.log:
+    * web-platform-tests/inert/inert-and-contenteditable.tentative-expected.txt: Added.
+    * web-platform-tests/inert/inert-and-contenteditable.tentative.html: Added.
+    * web-platform-tests/inert/inert-iframe-hittest.tentative-expected.txt:
+    * web-platform-tests/inert/inert-iframe-hittest.tentative.html:
+    * web-platform-tests/inert/inert-iframe-tabbing.tentative-expected.txt:
+    * web-platform-tests/inert/inert-iframe-tabbing.tentative.html:
+    * web-platform-tests/inert/w3c-import.log:
+    
+    LayoutTests:
+    
+    * TestExpectations:
+    * platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-iframe-hittest.tentative-expected.txt:
+    * platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-iframe-tabbing.tentative-expected.txt:
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@290556 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2022-02-27  Tim Nguyen  <n...@apple.com>
+
+            Re-import inert and <dialog> WPT
+            https://bugs.webkit.org/show_bug.cgi?id=237243
+
+            Reviewed by Youenn Fablet.
+
+            Upstream commit: https://github.com/web-platform-tests/wpt/commit/9261ca87db106c1f31f1ab4f54b8f4a2617cbc24
+
+            * TestExpectations:
+            * platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-iframe-hittest.tentative-expected.txt:
+            * platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-iframe-tabbing.tentative-expected.txt:
+
+2022-03-09  Russell Epstein  <repst...@apple.com>
+
         Cherry-pick r289071. rdar://problem/89997434
 
     ANGLE Metal and ANGLE OpenGL cannot be initialised one after the other

Modified: branches/safari-613-branch/LayoutTests/TestExpectations (291070 => 291071)


--- branches/safari-613-branch/LayoutTests/TestExpectations	2022-03-09 22:15:52 UTC (rev 291070)
+++ branches/safari-613-branch/LayoutTests/TestExpectations	2022-03-09 22:16:05 UTC (rev 291071)
@@ -2304,10 +2304,6 @@
 imported/blink/fast/multicol/outlines-at-column-boundaries.html [ ImageOnlyFailure ]
 fast/multicol/multicol-with-child-renderLayer-for-input.html [ ImageOnlyFailure ]
 
-# Top layer tests
-webkit.org/b/229315 imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-replaced-renderer.html [ ImageOnlyFailure ]
-webkit.org/b/229315 imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-table-column.html [ ImageOnlyFailure ]
-
 # Assertion failure in MessagePort::contextDestroyed, usually attributed to later tests
 webkit.org/b/94458 http/tests/security/MessagePort/event-listener-context.html [ Skip ]
 

Modified: branches/safari-613-branch/LayoutTests/imported/w3c/ChangeLog (291070 => 291071)


--- branches/safari-613-branch/LayoutTests/imported/w3c/ChangeLog	2022-03-09 22:15:52 UTC (rev 291070)
+++ branches/safari-613-branch/LayoutTests/imported/w3c/ChangeLog	2022-03-09 22:16:05 UTC (rev 291071)
@@ -1,3 +1,63 @@
+2022-03-09  Russell Epstein  <repst...@apple.com>
+
+        Cherry-pick r290556. rdar://problem/89525864
+
+    Re-import inert and <dialog> WPT
+    https://bugs.webkit.org/show_bug.cgi?id=237243
+    
+    Reviewed by Youenn Fablet.
+    
+    Upstream commit: https://github.com/web-platform-tests/wpt/commit/9261ca87db106c1f31f1ab4f54b8f4a2617cbc24
+    
+    LayoutTests/imported/w3c:
+    
+    * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-replaced-renderer-expected.html:
+    * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-replaced-renderer-ref.html:
+    * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-replaced-renderer.html:
+    * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-table-column-expected.html:
+    * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-table-column-ref.html:
+    * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-table-column.html:
+    * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/w3c-import.log:
+    * web-platform-tests/inert/inert-and-contenteditable.tentative-expected.txt: Added.
+    * web-platform-tests/inert/inert-and-contenteditable.tentative.html: Added.
+    * web-platform-tests/inert/inert-iframe-hittest.tentative-expected.txt:
+    * web-platform-tests/inert/inert-iframe-hittest.tentative.html:
+    * web-platform-tests/inert/inert-iframe-tabbing.tentative-expected.txt:
+    * web-platform-tests/inert/inert-iframe-tabbing.tentative.html:
+    * web-platform-tests/inert/w3c-import.log:
+    
+    LayoutTests:
+    
+    * TestExpectations:
+    * platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-iframe-hittest.tentative-expected.txt:
+    * platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-iframe-tabbing.tentative-expected.txt:
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@290556 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2022-02-27  Tim Nguyen  <n...@apple.com>
+
+            Re-import inert and <dialog> WPT
+            https://bugs.webkit.org/show_bug.cgi?id=237243
+
+            Reviewed by Youenn Fablet.
+
+            Upstream commit: https://github.com/web-platform-tests/wpt/commit/9261ca87db106c1f31f1ab4f54b8f4a2617cbc24
+
+            * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-replaced-renderer-expected.html:
+            * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-replaced-renderer-ref.html:
+            * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-replaced-renderer.html:
+            * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-table-column-expected.html:
+            * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-table-column-ref.html:
+            * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-table-column.html:
+            * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/w3c-import.log:
+            * web-platform-tests/inert/inert-and-contenteditable.tentative-expected.txt: Added.
+            * web-platform-tests/inert/inert-and-contenteditable.tentative.html: Added.
+            * web-platform-tests/inert/inert-iframe-hittest.tentative-expected.txt:
+            * web-platform-tests/inert/inert-iframe-hittest.tentative.html:
+            * web-platform-tests/inert/inert-iframe-tabbing.tentative-expected.txt:
+            * web-platform-tests/inert/inert-iframe-tabbing.tentative.html:
+            * web-platform-tests/inert/w3c-import.log:
+
 2022-03-08  Russell Epstein  <repst...@apple.com>
 
         Cherry-pick r288701. rdar://problem/83734079

Modified: branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-replaced-renderer-expected.html (291070 => 291071)


--- branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-replaced-renderer-expected.html	2022-03-09 22:15:52 UTC (rev 291070)
+++ branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-replaced-renderer-expected.html	2022-03-09 22:16:05 UTC (rev 291071)
@@ -12,13 +12,7 @@
 </style>
 </head>
 <body>
-<p>Bug <a href="" Make
-NodeRenderingContext::parentRenderer and nextRenderer top layer aware
-<p>The test passes if you see a green square near the top and green rectangle in the center of the viewport.
+<p>The test passes if you see a green square near the top of the viewport.
 <div></div>
-<dialog id="dialog"></dialog>
-<script>
-document.getElementById('dialog').showModal();
-</script>
 </body>
 </html>

Added: branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-replaced-renderer-ref.html (0 => 291071)


--- branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-replaced-renderer-ref.html	                        (rev 0)
+++ branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-replaced-renderer-ref.html	2022-03-09 22:16:05 UTC (rev 291071)
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+dialog {
+    background: green;
+    border-color: green;
+}
+div {
+    content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPAQMAAAABGAcJAAAAA1BMVEUAgACc+aWRAAAADElEQVR42mNgIAEAAAAtAAH7KhMqAAAAAElFTkSuQmCC);
+}
+</style>
+</head>
+<body>
+<p>The test passes if you see a green square near the top of the viewport.
+<div></div>
+</body>
+</html>

Modified: branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-replaced-renderer.html (291070 => 291071)


--- branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-replaced-renderer.html	2022-03-09 22:15:52 UTC (rev 291070)
+++ branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-replaced-renderer.html	2022-03-09 22:16:05 UTC (rev 291071)
@@ -1,6 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
+<title>Modal dialog inside replaced renderer should not generate box</title>
 <link rel="match" href=""
 <link rel="help" href=""
 <style>
@@ -14,9 +15,7 @@
 </style>
 </head>
 <body>
-<p>Bug <a href="" Make
-NodeRenderingContext::parentRenderer and nextRenderer top layer aware
-<p>The test passes if you see a green square near the top and green rectangle in the center of the viewport.
+<p>The test passes if you see a green square near the top of the viewport.
 <div>
 <dialog id="dialog"></dialog>
 </div>

Modified: branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-table-column-expected.html (291070 => 291071)


--- branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-table-column-expected.html	2022-03-09 22:15:52 UTC (rev 291070)
+++ branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-table-column-expected.html	2022-03-09 22:16:05 UTC (rev 291071)
@@ -9,12 +9,6 @@
 </style>
 </head>
 <body>
-<p>Bug <a href="" Make
-NodeRenderingContext::parentRenderer and nextRenderer top layer aware
-<p>The test passes if you see a green rectangle in the center of the viewport.
-<dialog id="dialog"></dialog>
-<script>
-document.getElementById('dialog').showModal();
-</script>
+<p>The test passes if you see no green rectangle.
 </body>
 </html>

Added: branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-table-column-ref.html (0 => 291071)


--- branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-table-column-ref.html	                        (rev 0)
+++ branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-table-column-ref.html	2022-03-09 22:16:05 UTC (rev 291071)
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+dialog {
+    background: green;
+    border-color: green;
+}
+</style>
+</head>
+<body>
+<p>The test passes if you see no green rectangle.
+</body>
+</html>

Modified: branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-table-column.html (291070 => 291071)


--- branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-table-column.html	2022-03-09 22:15:52 UTC (rev 291070)
+++ branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-table-column.html	2022-03-09 22:16:05 UTC (rev 291071)
@@ -1,6 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
+<title>Modal dialog inside display: table-column should not generate box</title>
 <link rel="match" href=""
 <link rel="help" href=""
 <style>
@@ -14,9 +15,7 @@
 </style>
 </head>
 <body>
-<p>Bug <a href="" Make
-NodeRenderingContext::parentRenderer and nextRenderer top layer aware
-<p>The test passes if you see a green rectangle in the center of the viewport.
+<p>The test passes if you see no green rectangle.
 <div>
 <dialog id="dialog"></dialog>
 </div>

Modified: branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/w3c-import.log (291070 => 291071)


--- branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/w3c-import.log	2022-03-09 22:15:52 UTC (rev 291070)
+++ branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/w3c-import.log	2022-03-09 22:16:05 UTC (rev 291071)
@@ -77,6 +77,7 @@
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-node-is-uneditable.html
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-node-is-unfocusable.html
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-node-is-unselectable.html
+/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-svg-hittest.html
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inertness-with-modal-dialogs-and-iframes.html
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-ancestor-is-inert.html
 /LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-backdrop-expected.html

Added: branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/inert/inert-and-contenteditable.tentative-expected.txt (0 => 291071)


--- branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/inert/inert-and-contenteditable.tentative-expected.txt	                        (rev 0)
+++ branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/inert/inert-and-contenteditable.tentative-expected.txt	2022-03-09 22:16:05 UTC (rev 291071)
@@ -0,0 +1,16 @@
+
+FAIL execCommand should return the same value assert_equals: [false,true,false,false] at index 1 expected false but got true
+FAIL The resulting textContent should be the same value assert_equals: ["{target}","{}","{target}","{target}"] at index 1 expected "{target}" but got "{}"
+{
+target
+
+}
+{}
+{
+target
+
+}
+{
+target
+
+}

Added: branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/inert/inert-and-contenteditable.tentative.html (0 => 291071)


--- branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/inert/inert-and-contenteditable.tentative.html	                        (rev 0)
+++ branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/inert/inert-and-contenteditable.tentative.html	2022-03-09 22:16:05 UTC (rev 291071)
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Inert and contenteditable</title>
+<link rel="author" title="Oriol Brufau" href=""
+<link rel="help" href=""
+<link rel="help" href=""
+<meta assert="assert" content="
+    Executing an editing command in a node marked as both inert and editable
+    should have the same result regardless of which ancestors trigger each effect.
+    Only testing for consistency, the exact result is not interoperable.">
+
+<div id="log"></div>
+
+<div class="wrapper" contenteditable inert>
+  {<p class="target">target</p>}
+</div>
+
+<div class="wrapper" contenteditable>
+  {<p class="target" inert>target</p>}
+</div>
+
+<div class="wrapper" inert>
+  {<p class="target" contenteditable>target</p>}
+</div>
+
+<div class="wrapper">
+  {<p class="target" contenteditable inert>target</p>}
+</div>
+
+<script src=""
+<script src=""
+<script>
+const results = [];
+const textContents = [];
+setup(function() {
+  const selection = getSelection();
+  for (let wrapper of document.querySelectorAll(".wrapper")) {
+    const target = wrapper.querySelector(".target");
+    selection.collapse(target.firstChild, 3);
+    results.push(document.execCommand("delete"));
+    textContents.push(wrapper.textContent.trim());
+  }
+});
+function testSameValues(array, description) {
+  test(function() {
+    assert_greater_than(array.length, 0, "Array shouldn't be empty");
+    for (let i = 1; i < array.length; ++i) {
+      assert_equals(array[i], array[0], `${JSON.stringify(array)} at index ${i}`);
+    }
+  }, description);
+}
+testSameValues(results, "execCommand should return the same value");
+testSameValues(textContents, "The resulting textContent should be the same value");
+</script>

Modified: branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/inert/inert-iframe-hittest.tentative-expected.txt (291070 => 291071)


--- branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/inert/inert-iframe-hittest.tentative-expected.txt	2022-03-09 22:15:52 UTC (rev 291070)
+++ branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/inert/inert-iframe-hittest.tentative-expected.txt	2022-03-09 22:16:05 UTC (rev 291071)
@@ -1,5 +1,5 @@
 
 
 PASS Hit-testing doesn't reach contents of an inert iframe
-FAIL Hit-testing can reach contents of a no longer inert iframe assert_true: target is focused expected true got false
+FAIL Hit-testing can reach contents of a no longer inert iframe assert_array_equals: target got all events lengths differ, expected array ["mousedown", "mouseenter", "mousemove", "mouseover", "pointerdown", "pointerenter", "pointermove", "pointerover"] length 8, got [] length 0
 

Modified: branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/inert/inert-iframe-hittest.tentative.html (291070 => 291071)


--- branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/inert/inert-iframe-hittest.tentative.html	2022-03-09 22:15:52 UTC (rev 291070)
+++ branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/inert/inert-iframe-hittest.tentative.html	2022-03-09 22:16:05 UTC (rev 291071)
@@ -15,6 +15,10 @@
 </div>
 
 <script>
+const events = [
+  "mousedown", "mouseenter", "mousemove", "mouseover",
+  "pointerdown", "pointerenter", "pointermove", "pointerover",
+];
 const iframe = document.getElementById("iframe");
 let iframeDoc;
 let target;
@@ -34,57 +38,64 @@
   });
 });
 
-promise_test(async function() {
-  let reachedTarget = false;
-  target.addEventListener("mousedown", () => {
-    reachedTarget = true;
-  }, { once: true });
+async function mouseDownAndGetEvents(test) {
+  const receivedEvents = {
+    target: [],
+    wrapper: [],
+  };
+  for (let event of events) {
+    target.addEventListener(event, () => {
+      receivedEvents.target.push(event);
+    }, { once: true, capture: true });
+    wrapper.addEventListener(event, () => {
+      receivedEvents.wrapper.push(event);
+    }, { once: true, capture: true });
+  }
 
-  let reachedWrapper = false;
-  wrapper.addEventListener("mousedown", () => {
-    reachedWrapper = true;
-  }, { once: true });
-
   await new test_driver.Actions()
      .pointerMove(0, 0, { origin: wrapper })
      .pointerDown()
      .send();
-  this.add_cleanup(() => test_driver.click(document.body));
+  test.add_cleanup(() => test_driver.click(document.body));
 
+  // Exact order of events is not interoperable.
+  receivedEvents.target.sort();
+  receivedEvents.wrapper.sort();
+  return receivedEvents;
+}
+
+promise_test(async function() {
+  const receivedEvents = await mouseDownAndGetEvents(this);
+  assert_array_equals(receivedEvents.target, [], "target got no event");
+  assert_array_equals(receivedEvents.wrapper, events, "wrapper got all events");
+
   assert_false(target.matches(":focus"), "target is not focused");
   assert_false(target.matches(":active"), "target is not active");
   assert_false(target.matches(":hover"), "target is not hovered");
-  assert_false(reachedTarget, "target didn't get event");
-
   assert_true(wrapper.matches(":hover"), "wrapper is hovered");
-  assert_true(reachedWrapper, "wrapper got event");
 }, "Hit-testing doesn't reach contents of an inert iframe");
 
 promise_test(async function() {
   iframe.inert = false;
 
-  let reachedTarget = false;
-  target.addEventListener("mousedown", () => {
-    reachedTarget = true;
-  }, { once: true });
+  const receivedEvents = await mouseDownAndGetEvents(this);
+  assert_array_equals(receivedEvents.target, events, "target got all events");
+  if (receivedEvents.wrapper.length === 2) {
+    // Firefox is unstable, sometimes missing the mouse events.
+    assert_array_equals(
+      receivedEvents.wrapper,
+      ["pointerenter", "pointerover"],
+      "wrapper got enter and over pointer events");
+  } else {
+    assert_array_equals(
+      receivedEvents.wrapper,
+      ["mouseenter", "mouseover", "pointerenter", "pointerover"],
+      "wrapper got enter and over events");
+  }
 
-  let reachedWrapper = false;
-  wrapper.addEventListener("mousedown", () => {
-    reachedWrapper = true;
-  }, { once: true });
-
-  await new test_driver.Actions()
-     .pointerMove(0, 0, { origin: wrapper })
-     .pointerDown()
-     .send();
-  this.add_cleanup(() => test_driver.click(document.body));
-
   assert_true(target.matches(":focus"), "target is focused");
   assert_true(target.matches(":active"), "target is active");
   assert_true(target.matches(":hover"), "target is hovered");
-  assert_true(reachedTarget, "target got event");
-
   assert_true(wrapper.matches(":hover"), "wrapper is hovered");
-  assert_false(reachedWrapper, "wrapper didn't get event");
 }, "Hit-testing can reach contents of a no longer inert iframe");
 </script>

Modified: branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/inert/inert-iframe-tabbing.tentative-expected.txt (291070 => 291071)


--- branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/inert/inert-iframe-tabbing.tentative-expected.txt	2022-03-09 22:15:52 UTC (rev 291070)
+++ branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/inert/inert-iframe-tabbing.tentative-expected.txt	2022-03-09 22:16:05 UTC (rev 291071)
@@ -1,7 +1,11 @@
-start
+before
 
-start
+after
 
-PASS Sequential navigation skips contents of inert iframe
-PASS Sequential navigation can pick contents of a no longer inert iframe
+PASS Sequential navigation can't enter an inert iframe
+PASS Sequential navigation can move within an inert iframe
+PASS Sequential navigation can leave an inert iframe
+PASS Sequential navigation can enter a no longer inert iframe
+PASS Sequential navigation can move within a no longer inert iframe
+PASS Sequential navigation can leave a no longer inert iframe
 

Modified: branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/inert/inert-iframe-tabbing.tentative.html (291070 => 291071)


--- branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/inert/inert-iframe-tabbing.tentative.html	2022-03-09 22:15:52 UTC (rev 291070)
+++ branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/inert/inert-iframe-tabbing.tentative.html	2022-03-09 22:16:05 UTC (rev 291071)
@@ -4,63 +4,120 @@
 <link rel="author" title="Oriol Brufau" href=""
 <link rel="help" href=""
 <link rel="help" href=""
-<meta assert="assert" content="Contents of an inert iframe can't be focused by tabbing">
+<meta assert="assert" content="Tabbing can't enter an inert iframe from the outside, but can move within it and can leave it if focus is already there.">
 <script src=""
 <script src=""
 <script src=""
 <script src=""
 
-<div id="start" tabindex="0">start</div>
+<div id="before" tabindex="0">before</div>
 <div id="inert" inert>
   <iframe id="iframe"></iframe>
 </div>
-<div id="end" tabindex="0">start</a>
+<div id="after" tabindex="0">after</a>
 
 <script>
 const tabKey = "\uE004";
-const start = document.getElementById("start");
+const before = document.getElementById("before");
 const inert = document.getElementById("inert");
-const end = document.getElementById("end");
+const after = document.getElementById("after");
 const iframe = document.getElementById("iframe");
 let iframeDoc;
-let target;
+let start;
+let end;
 
 promise_setup(async () => {
   await new Promise(resolve => {
     iframe.addEventListener("load", resolve, { once: true });
-    iframe.srcdoc = `<div id="target" tabindex="0">target</div>`;
+    iframe.srcdoc = `
+      <div id="start" tabindex="0">target</div>
+      <div id="end" tabindex="0">target</div>
+    `;
   });
   iframeDoc = iframe.contentDocument;
-  target = iframeDoc.getElementById("target");
+  start = iframeDoc.getElementById("start");
+  end = iframeDoc.getElementById("end");
 });
 
 promise_test(async function() {
-  start.focus();
-  assert_equals(document.activeElement, start, "start got focus");
+  before.focus();
+  assert_equals(document.activeElement, before, "#before got outer focus");
   assert_false(iframeDoc.hasFocus(), "iframeDoc doesn't have focus");
 
   await test_driver.send_keys(document.activeElement, tabKey);
-  assert_equals(document.activeElement, end, "end got focus");
+  assert_equals(document.activeElement, after, "#after got outer focus");
   assert_false(iframeDoc.hasFocus(), "iframeDoc still doesn't have focus");
-}, "Sequential navigation skips contents of inert iframe");
+}, "Sequential navigation can't enter an inert iframe");
 
 promise_test(async function() {
   start.focus();
-  assert_equals(document.activeElement, start, "start got focus");
+  assert_equals(document.activeElement, iframe, "#iframe got outer focus");
+  assert_equals(iframeDoc.activeElement, start, "#start got inner focus");
+  assert_true(iframeDoc.hasFocus(), "iframeDoc has focus");
+
+  await test_driver.send_keys(iframeDoc.activeElement, tabKey);
+  assert_equals(document.activeElement, iframe, "#iframe still has outer focus");
+  assert_equals(iframeDoc.activeElement, end, "#end got inner focus");
+  assert_true(iframeDoc.hasFocus(), "iframeDoc still has focus");
+}, "Sequential navigation can move within an inert iframe");
+
+promise_test(async function() {
+  end.focus();
+  assert_equals(document.activeElement, iframe, "#iframe got outer focus");
+  assert_equals(iframeDoc.activeElement, end, "#end got inner focus");
+  assert_true(iframeDoc.hasFocus(), "iframeDoc has focus");
+
+  await test_driver.send_keys(iframeDoc.activeElement, tabKey);
+  assert_equals(document.activeElement, after, "#after got outer focus");
   assert_false(iframeDoc.hasFocus(), "iframeDoc doesn't have focus");
+}, "Sequential navigation can leave an inert iframe");
 
+// Test again without inertness.
+
+promise_test(async function() {
   inert.inert = false;
 
+  before.focus();
+  assert_equals(document.activeElement, before, "#before got outer focus");
+  assert_false(iframeDoc.hasFocus(), "iframeDoc doesn't have focus");
+
   await test_driver.send_keys(document.activeElement, tabKey);
-  assert_equals(document.activeElement, iframe, "iframe got focus");
+  assert_equals(document.activeElement, iframe, "#iframe got outer focus");
   assert_true(iframeDoc.hasFocus(), "iframeDoc has focus");
 
   // The document element is also focusable in Firefox.
   if (iframeDoc.activeElement === iframeDoc.documentElement) {
     await test_driver.send_keys(document.activeElement, tabKey);
-    assert_equals(document.activeElement, iframe, "iframe got focus");
+    assert_equals(document.activeElement, iframe, "#iframe got outer focus");
     assert_true(iframeDoc.hasFocus(), "iframeDoc has focus");
   }
-  assert_equals(iframeDoc.activeElement, target, "target got focus");
-}, "Sequential navigation can pick contents of a no longer inert iframe");
+  assert_equals(iframeDoc.activeElement, start, "#start got inner focus");
+}, "Sequential navigation can enter a no longer inert iframe");
+
+promise_test(async function() {
+  inert.inert = false;
+
+  start.focus();
+  assert_equals(document.activeElement, iframe, "#iframe got outer focus");
+  assert_equals(iframeDoc.activeElement, start, "#start got inner focus");
+  assert_true(iframeDoc.hasFocus(), "iframeDoc has focus");
+
+  await test_driver.send_keys(iframeDoc.activeElement, tabKey);
+  assert_equals(document.activeElement, iframe, "#iframe still has outer focus");
+  assert_equals(iframeDoc.activeElement, end, "#end got inner focus");
+  assert_true(iframeDoc.hasFocus(), "iframeDoc still has focus");
+}, "Sequential navigation can move within a no longer inert iframe");
+
+promise_test(async function() {
+  inert.inert = false;
+
+  end.focus();
+  assert_equals(document.activeElement, iframe, "#iframe got outer focus");
+  assert_equals(iframeDoc.activeElement, end, "#end got inner focus");
+  assert_true(iframeDoc.hasFocus(), "iframeDoc has focus");
+
+  await test_driver.send_keys(iframeDoc.activeElement, tabKey);
+  assert_equals(document.activeElement, after, "#after got outer focus");
+  assert_false(iframeDoc.hasFocus(), "iframeDoc doesn't have focus");
+}, "Sequential navigation can leave a no longer inert iframe");
 </script>

Modified: branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/inert/w3c-import.log (291070 => 291071)


--- branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/inert/w3c-import.log	2022-03-09 22:15:52 UTC (rev 291070)
+++ branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/inert/w3c-import.log	2022-03-09 22:16:05 UTC (rev 291071)
@@ -15,6 +15,7 @@
 ------------------------------------------------------------------------
 List of files:
 /LayoutTests/imported/w3c/web-platform-tests/inert/dynamic-inert-on-focused-element.tentative.html
+/LayoutTests/imported/w3c/web-platform-tests/inert/inert-and-contenteditable.tentative.html
 /LayoutTests/imported/w3c/web-platform-tests/inert/inert-canvas-fallback-content.tentative.html
 /LayoutTests/imported/w3c/web-platform-tests/inert/inert-computed-style.html
 /LayoutTests/imported/w3c/web-platform-tests/inert/inert-does-not-match-disabled-selector.tentative.html
@@ -28,5 +29,6 @@
 /LayoutTests/imported/w3c/web-platform-tests/inert/inert-node-is-unselectable.tentative.html
 /LayoutTests/imported/w3c/web-platform-tests/inert/inert-on-non-html.tentative.html
 /LayoutTests/imported/w3c/web-platform-tests/inert/inert-on-slots.tentative.html
+/LayoutTests/imported/w3c/web-platform-tests/inert/inert-svg-hittest.tentative.html
 /LayoutTests/imported/w3c/web-platform-tests/inert/inert-with-modal-dialog-001.tentative.html
 /LayoutTests/imported/w3c/web-platform-tests/inert/inert-with-modal-dialog-002.tentative.html

Modified: branches/safari-613-branch/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-iframe-hittest.tentative-expected.txt (291070 => 291071)


--- branches/safari-613-branch/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-iframe-hittest.tentative-expected.txt	2022-03-09 22:15:52 UTC (rev 291070)
+++ branches/safari-613-branch/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-iframe-hittest.tentative-expected.txt	2022-03-09 22:16:05 UTC (rev 291071)
@@ -1,5 +1,5 @@
 
 
-FAIL Hit-testing doesn't reach contents of an inert iframe assert_true: wrapper is hovered expected true got false
-FAIL Hit-testing can reach contents of a no longer inert iframe assert_true: target is focused expected true got false
+FAIL Hit-testing doesn't reach contents of an inert iframe assert_array_equals: wrapper got all events lengths differ, expected array ["mousedown", "mouseenter", "mousemove", "mouseover", "pointerdown", "pointerenter", "pointermove", "pointerover"] length 8, got [] length 0
+FAIL Hit-testing can reach contents of a no longer inert iframe assert_array_equals: target got all events lengths differ, expected array ["mousedown", "mouseenter", "mousemove", "mouseover", "pointerdown", "pointerenter", "pointermove", "pointerover"] length 8, got [] length 0
 

Modified: branches/safari-613-branch/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-iframe-tabbing.tentative-expected.txt (291070 => 291071)


--- branches/safari-613-branch/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-iframe-tabbing.tentative-expected.txt	2022-03-09 22:15:52 UTC (rev 291070)
+++ branches/safari-613-branch/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-iframe-tabbing.tentative-expected.txt	2022-03-09 22:16:05 UTC (rev 291071)
@@ -1,10 +1,23 @@
-start
+before
 
-start
+after
 
-FAIL Sequential navigation skips contents of inert iframe assert_equals: end got focus expected Element node <div id="end" tabindex="0">start
+FAIL Sequential navigation can't enter an inert iframe assert_equals: #after got outer focus expected Element node <div id="after" tabindex="0">after
 
 <script>
-const tabKey =... but got Element node <div id="start" tabindex="0">start</div>
-FAIL Sequential navigation can pick contents of a no longer inert iframe assert_equals: iframe got focus expected Element node <iframe id="iframe" srcdoc="<div id="target" tabindex="0"... but got Element node <div id="start" tabindex="0">start</div>
+const tabKey... but got Element node <div id="before" tabindex="0">before</div>
+FAIL Sequential navigation can move within an inert iframe assert_equals: #end got inner focus expected Element node <div id="end" tabindex="0">target</div> but got Element node <div id="start" tabindex="0">target</div>
+FAIL Sequential navigation can leave an inert iframe assert_equals: #after got outer focus expected Element node <div id="after" tabindex="0">after
 
+<script>
+const tabKey... but got Element node <iframe id="iframe" srcdoc="
+      <div id="start" tabind...
+FAIL Sequential navigation can enter a no longer inert iframe assert_equals: #iframe got outer focus expected Element node <iframe id="iframe" srcdoc="
+      <div id="start" tabind... but got Element node <div id="before" tabindex="0">before</div>
+FAIL Sequential navigation can move within a no longer inert iframe assert_equals: #end got inner focus expected Element node <div id="end" tabindex="0">target</div> but got Element node <div id="start" tabindex="0">target</div>
+FAIL Sequential navigation can leave a no longer inert iframe assert_equals: #after got outer focus expected Element node <div id="after" tabindex="0">after
+
+<script>
+const tabKey... but got Element node <iframe id="iframe" srcdoc="
+      <div id="start" tabind...
+
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to