Title: [282747] trunk/LayoutTests/imported/w3c
Revision
282747
Author
[email protected]
Date
2021-09-20 07:35:20 -0700 (Mon, 20 Sep 2021)

Log Message

Import inert/inert-on-non-html.tentative.html from WPT
https://bugs.webkit.org/show_bug.cgi?id=230474

Reviewed by Youenn Fablet.

* web-platform-tests/inert/inert-on-non-html.tentative.html: Added.
* web-platform-tests/inert/inert-on-non-html.tentative-expected.txt: Added.
* web-platform-tests/inert/w3c-import.log:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (282746 => 282747)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2021-09-20 14:22:03 UTC (rev 282746)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2021-09-20 14:35:20 UTC (rev 282747)
@@ -1,3 +1,14 @@
+2021-09-20  Tim Nguyen  <[email protected]>
+
+        Import inert/inert-on-non-html.tentative.html from WPT
+        https://bugs.webkit.org/show_bug.cgi?id=230474
+
+        Reviewed by Youenn Fablet.
+
+        * web-platform-tests/inert/inert-on-non-html.tentative.html: Added.
+        * web-platform-tests/inert/inert-on-non-html.tentative-expected.txt: Added.
+        * web-platform-tests/inert/w3c-import.log:
+
 2021-09-20  Marcos Caceres  <[email protected]>
 
         Web Share tests are out of date

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-on-non-html.tentative-expected.txt (0 => 282747)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-on-non-html.tentative-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-on-non-html.tentative-expected.txt	2021-09-20 14:35:20 UTC (rev 282747)
@@ -0,0 +1,54 @@
+
+PASS <span>non-inert</span>
+PASS <span inert="">inert</span>
+PASS <foo>non-inert</foo>
+PASS <foo inert="">inert</foo>
+PASS <foo-bar>non-inert</foo-bar>
+PASS <foo-bar inert="">inert</foo-bar>
+PASS <math><mi>non-inert</mi></math>
+PASS <math inert=""><mi>non-inert</mi></math>
+PASS <math><mi inert="">non-inert</mi></math>
+PASS <svg><text>non-inert</text></svg>
+PASS <svg inert=""><text>non-inert</text></svg>
+PASS <svg><text inert="">non-inert</text></svg>
+PASS <span inert=""><span>inert</span></span>
+PASS <span inert=""><foo>inert</foo></span>
+PASS <span inert=""><foo-bar>inert</foo-bar></span>
+PASS <span inert=""><math><mi>inert</mi></math></span>
+PASS <span inert=""><svg><text>inert</text></svg></span>
+PASS <math inert=""><mi><span>non-inert</span></mi></math>
+PASS <math><mi inert=""><span>non-inert</span></mi></math>
+PASS <svg inert=""><foreignObject><span>non-inert</span></foreignObject></svg>
+PASS <svg><foreignObject inert=""><span>non-inert</span></foreignObject></svg>
+PASS <math><mi><span inert="">inert</span></mi></math>
+PASS <math><mi><foo inert="">inert</foo></mi></math>
+PASS <math><mi><foo-bar inert="">inert</foo-bar></mi></math>
+PASS <svg><foreignObject><span inert="">inert</span></foreignObject></svg>
+PASS <svg><foreignObject><foo inert="">inert</foo></foreignObject></svg>
+PASS <svg><foreignObject><foo-bar inert="">inert</foo-bar></foreignObject></svg>
+non-inert
+inert
+non-inert
+inert
+non-inert
+inert
+non-inert
+non-inert
+non-inert
+non-inert
+non-inert
+non-inert
+inert
+inert
+inert
+inert
+inert
+non-inert
+non-inert
+non-inert
+non-inert
+inert
+inert
+inert
+inert
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-on-non-html.tentative.html (0 => 282747)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-on-non-html.tentative.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-on-non-html.tentative.html	2021-09-20 14:35:20 UTC (rev 282747)
@@ -0,0 +1,144 @@
+<!DOCTYPE html>
+<meta charset="utf-8" />
+<title>'inert' is an HTML attribute and has no effect when used on other elements</title>
+<link rel="author" title="Oriol Brufau" href=""
+<style>
+#tests {
+  line-height: 1.5em;
+}
+#tests svg {
+  height: 1.5em;
+  vertical-align: middle;
+}
+#tests svg > text {
+  transform: translateY(50%);
+  dominant-baseline: central;
+}
+#tests foreignObject {
+  height: 100%;
+  width: 100%;
+}
+</style>
+<div id="log"></div>
+<ul id="tests">
+  <!-- The 'inert' attribute only works on HTML elements -->
+  <li>
+    <span>non-inert</span>
+  </li>
+  <li>
+    <span inert>inert</span>
+  </li>
+  <li>
+    <foo>non-inert</foo>
+  </li>
+  <li>
+    <foo inert>inert</foo>
+  </li>
+  <li>
+    <foo-bar>non-inert</foo-bar>
+  </li>
+  <li>
+    <foo-bar inert>inert</foo-bar>
+  </li>
+  <li>
+    <math><mi>non-inert</mi></math>
+  </li>
+  <li>
+    <math inert><mi>non-inert</mi></math>
+  </li>
+  <li>
+    <math><mi inert>non-inert</mi></math>
+  </li>
+  <li>
+    <svg><text>non-inert</text></svg>
+  </li>
+  <li>
+    <svg inert><text>non-inert</text></svg>
+  </li>
+  <li>
+    <svg><text inert>non-inert</text></svg>
+  </li>
+
+  <!-- But non-HTML are inert if an HTML ancestor has the attribute -->
+  <li>
+    <span inert><span>inert</span></span>
+  </li>
+  <li>
+    <span inert><foo>inert</foo></span>
+  </li>
+  <li>
+    <span inert><foo-bar>inert</foo-bar></span>
+  </li>
+  <li>
+    <span inert><math><mi>inert</mi></math></span>
+  </li>
+  <li>
+    <span inert><svg><text>inert</text></svg></span>
+  </li>
+
+  <!-- HTML elements are not inert if an non-HTML ancestor has the attribute -->
+  <li>
+    <span data-move>non-inert</span>
+    <math inert><mi data-destination></mi></math>
+  </li>
+  <li>
+    <span data-move>non-inert</span>
+    <math><mi inert data-destination></mi></math>
+  </li>
+  <li>
+    <svg inert><foreignObject><span>non-inert</span></foreignobject></svg>
+  </li>
+  <li>
+    <svg><foreignObject inert><span>non-inert</span></foreignobject></svg>
+  </li>
+
+  <!-- HTML elements with non-HTML ancestors are inert if they have the attribute themselves -->
+  <li>
+    <span inert data-move>inert</span>
+    <math><mi data-destination></mi></math>
+  </li>
+  <li>
+    <foo inert data-move>inert</foo>
+    <math><mi data-destination></mi></math>
+  </li>
+  <li>
+    <foo-bar inert data-move>inert</foo-bar>
+    <math><mi data-destination></mi></math>
+  </li>
+  <li>
+    <svg><foreignObject><span inert>inert</span></foreignobject></svg>
+  </li>
+  <li>
+    <svg><foreignObject><foo inert>inert</foo></foreignobject></svg>
+  </li>
+  <li>
+    <svg><foreignObject><foo-bar inert>inert</foo-bar></foreignobject></svg>
+  </li>
+</ul>
+<script src=""
+<script src=""
+<script>
+for (let li of document.querySelectorAll("#tests > li")) {
+  // The HTML parser would mess certain trees, fixup here.
+  const move = li.querySelector("[data-move]");
+  if (move) {
+    const destination = li.querySelector("[data-destination]");
+    destination.append(move);
+    move.removeAttribute("data-move");
+    destination.removeAttribute("data-destination");
+  }
+  test(() => {
+    assert_equals(li.childElementCount, 1);
+    const element = li.firstElementChild;
+    const selection = getSelection();
+    selection.selectAllChildren(element);
+    const selectionText = selection.toString().trim();
+    const textContent = element.textContent.trim();
+    if (textContent === "inert") {
+      assert_equals(selectionText, "");
+    } else {
+      assert_equals(selectionText, "non-inert");
+    }
+  }, li.innerHTML.trim());
+}
+</script>

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/inert/w3c-import.log (282746 => 282747)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/inert/w3c-import.log	2021-09-20 14:22:03 UTC (rev 282746)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/inert/w3c-import.log	2021-09-20 14:35:20 UTC (rev 282747)
@@ -21,6 +21,7 @@
 /LayoutTests/imported/w3c/web-platform-tests/inert/inert-node-is-uneditable.tentative.html
 /LayoutTests/imported/w3c/web-platform-tests/inert/inert-node-is-unfocusable.tentative.html
 /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-retargeting-iframe.tentative.html
 /LayoutTests/imported/w3c/web-platform-tests/inert/inert-retargeting.tentative.html
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to