<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[281490] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/281490">281490</a></dd>
<dt>Author</dt> <dd>ntim@apple.com</dd>
<dt>Date</dt> <dd>2021-08-24 01:17:54 -0700 (Tue, 24 Aug 2021)</dd>
</dl>
<h3>Log Message</h3>
<pre>Implement inert attribute behind feature flag
https://bugs.webkit.org/show_bug.cgi?id=165279
Reviewed by Chris Dumez.
LayoutTests/imported/w3c:
Import inert/ WPT directory using `import-w3c-tests -t web-platform-tests/inert`.
WPT revision: https://github.com/web-platform-tests/wpt/commit/f02e38d7a67999683d05579f62b339430c61e4ec
* resources/import-expectations.json:
* resources/resource-files.json:
* web-platform-tests/inert/frame/button.html: Added.
* web-platform-tests/inert/frame/w3c-import.log: Added.
* web-platform-tests/inert/inert-does-not-match-disabled-selector.tentative-expected.txt: Added.
* web-platform-tests/inert/inert-does-not-match-disabled-selector.tentative.html: Added.
* web-platform-tests/inert/inert-in-shadow-dom.tentative-expected.txt: Added.
* web-platform-tests/inert/inert-in-shadow-dom.tentative.html: Added.
* web-platform-tests/inert/inert-inlines.tentative-expected.txt: Added.
* web-platform-tests/inert/inert-inlines.tentative.html: Added.
* web-platform-tests/inert/inert-label-focus.tentative-expected.txt: Added.
* web-platform-tests/inert/inert-label-focus.tentative.html: Added.
* web-platform-tests/inert/inert-node-is-uneditable.tentative-expected.txt: Added.
* web-platform-tests/inert/inert-node-is-uneditable.tentative.html: Added.
* web-platform-tests/inert/inert-node-is-unfocusable.tentative-expected.txt: Added.
* web-platform-tests/inert/inert-node-is-unfocusable.tentative.html: Added.
* web-platform-tests/inert/inert-node-is-unselectable.tentative-expected.txt: Added.
* web-platform-tests/inert/inert-node-is-unselectable.tentative.html: Added.
* web-platform-tests/inert/inert-on-slots.tentative-expected.txt: Added.
* web-platform-tests/inert/inert-on-slots.tentative.html: Added.
* web-platform-tests/inert/inert-retargeting-iframe.tentative-expected.txt: Added.
* web-platform-tests/inert/inert-retargeting-iframe.tentative.html: Added.
* web-platform-tests/inert/inert-retargeting.tentative-expected.txt: Added.
* web-platform-tests/inert/inert-retargeting.tentative.html: Added.
* web-platform-tests/inert/w3c-import.log: Added.
Source/WebCore:
Tests: imported/w3c/web-platform-tests/inert/frame/button.html
imported/w3c/web-platform-tests/inert/inert-does-not-match-disabled-selector.tentative.html
imported/w3c/web-platform-tests/inert/inert-in-shadow-dom.tentative.html
imported/w3c/web-platform-tests/inert/inert-inlines.tentative.html
imported/w3c/web-platform-tests/inert/inert-label-focus.tentative.html
imported/w3c/web-platform-tests/inert/inert-node-is-uneditable.tentative.html
imported/w3c/web-platform-tests/inert/inert-node-is-unfocusable.tentative.html
imported/w3c/web-platform-tests/inert/inert-node-is-unselectable.tentative.html
imported/w3c/web-platform-tests/inert/inert-on-slots.tentative.html
imported/w3c/web-platform-tests/inert/inert-retargeting-iframe.tentative.html
imported/w3c/web-platform-tests/inert/inert-retargeting.tentative.html
* dom/Node.cpp:
(WebCore::Node::isInert const):
* html/HTMLAttributeNames.in:
* html/HTMLElement.idl:
Source/WTF:
Add runtime InertAttributeEnabled feature flag disabled by default.
* Scripts/Preferences/WebPreferencesExperimental.yaml:
LayoutTests:
Create iOS baselines.
* platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-node-is-uneditable.tentative-expected.txt: Added.
* platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-retargeting-iframe.tentative-expected.txt: Added.
* platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-retargeting.tentative-expected.txt: Added.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cresourcesimportexpectationsjson">trunk/LayoutTests/imported/w3c/resources/import-expectations.json</a></li>
<li><a href="#trunkLayoutTestsimportedw3cresourcesresourcefilesjson">trunk/LayoutTests/imported/w3c/resources/resource-files.json</a></li>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFScriptsPreferencesWebPreferencesExperimentalyaml">trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoredomNodecpp">trunk/Source/WebCore/dom/Node.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLAttributeNamesin">trunk/Source/WebCore/html/HTMLAttributeNames.in</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLElementcpp">trunk/Source/WebCore/html/HTMLElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLElementidl">trunk/Source/WebCore/html/HTMLElement.idl</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li>trunk/LayoutTests/imported/w3c/web-platform-tests/inert/</li>
<li>trunk/LayoutTests/imported/w3c/web-platform-tests/inert/frame/</li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsinertframebuttonhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/inert/frame/button.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsinertframew3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/inert/frame/w3c-import.log</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsinertinertdoesnotmatchdisabledselectortentativeexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-does-not-match-disabled-selector.tentative-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsinertinertdoesnotmatchdisabledselectortentativehtml">trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-does-not-match-disabled-selector.tentative.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsinertinertinshadowdomtentativeexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-in-shadow-dom.tentative-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsinertinertinshadowdomtentativehtml">trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-in-shadow-dom.tentative.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsinertinertinlinestentativeexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-inlines.tentative-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsinertinertinlinestentativehtml">trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-inlines.tentative.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsinertinertlabelfocustentativeexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-label-focus.tentative-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsinertinertlabelfocustentativehtml">trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-label-focus.tentative.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsinertinertnodeisuneditabletentativeexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-node-is-uneditable.tentative-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsinertinertnodeisuneditabletentativehtml">trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-node-is-uneditable.tentative.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsinertinertnodeisunfocusabletentativeexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-node-is-unfocusable.tentative-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsinertinertnodeisunfocusabletentativehtml">trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-node-is-unfocusable.tentative.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsinertinertnodeisunselectabletentativeexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-node-is-unselectable.tentative-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsinertinertnodeisunselectabletentativehtml">trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-node-is-unselectable.tentative.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsinertinertonslotstentativeexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-on-slots.tentative-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsinertinertonslotstentativehtml">trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-on-slots.tentative.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsinertinertretargetingiframetentativeexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-retargeting-iframe.tentative-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsinertinertretargetingiframetentativehtml">trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-retargeting-iframe.tentative.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsinertinertretargetingtentativeexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-retargeting.tentative-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsinertinertretargetingtentativehtml">trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-retargeting.tentative.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsinertw3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/inert/w3c-import.log</a></li>
<li>trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/inert/</li>
<li><a href="#trunkLayoutTestsplatformioswk2importedw3cwebplatformtestsinertinertnodeisuneditabletentativeexpectedtxt">trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-node-is-uneditable.tentative-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformioswk2importedw3cwebplatformtestsinertinertretargetingiframetentativeexpectedtxt">trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-retargeting-iframe.tentative-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformioswk2importedw3cwebplatformtestsinertinertretargetingtentativeexpectedtxt">trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-retargeting.tentative-expected.txt</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (281489 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog 2021-08-24 06:51:03 UTC (rev 281489)
+++ trunk/LayoutTests/ChangeLog 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2021-08-24 Tim Nguyen <ntim@apple.com>
+
+ Implement inert attribute behind feature flag
+ https://bugs.webkit.org/show_bug.cgi?id=165279
+
+ Reviewed by Chris Dumez.
+
+ Create iOS baselines.
+
+ * platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-node-is-uneditable.tentative-expected.txt: Added.
+ * platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-retargeting-iframe.tentative-expected.txt: Added.
+ * platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-retargeting.tentative-expected.txt: Added.
+
</ins><span class="cx"> 2021-08-23 Rob Buis <rbuis@igalia.com>
</span><span class="cx">
</span><span class="cx"> Null check scriptExecutionContext
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (281489 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog 2021-08-24 06:51:03 UTC (rev 281489)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -1,3 +1,39 @@
</span><ins>+2021-08-24 Tim Nguyen <ntim@apple.com>
+
+ Implement inert attribute behind feature flag
+ https://bugs.webkit.org/show_bug.cgi?id=165279
+
+ Reviewed by Chris Dumez.
+
+ Import inert/ WPT directory using `import-w3c-tests -t web-platform-tests/inert`.
+ WPT revision: https://github.com/web-platform-tests/wpt/commit/f02e38d7a67999683d05579f62b339430c61e4ec
+
+ * resources/import-expectations.json:
+ * resources/resource-files.json:
+ * web-platform-tests/inert/frame/button.html: Added.
+ * web-platform-tests/inert/frame/w3c-import.log: Added.
+ * web-platform-tests/inert/inert-does-not-match-disabled-selector.tentative-expected.txt: Added.
+ * web-platform-tests/inert/inert-does-not-match-disabled-selector.tentative.html: Added.
+ * web-platform-tests/inert/inert-in-shadow-dom.tentative-expected.txt: Added.
+ * web-platform-tests/inert/inert-in-shadow-dom.tentative.html: Added.
+ * web-platform-tests/inert/inert-inlines.tentative-expected.txt: Added.
+ * web-platform-tests/inert/inert-inlines.tentative.html: Added.
+ * web-platform-tests/inert/inert-label-focus.tentative-expected.txt: Added.
+ * web-platform-tests/inert/inert-label-focus.tentative.html: Added.
+ * web-platform-tests/inert/inert-node-is-uneditable.tentative-expected.txt: Added.
+ * web-platform-tests/inert/inert-node-is-uneditable.tentative.html: Added.
+ * web-platform-tests/inert/inert-node-is-unfocusable.tentative-expected.txt: Added.
+ * web-platform-tests/inert/inert-node-is-unfocusable.tentative.html: Added.
+ * web-platform-tests/inert/inert-node-is-unselectable.tentative-expected.txt: Added.
+ * web-platform-tests/inert/inert-node-is-unselectable.tentative.html: Added.
+ * web-platform-tests/inert/inert-on-slots.tentative-expected.txt: Added.
+ * web-platform-tests/inert/inert-on-slots.tentative.html: Added.
+ * web-platform-tests/inert/inert-retargeting-iframe.tentative-expected.txt: Added.
+ * web-platform-tests/inert/inert-retargeting-iframe.tentative.html: Added.
+ * web-platform-tests/inert/inert-retargeting.tentative-expected.txt: Added.
+ * web-platform-tests/inert/inert-retargeting.tentative.html: Added.
+ * web-platform-tests/inert/w3c-import.log: Added.
+
</ins><span class="cx"> 2021-08-23 Alex Christensen <achristensen@webkit.org>
</span><span class="cx">
</span><span class="cx"> Setting window.location.href to an invalid URL should throw a TypeError
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cresourcesimportexpectationsjson"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/resources/import-expectations.json (281489 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/resources/import-expectations.json 2021-08-24 06:51:03 UTC (rev 281489)
+++ trunk/LayoutTests/imported/w3c/resources/import-expectations.json 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -334,6 +334,7 @@
</span><span class="cx"> "web-platform-tests/image-decodes": "skip",
</span><span class="cx"> "web-platform-tests/imagebitmap-renderingcontext": "import",
</span><span class="cx"> "web-platform-tests/images": "import",
</span><ins>+ "web-platform-tests/inert": "import",
</ins><span class="cx"> "web-platform-tests/infrastructure": "import",
</span><span class="cx"> "web-platform-tests/innerText": "import",
</span><span class="cx"> "web-platform-tests/input-events": "skip",
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cresourcesresourcefilesjson"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/resources/resource-files.json (281489 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/resources/resource-files.json 2021-08-24 06:51:03 UTC (rev 281489)
+++ trunk/LayoutTests/imported/w3c/resources/resource-files.json 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -2772,6 +2772,7 @@
</span><span class="cx"> "web-platform-tests/html/webappapis/scripting/events/onerroreventhandler-frame.html",
</span><span class="cx"> "web-platform-tests/html/webappapis/user-prompts/cannot-show-simple-dialogs/support/confirm.html",
</span><span class="cx"> "web-platform-tests/html/webappapis/user-prompts/cannot-show-simple-dialogs/support/prompt.html",
</span><ins>+ "web-platform-tests/inert/frame/button.html",
</ins><span class="cx"> "web-platform-tests/infrastructure/assumptions/ahem-notref.html",
</span><span class="cx"> "web-platform-tests/infrastructure/reftest/red.html",
</span><span class="cx"> "web-platform-tests/intersection-observer/observer-in-iframe.html",
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsinertframebuttonhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/inert/frame/button.html (0 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/inert/frame/button.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/inert/frame/button.html 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -0,0 +1,36 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<style>
+body {
+ overflow: hidden;
+}
+
+button#background {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 150px;
+ height: 40px;
+ line-height: 53px;
+}
+
+button.clicked {
+ background-color: red;
+}
+
+button.clicked::after {
+ content: " (clicked)";
+}
+
+</style>
+</head>
+<body>
+ <button id="background">background</button>
+<script>
+document.body.addEventListener('click', (e) => {
+ e.target.classList.add('clicked');
+});
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsinertframew3cimportlog"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/inert/frame/w3c-import.log (0 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/inert/frame/w3c-import.log (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/inert/frame/w3c-import.log 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+The tests in this directory were imported from the W3C repository.
+Do NOT modify these tests directly in WebKit.
+Instead, create a pull request on the WPT github:
+ https://github.com/web-platform-tests/wpt
+
+Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
+
+Do NOT modify or remove this file.
+
+------------------------------------------------------------------------
+Properties requiring vendor prefixes:
+None
+Property values requiring vendor prefixes:
+None
+------------------------------------------------------------------------
+List of files:
+/LayoutTests/imported/w3c/web-platform-tests/inert/frame/button.html
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsinertinertdoesnotmatchdisabledselectortentativeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-does-not-match-disabled-selector.tentative-expected.txt (0 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-does-not-match-disabled-selector.tentative-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-does-not-match-disabled-selector.tentative-expected.txt 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+The test passes if this is in green.
+
+PASS Tests that inert elements do not match the :disabled selector.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsinertinertdoesnotmatchdisabledselectortentativehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-does-not-match-disabled-selector.tentative.html (0 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-does-not-match-disabled-selector.tentative.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-does-not-match-disabled-selector.tentative.html 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -0,0 +1,27 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<style>
+button {
+ color: green;
+}
+
+button:disabled {
+ color: red;
+}
+
+</style>
+</head>
+<body style="color: green">
+<button inert>The test passes if this is in green.</button>
+<script>
+test(function() {
+ button = document.querySelector('button');
+ color = document.defaultView.getComputedStyle(button).getPropertyValue('color');
+ assert_false(button.matches(':disabled'));
+}, 'Tests that inert elements do not match the :disabled selector.');
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsinertinertinshadowdomtentativeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-in-shadow-dom.tentative-expected.txt (0 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-in-shadow-dom.tentative-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-in-shadow-dom.tentative-expected.txt 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+Buttons 1 and 2 should be inert.
+Button 1 (inert)
+
+PASS inert on Shadow host affects content in shadow
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsinertinertinshadowdomtentativehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-in-shadow-dom.tentative.html (0 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-in-shadow-dom.tentative.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-in-shadow-dom.tentative.html 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -0,0 +1,55 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8" />
+ <title>inert on Shadow host affects content in shadow</title>
+ <link rel="author" title="Alice Boxhall" href="aboxhall@chromium.org">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+</head>
+<body>
+ <div>Buttons 1 and 2 should be inert.</div>
+ <div id="shadow-host" inert>
+ <button id="button-1">Button 1 (inert)</button>
+ </div>
+ <script>
+ /*
+ Eventual flattened tree structure:
+
+ <div id="shadow-host" inert>
+ #shadow-root (open)
+ | <slot>
+ : <button id="button-1">Button 1 (inert)</button> <!-- slotted -->
+ | </slot>
+ | <button id="button-2">Button 2 (inert)</button> <!-- in shadow -->
+ </div>
+ */
+
+ const shadowHost = document.getElementById("shadow-host");
+ const shadowRoot = shadowHost.attachShadow({ mode: "open" });
+
+ // Button 1 will be slotted
+ const slot = document.createElement("slot");
+ shadowRoot.appendChild(slot);
+
+ const button2 = document.createElement("button");
+ button2.id = "button-2";
+ button2.textContent = "Button 2 (inert)";
+ shadowRoot.appendChild(button2);
+
+ function testCanFocus(selector, canFocus, opt_context) {
+ let context = opt_context || document;
+ const element = context.querySelector(selector);
+ let focusedElement = null;
+ element.addEventListener("focus", function() { focusedElement = element; }, false);
+ element.focus();
+ assert_equals((focusedElement === element), canFocus);
+ }
+
+ test(() => {
+ testCanFocus("#button-1", false);
+ testCanFocus("#button-2", false, shadowRoot);
+ }, "inert on Shadow host affects content in shadow");
+ </script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsinertinertinlinestentativeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-inlines.tentative-expected.txt (0 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-inlines.tentative-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-inlines.tentative-expected.txt 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+Click me Click me
+Click me
+Click me
+
+FAIL Tests that inert inlines do not receive mouse events. To test manually, click on all the "Click me"s. The test fails if you see red. assert_false: no event should be fired on a expected false got true
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsinertinertinlinestentativehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-inlines.tentative.html (0 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-inlines.tentative.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-inlines.tentative.html 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -0,0 +1,55 @@
</span><ins>+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8" />
+ <title>inert inlines</title>
+ <link rel="author" title="Alice Boxhall" href="aboxhall@chromium.org">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/resources/testdriver.js"></script>
+ <script src="/resources/testdriver-vendor.js"></script>
+ </head>
+<body>
+<a inert id="a" href="javascript:void(0)">Click me</a>
+<button inert id="button">Click me</button>
+<div inert id="div" style="background-color: blue; width: 50px; height: 50px">Click me</div>
+<span inert id="span">Click me</span>
+<script>
+function eventFiredOnInertElement(e) {
+ e.target.style.background = 'red';
+ inertElementFiredOn = true;
+}
+
+inertElements = ['a', 'button', 'div', 'span']
+inertElements.forEach(function(id) {
+ element = document.getElementById(id);
+ element.addEventListener('click', eventFiredOnInertElement);
+ element.addEventListener('mousemove', eventFiredOnInertElement);
+});
+
+document.addEventListener('click', function(e) {
+ document.firedOn = true;
+});
+
+promise_test(async () => {
+ for (let id of inertElements) {
+ var element = document.getElementById(id);
+ inertElementFiredOn = false;
+ document.firedOn = false;
+ try {
+ await test_driver.click(element);
+ assert_false(inertElementFiredOn, 'no event should be fired on ' + id);
+ assert_true(document.firedOn, 'event should be fired on document instead of ' + id);
+ } catch (e) {
+ // test driver detects inert elements as unclickable
+ // and throws an error
+ assert_false(inertElementFiredOn, 'no event should be fired on ' + id);
+ }
+ }
+}, 'Tests that inert inlines do not receive mouse events. ' +
+ 'To test manually, click on all the "Click me"s. The test ' +
+ 'fails if you see red.');
+
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsinertinertlabelfocustentativeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-label-focus.tentative-expected.txt (0 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-label-focus.tentative-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-label-focus.tentative-expected.txt 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+Label for Submit Label for input in inert subtree
+
+
+PASS Calling focus() on an inert label should still send focus to its target.
+PASS Clicking on an inert label should send focus to document.body.
+PASS Calling focus() on a label for a control which is in an inert subtree should have no effect.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsinertinertlabelfocustentativehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-label-focus.tentative.html (0 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-label-focus.tentative.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-label-focus.tentative.html 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -0,0 +1,53 @@
</span><ins>+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8" />
+ <title>inert with label/for</title>
+ <link rel="author" title="Alice Boxhall" href="aboxhall@chromium.org">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/resources/testdriver.js"></script>
+ <script src="/resources/testdriver-vendor.js"></script>
+ </head>
+ <body>
+ <label inert id="for-submit" for="submit">Label for Submit</label>
+ <input id="text" type="text">
+ <input id="submit" type="submit">
+
+ <label id="for-input-in-inert-subtree"
+ for="input-in-inert-subtree">Label for input in inert subtree</label>
+ <div inert>
+ <input id="input-in-inert-subtree"></input>
+ </div>
+
+ <script>
+ test(() => {
+ label = document.querySelector('#for-submit');
+ label.focus();
+ assert_equals(document.activeElement, document.querySelector('#submit'));
+ }, 'Calling focus() on an inert label should still send focus to its target.');
+
+ promise_test(async () => {
+ text = document.querySelector('#text');
+ text.focus();
+ label = document.querySelector('#for-submit');
+ try {
+ await test_driver.click(label);
+ assert_equals(document.activeElement, document.body);
+ } catch (e) {
+ // test driver detects inert elements as unclickable
+ // and throws an error
+ }
+ }, 'Clicking on an inert label should send focus to document.body.');
+
+ test(() => {
+ text = document.querySelector('#text');
+ text.focus();
+
+ label = document.querySelector('#for-input-in-inert-subtree');
+ label.focus();
+ assert_equals(document.activeElement, text);
+ }, 'Calling focus() on a label for a control which is in an inert subtree ' +
+ 'should have no effect.');
+</script>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsinertinertnodeisuneditabletentativeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-node-is-uneditable.tentative-expected.txt (0 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-node-is-uneditable.tentative-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-node-is-uneditable.tentative-expected.txt 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+I'm not editable. aI'm editable.
+
+PASS Can't edit inert contenteditable
+PASS Can edit non-inert contenteditable
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsinertinertnodeisuneditabletentativehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-node-is-uneditable.tentative.html (0 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-node-is-uneditable.tentative.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-node-is-uneditable.tentative.html 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -0,0 +1,37 @@
</span><ins>+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8" />
+ <title>inert nodes are uneditable</title>
+ <link rel="author" title="Alice Boxhall" href="aboxhall@chromium.org">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/resources/testdriver.js"></script>
+ <script src="/resources/testdriver-vendor.js"></script>
+ </head>
+<body>
+<span inert id="not-editable" contenteditable>I'm not editable.</span>
+<span id="editable" contenteditable>I'm editable.</span>
+<script>
+var notEditable = document.querySelector('#not-editable');
+var editable = document.querySelector('#editable');
+
+promise_test(async () => {
+ notEditable.focus();
+ var oldValue = notEditable.textContent;
+ assert_equals(oldValue, "I'm not editable.");
+ await test_driver.send_keys(document.body, 'a');
+ assert_equals(notEditable.textContent, oldValue);
+}, "Can't edit inert contenteditable");
+
+promise_test(async () => {
+ editable.focus();
+ var oldValue = editable.textContent;
+ assert_equals(oldValue, "I'm editable.");
+ await test_driver.send_keys(document.body, 'a');
+ assert_not_equals(editable.textContent, oldValue);
+}, "Can edit non-inert contenteditable");
+
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsinertinertnodeisunfocusabletentativeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-node-is-unfocusable.tentative-expected.txt (0 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-node-is-unfocusable.tentative-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-node-is-unfocusable.tentative-expected.txt 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+Outside of inert container Inert button
+
+I'm editable
+I'm tabindexed.
+ Link
+
+PASS Button outside of inert container is focusable.
+PASS Button with inert atribute is unfocusable.
+PASS All focusable elements inside inert subtree are unfocusable
+PASS Can get inert via property
+PASS Elements inside of inert subtrees return false when getting 'inert'
+PASS Setting inert via property correctly modifies inert state
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsinertinertnodeisunfocusabletentativehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-node-is-unfocusable.tentative.html (0 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-node-is-unfocusable.tentative.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-node-is-unfocusable.tentative.html 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -0,0 +1,79 @@
</span><ins>+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8" />
+ <title>inert nodes are unfocusable</title>
+ <link rel="author" title="Alice Boxhall" href="aboxhall@chromium.org">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ </head>
+<body id="body" tabindex="1">
+ <button id="focusable">Outside of inert container</button>
+ <button inert id="inert">Inert button</button>
+ <div inert id="container">
+ <input id="text" type="text">
+ <input id="datetime" type="datetime">
+ <input id="color" type="color">
+ <select id="select">
+ <optgroup id="optgroup">
+ <option id="option">Option</option>
+ </optgroup>
+ </select>
+ <div id="contenteditable-div" contenteditable>I'm editable</div>
+ <span id="tabindex-span" tabindex="0">I'm tabindexed.</div>
+ <embed id="embed" type="application/x-blink-test-plugin" width=100 height=100></embed>
+ <a id="anchor" href="">Link</a>
+ </div>
+<script>
+function testFocus(element, expectFocus) {
+ focusedElement = null;
+ element.addEventListener('focus', function() { focusedElement = element; }, false);
+ element.focus();
+ theElement = element;
+ assert_equals(focusedElement === theElement, expectFocus);
+}
+
+function testTree(element, expectFocus, excludeCurrent) {
+ if (element.nodeType == Node.ELEMENT_NODE && !excludeCurrent)
+ testFocus(element, expectFocus);
+ if (element.tagName === "SELECT")
+ return;
+ var childNodes = element.childNodes;
+ for (var i = 0; i < childNodes.length; i++)
+ testTree(childNodes[i], expectFocus);
+}
+
+
+test(function() {
+ testFocus(document.getElementById('focusable'), true);
+}, "Button outside of inert container is focusable.");
+
+test(function() {
+ testFocus(document.getElementById('inert'), false);
+}, "Button with inert atribute is unfocusable.");
+
+test(function() {
+ testTree(document.getElementById('container'), false);
+}, "All focusable elements inside inert subtree are unfocusable");
+
+test(function() {
+ assert_false(document.getElementById("focusable").inert, "Inert not set explicitly is false")
+ assert_true(document.getElementById("inert").inert, "Inert set explicitly is true");
+ assert_true(document.getElementById("container").inert, "Inert set on container is true");
+}, "Can get inert via property");
+
+test(function() {
+ assert_false(document.getElementById("text").inert, "Elements inside of inert subtrees return false when getting inert");
+}, "Elements inside of inert subtrees return false when getting 'inert'");
+
+test(function() {
+ document.getElementById('focusable').inert = true;
+ testFocus(document.getElementById('focusable'), false);
+ document.getElementById('inert').inert = false;
+ testFocus(document.getElementById('inert'), true);
+ document.getElementById('container').inert = false;
+ testTree(document.getElementById('container'), true, true);
+}, "Setting inert via property correctly modifies inert state");
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsinertinertnodeisunselectabletentativeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-node-is-unselectable.tentative-expected.txt (0 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-node-is-unselectable.tentative-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-node-is-unselectable.tentative-expected.txt 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+Here is a text node you can't select.
+I'm selectable.
+
+FAIL Inert nodes cannot be selected. assert_equals: expected "I'm selectable." but got "Here is a text node you can't select.\nI'm selectable."
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsinertinertnodeisunselectabletentativehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-node-is-unselectable.tentative.html (0 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-node-is-unselectable.tentative.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-node-is-unselectable.tentative.html 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8" />
+ <title>inert nodes are unselectable</title>
+ <link rel="author" title="Alice Boxhall" href="aboxhall@chromium.org">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ </head>
+<body>
+ <div inert>Here is a text node you can't select.</div>
+ <div>I'm selectable.</div>
+<script>
+test(function() {
+ document.execCommand('SelectAll');
+ assert_equals(window.getSelection().toString().trim(), "I'm selectable.");
+}, "Inert nodes cannot be selected.");
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsinertinertonslotstentativeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-on-slots.tentative-expected.txt (0 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-on-slots.tentative-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-on-slots.tentative-expected.txt 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+Button 1 should be inert, and Button 2 should not be inert.
+Button 1 (inert)Button 2 (not inert)
+
+PASS inert inside ShadowRoot affects slotted content
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsinertinertonslotstentativehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-on-slots.tentative.html (0 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-on-slots.tentative.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-on-slots.tentative.html 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -0,0 +1,57 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8" />
+ <title>inert inside ShadowRoot affects slotted content</title>
+ <link rel="author" title="Alice Boxhall" href="aboxhall@chromium.org">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+</head>
+<body>
+ <div>Button 1 should be inert, and Button 2 should not be inert.</div>
+ <div id="shadow-host">
+ <button slot="slot-1" id="button-1">Button 1 (inert)</button>
+ <button slot="slot-2" id="button-2">Button 2 (not inert)</button>
+ </div>
+ <script>
+ /*
+ Eventual flattened tree structure:
+
+ <div id="shadow-host">
+ #shadow-root (open)
+ | <slot id="slot-1" inert>
+ : <button id="button-1">Button 1</button> <!-- slotted -->
+ | </slot>
+ | <slot id="slot-2">
+ : <button id="button-2">Button 2</button> <!-- slotted -->
+ | </slot>
+ </div>
+ */
+
+ const shadowHost = document.getElementById("shadow-host");
+ const shadowRoot = shadowHost.attachShadow({ mode: "open" });
+
+ const slot1 = document.createElement("slot");
+ slot1.name = "slot-1";
+ slot1.inert = true;
+ shadowRoot.appendChild(slot1);
+
+ const slot2 = document.createElement("slot");
+ slot2.name = "slot-2";
+ shadowRoot.appendChild(slot2);
+
+ function testCanFocus(selector, canFocus) {
+ const element = document.querySelector(selector);
+ let focusedElement = null;
+ element.addEventListener("focus", function() { focusedElement = element; }, false);
+ element.focus();
+ assert_equals((focusedElement === element), canFocus);
+ }
+
+ test(() => {
+ testCanFocus("#button-1", false);
+ testCanFocus("#button-2", true);
+ }, "inert inside ShadowRoot affects slotted content");
+ </script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsinertinertretargetingiframetentativeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-retargeting-iframe.tentative-expected.txt (0 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-retargeting-iframe.tentative-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-retargeting-iframe.tentative-expected.txt 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+CONSOLE MESSAGE: Error: assert_equals: expected Element node <fieldset id="ancestorContainer">
+ <legend>Non-inert a... but got Element node <button id="foreground" class="clicked">foreground</button>
+CONSOLE MESSAGE: Error: assert_equals: expected Element node <fieldset id="ancestorContainer">
+ <legend>Non-inert a... but got Element node <button id="foreground" class="clicked">foreground</button>
+CONSOLE MESSAGE: Error: assert_equals: expected Element node <fieldset id="ancestorContainer">
+ <legend>Non-inert a... but got Element node <button id="foreground" class="clicked">foreground</button>
+CONSOLE MESSAGE: Error: assert_equals: expected Element node <fieldset id="ancestorContainer">
+ <legend>Non-inert a... but got Element node <button id="foreground" class="clicked">foreground</button>
+CONSOLE MESSAGE: Error: assert_equals: expected Element node <fieldset id="ancestorContainer">
+ <legend>Non-inert a... but got Element node <button id="foreground" class="clicked">foreground</button>
+CONSOLE MESSAGE: Error: assert_equals: expected Element node <fieldset id="ancestorContainer">
+ <legend>Non-inert a... but got Element node <button id="foreground" class="clicked">foreground</button>
+CONSOLE MESSAGE: Error: assert_equals: expected Element node <fieldset id="ancestorContainer">
+ <legend>Non-inert a... but got Element node <button id="foreground" class="clicked">foreground</button>
+CONSOLE MESSAGE: Error: assert_equals: expected Element node <fieldset id="ancestorContainer">
+ <legend>Non-inert a... but got Element node <button id="foreground" class="clicked">foreground</button>
+CONSOLE MESSAGE: Error: assert_equals: expected Element node <fieldset id="ancestorContainer">
+ <legend>Non-inert a... but got Element node <button id="foreground" class="clicked">foreground</button>
+CONSOLE MESSAGE: Error: assert_equals: expected Element node <fieldset id="ancestorContainer">
+ <legend>Non-inert a... but got Element node <button id="foreground" class="clicked">foreground</button>
+CONSOLE MESSAGE: Error: assert_equals: expected Element node <fieldset id="ancestorContainer">
+ <legend>Non-inert a... but got Element node <button id="foreground" class="clicked">foreground</button>
+CONSOLE MESSAGE: Error: assert_equals: expected Element node <fieldset id="ancestorContainer">
+ <legend>Non-inert a... but got Element node <button id="foreground" class="clicked">foreground</button>
+CONSOLE MESSAGE: Error: assert_equals: expected Element node <fieldset id="ancestorContainer">
+ <legend>Non-inert a... but got Element node <button id="foreground" class="clicked">foreground</button>
+Click on "Inert button".
+
+The blue square ("Non-inert ancestor container") should turn green.
+The yellow, semi-transparent square ("Non-inert, displaced container") should not turn red.
+"Non-inert button" should not turn red.
+(The full test suite checks a range of events.)
+
+Non-inert ancestor container
+ Non-inert, displaced ancestor
+Inert container
+foreground
+
+Harness Error (FAIL), message = Error: assert_equals: expected Element node <fieldset id="ancestorContainer">
+ <legend>Non-inert a... but got Element node <button id="foreground" class="clicked">foreground</button>
+
+PASS elementsFromPoint returns inert element
+FAIL Tests that any mouse event on a non-inert element is correctly targeted to that element promise_test: Unhandled rejection with value: "did not get auxclick on foreground"
+FAIL Tests that any mouse event on an inert element is targeted to the nearest non-inert ancestor at the same coordinates promise_test: Unhandled rejection with value: "did not get mouseover on ancestorContainer"
+PASS Tests that any pointer event on a non-inert element is correctly targeted to that element
+FAIL Tests that any pointer event on an inert element is targeted to the nearest non-inert ancestor at the same coordinates promise_test: Unhandled rejection with value: "did not get pointerover on ancestorContainer"
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsinertinertretargetingiframetentativehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-retargeting-iframe.tentative.html (0 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-retargeting-iframe.tentative.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-retargeting-iframe.tentative.html 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -0,0 +1,279 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-actions.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
+<style>
+button#foreground,
+button#background {
+ position: absolute;
+ top: 75px;
+ left: 50px;
+ width: 100px;
+ height: 20px;
+}
+
+button#background {
+ left: 75px;
+ width: 150px;
+ height: 40px;
+ top: 125px;
+ line-height: 53px;
+}
+
+.clicked {
+ background-color: red;
+}
+
+#ancestorContainer.clicked {
+ background-color: green;
+}
+
+#ancestorContainer {
+ position: absolute;
+ top: 200px;
+ left: 10px;
+ width: 300px;
+ height: 300px;
+ background-color: blue;
+}
+
+#displacedAncestor {
+ position: absolute;
+ top: 13px;
+ left: 240px;
+ width: 300px;
+ height: 250px;
+ background-color: #ff89;
+}
+
+#displacedAncestor.clicked {
+ background-color: #f009;
+}
+
+#inertContainer {
+ background-color: #fff9;
+ position: absolute;
+ top: 35px;
+ left: -192px;
+ width: 200px;
+ height: 200px;
+}
+
+fieldset {
+ margin: 0;
+ padding: 0;
+ border: 1px solid black;
+}
+
+legend {
+ background-color: white;
+ border: 1px solid black;
+ margin-left: 5px;
+}
+</style>
+</head>
+<body>
+ <p>Click on "Inert button".</p>
+ <ul>
+ <li>The blue square ("Non-inert ancestor container") should turn green.</li>
+ <li>The yellow, semi-transparent square ("Non-inert, displaced container") should not turn red.</li>
+ <li>"Non-inert button" should not turn red.</li>
+ </ul>
+ <p style="margin-bottom:250px">(The full test suite checks a range of events.)</p>
+ <fieldset id="ancestorContainer">
+ <legend>Non-inert ancestor container</legend>
+ <iframe id="background" src="frame/button.html"></iframe>
+ <fieldset id="displacedAncestor">
+ <legend>Non-inert, displaced ancestor</legend>
+ <fieldset id="inertContainer" inert>
+ <legend>Inert container</legend>
+ <button id="foreground">foreground</button>
+ </fieldset>
+ </fieldset>
+ </fieldset>
+
+ <script>
+document.body.addEventListener('click', (e) => {
+ e.target.classList.add('clicked');
+});
+
+function clickOn(element) {
+ return new test_driver.Actions()
+ .pointerMove(0, 0, {origin: element})
+ .pointerDown({button: test_driver.Actions.prototype.ButtonType.LEFT})
+ .pointerUp({button: test_driver.Actions.prototype.ButtonType.LEFT})
+ .send();
+}
+
+function auxClickOn(element) {
+ return new test_driver.Actions()
+ .pointerMove(0, 0, {origin: element})
+ .pointerDown({button: test_driver.Actions.prototype.ButtonType.RIGHT})
+ .pointerUp({button: test_driver.Actions.prototype.ButtonType.RIGHT})
+ .send();
+}
+
+function dblClickOn(element) {
+ return new test_driver.Actions()
+ .pointerMove(0, 0, {origin: element})
+ .pointerDown({button: test_driver.Actions.prototype.ButtonType.LEFT})
+ .pointerUp({button: test_driver.Actions.prototype.ButtonType.LEFT})
+ .pointerDown({button: test_driver.Actions.prototype.ButtonType.LEFT})
+ .pointerUp({button: test_driver.Actions.prototype.ButtonType.LEFT})
+ .send();
+}
+
+function movePointerOver(element) {
+ let rect = element.getBoundingClientRect();
+ return new test_driver.Actions()
+ .pointerMove(0, 0, { origin: element })
+ .send();
+}
+
+function movePointerTo(x, y) {
+ return new test_driver.Actions()
+ .pointerMove(Math.ceil(x), Math.ceil(y), { origin: "viewport" })
+ .send();
+}
+
+function expectEventsOn(events, element) {
+ let promises = [];
+ for (event of events) {
+ ((event, element) => {
+ var promise = new Promise((resolve, reject) => {
+ let f = (e) => {
+ assert_equals(e.type, event);
+ assert_equals(e.target, element);
+ resolve();
+ }
+ element.addEventListener(event, f, { capture: true, once: true });
+
+ step_timeout(() => {
+ element.removeEventListener(event, f, { capture: true });
+ reject("did not get " + event + " on " + element.id);
+ }, 5000);
+ });
+ promises.push(promise);
+ })(event, element);
+ }
+ return promises;
+}
+
+function unexpectEventsOn(events, element) {
+ let promises = [];
+ for (event of events) {
+ ((event, element) => {
+ var promise = new Promise((resolve, reject) => {
+ let f = (e) => {
+ assert_equals(e.type, event);
+ assert_equals(e.target, element);
+ reject("got " + e.type + " on " + e.target.id);
+ }
+ element.addEventListener(event, f, { capture: true, once: true });
+
+ step_timeout(() => {
+ element.removeEventListener(event, f, { capture: true });
+ resolve();
+ }, 1000);
+ });
+ promises.push(promise);
+ })(event, element);
+ }
+ return promises;
+}
+
+test(() => {
+ let rect = foreground.getBoundingClientRect();
+ let center_x = rect.left + (rect.width / 2);
+ let center_y = rect.top + (rect.height / 2);
+ assert_equals(document.elementsFromPoint(center_x, center_y)[0], foreground);
+}, "elementsFromPoint returns inert element");
+
+promise_test(async () => {
+ // Test mouse events on non-inert element - events should go to "foreground"
+ inertContainer.inert = false;
+ await movePointerTo(0, 0);
+ let promises = expectEventsOn(["mouseover", "mouseenter", "mousemove", "mousedown",
+ "mouseup", "click", "auxclick", "mouseout",
+ "mouseleave"],
+ foreground);
+ await clickOn(foreground);
+ await auxClickOn(foreground);
+ await dblClickOn(foreground);
+ let ancestorBox = ancestorContainer.getBoundingClientRect();
+ let inertBox = inertContainer.getBoundingClientRect();
+ let x = ancestorBox.left + (ancestorBox.width / 2);
+ let y = inertBox.bottom + ((ancestorBox.bottom - inertBox.bottom) / 2);
+ await movePointerTo(x, y);
+ await Promise.all(promises);
+}, "Tests that any mouse event on a non-inert element is correctly targeted to that element");
+
+promise_test(async () => {
+ // Make the containing element inert - now events should go to "container"
+ // which is the non-inert ancestor at the same position
+ inertContainer.inert = true;
+ await movePointerTo(0, 0);
+
+ let promises = expectEventsOn(["mouseover", "mouseenter", "mousemove", "mousedown",
+ "mouseup", "click", "auxclick"],
+ ancestorContainer);
+
+ promises = promises.concat(unexpectEventsOn(["mouseout", "mouseleave"],
+ ancestorContainer));
+
+ await clickOn(foreground);
+ await auxClickOn(foreground);
+ await dblClickOn(foreground);
+ let ancestorBox = ancestorContainer.getBoundingClientRect();
+ let inertBox = inertContainer.getBoundingClientRect();
+ let x = ancestorBox.left + (ancestorBox.width / 2);
+ let y = inertBox.bottom + ((ancestorBox.bottom - inertBox.bottom) / 2);
+ await movePointerTo(x, y);
+ await Promise.all(promises);
+}, 'Tests that any mouse event on an inert element is targeted to the nearest non-inert ancestor at the same coordinates');
+
+promise_test(async () => {
+ // Test pointer events on non-inert element - events should go to "foreground"
+ inertContainer.inert = false;
+ await movePointerTo(0, 0);
+
+ let promises = expectEventsOn(["pointerover", "pointerenter", "pointermove",
+ "pointerdown", "pointerup", "pointerout",
+ "pointerleave"],
+ foreground);
+ await clickOn(foreground);
+ let ancestorBox = ancestorContainer.getBoundingClientRect();
+ let inertBox = inertContainer.getBoundingClientRect();
+ let x = ancestorBox.left + (ancestorBox.width / 2);
+ let y = inertBox.bottom + ((ancestorBox.bottom - inertBox.bottom) / 2);
+ await movePointerTo(x, y);
+ await Promise.all(promises);
+}, "Tests that any pointer event on a non-inert element is correctly targeted to that element");
+
+promise_test(async () => {
+ // Make the containing element inert - now events should go to "container"
+ // which is the non-inert ancestor at the same position
+ inertContainer.inert = true;
+ await movePointerTo(0, 0);
+
+ let promises = expectEventsOn(["pointerover", "pointerenter", "pointermove",
+ "pointerdown", "pointerup" ],
+ ancestorContainer);
+
+ promises = promises.concat(unexpectEventsOn(["pointerout", "pointerleave"],
+ ancestorContainer));
+ await clickOn(foreground);
+ let ancestorBox = ancestorContainer.getBoundingClientRect();
+ let inertBox = inertContainer.getBoundingClientRect();
+ let x = ancestorBox.left + (ancestorBox.width / 2);
+ let y = inertBox.bottom + ((ancestorBox.bottom - inertBox.bottom) / 2);
+ await movePointerTo(x, y);
+ await Promise.all(promises);
+}, 'Tests that any pointer event on an inert element is targeted to the nearest non-inert ancestor at the same coordinates');
+ </script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsinertinertretargetingtentativeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-retargeting.tentative-expected.txt (0 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-retargeting.tentative-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-retargeting.tentative-expected.txt 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+CONSOLE MESSAGE: Error: assert_equals: expected Element node <fieldset id="ancestorContainer">
+ <legend>Non-inert a... but got Element node <button id="foreground" class="clicked">foreground</button>
+CONSOLE MESSAGE: Error: assert_equals: expected Element node <fieldset id="ancestorContainer">
+ <legend>Non-inert a... but got Element node <button id="foreground" class="clicked">foreground</button>
+CONSOLE MESSAGE: Error: assert_equals: expected Element node <fieldset id="ancestorContainer">
+ <legend>Non-inert a... but got Element node <button id="foreground" class="clicked">foreground</button>
+CONSOLE MESSAGE: Error: assert_equals: expected Element node <fieldset id="ancestorContainer">
+ <legend>Non-inert a... but got Element node <button id="foreground" class="clicked">foreground</button>
+CONSOLE MESSAGE: Error: assert_equals: expected Element node <fieldset id="ancestorContainer">
+ <legend>Non-inert a... but got Element node <button id="foreground" class="clicked">foreground</button>
+CONSOLE MESSAGE: Error: assert_equals: expected Element node <fieldset id="ancestorContainer">
+ <legend>Non-inert a... but got Element node <button id="foreground" class="clicked">foreground</button>
+CONSOLE MESSAGE: Error: assert_equals: expected Element node <fieldset id="ancestorContainer">
+ <legend>Non-inert a... but got Element node <button id="foreground" class="clicked">foreground</button>
+CONSOLE MESSAGE: Error: assert_equals: expected Element node <fieldset id="ancestorContainer">
+ <legend>Non-inert a... but got Element node <button id="foreground" class="clicked">foreground</button>
+CONSOLE MESSAGE: Error: assert_equals: expected Element node <fieldset id="ancestorContainer">
+ <legend>Non-inert a... but got Element node <button id="foreground" class="clicked">foreground</button>
+CONSOLE MESSAGE: Error: assert_equals: expected Element node <fieldset id="ancestorContainer">
+ <legend>Non-inert a... but got Element node <button id="foreground" class="clicked">foreground</button>
+CONSOLE MESSAGE: Error: assert_equals: expected Element node <fieldset id="ancestorContainer">
+ <legend>Non-inert a... but got Element node <button id="foreground" class="clicked">foreground</button>
+CONSOLE MESSAGE: Error: assert_equals: expected Element node <fieldset id="ancestorContainer">
+ <legend>Non-inert a... but got Element node <button id="foreground" class="clicked">foreground</button>
+CONSOLE MESSAGE: Error: assert_equals: expected Element node <fieldset id="ancestorContainer">
+ <legend>Non-inert a... but got Element node <button id="foreground" class="clicked">foreground</button>
+Click on "foreground".
+
+The blue square ("Non-inert ancestor container") should turn green.
+The yellow, semi-transparent square ("Non-inert, displaced container") should not turn red.
+"Non-inert button" should not turn red.
+(The full test suite checks a range of events.)
+
+Non-inert ancestor container
+backgroundNon-inert, displaced ancestor
+Inert container
+foreground
+
+Harness Error (FAIL), message = Error: assert_equals: expected Element node <fieldset id="ancestorContainer">
+ <legend>Non-inert a... but got Element node <button id="foreground" class="clicked">foreground</button>
+
+PASS elementsFromPoint returns inert element
+FAIL Tests that any mouse event on a non-inert element is correctly targeted to that element promise_test: Unhandled rejection with value: "did not get auxclick on foreground"
+FAIL Tests that any mouse event on an inert element is targeted to the nearest non-inert ancestor at the same coordinates promise_test: Unhandled rejection with value: "did not get mouseover on ancestorContainer"
+PASS Tests that any pointer event on a non-inert element is correctly targeted to that element
+FAIL Tests that any pointer event on an inert element is targeted to the nearest non-inert ancestor at the same coordinates promise_test: Unhandled rejection with value: "did not get pointerover on ancestorContainer"
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsinertinertretargetingtentativehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-retargeting.tentative.html (0 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-retargeting.tentative.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/inert/inert-retargeting.tentative.html 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -0,0 +1,290 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-actions.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
+<style>
+button#foreground,
+button#background {
+ position: absolute;
+ top: 75px;
+ left: 50px;
+ width: 100px;
+ height: 20px;
+}
+
+button#background {
+ left: 75px;
+ width: 150px;
+ height: 40px;
+ top: 125px;
+ line-height: 53px;
+}
+
+.clicked {
+ background-color: red;
+}
+
+#ancestorContainer.clicked {
+ background-color: green;
+}
+
+#ancestorContainer {
+ position: relative;
+ width: 300px;
+ height: 300px;
+ background-color: blue;
+}
+
+#displacedAncestor {
+ position: absolute;
+ top: 13px;
+ left: 240px;
+ width: 300px;
+ height: 250px;
+ background-color: #ff89;
+}
+
+#displacedAncestor.clicked {
+ background-color: #f009;
+}
+
+#inertContainer {
+ background-color: #fff9;
+ position: absolute;
+ top: 35px;
+ left: -192px;
+ width: 200px;
+ height: 200px;
+}
+
+fieldset {
+ margin: 0;
+ padding: 0;
+ border: 1px solid black;
+}
+
+legend {
+ background-color: white;
+ border: 1px solid black;
+ margin-left: 5px;
+}
+
+button.clicked::after {
+ content: " (clicked)";
+}
+
+.clicked > legend::after {
+ content: " (clicked)";
+}
+
+</style>
+</head>
+<body>
+ <p>Click on "foreground".</p>
+ <ul>
+ <li>The blue square ("Non-inert ancestor container") should turn green.</li>
+ <li>The yellow, semi-transparent square ("Non-inert, displaced container") should not turn red.</li>
+ <li>"Non-inert button" should not turn red.</li>
+ </ul>
+ <p>(The full test suite checks a range of events.)</p>
+ <fieldset id="ancestorContainer">
+ <legend>Non-inert ancestor container</legend>
+ <button id="background">background</button>
+ <fieldset id="displacedAncestor">
+ <legend>Non-inert, displaced ancestor</legend>
+ <fieldset id="inertContainer" inert>
+ <legend>Inert container</legend>
+ <button id="foreground">foreground</button>
+ </fieldset>
+ </fieldset>
+ </fieldset>
+
+ <script>
+document.body.addEventListener('click', (e) => {
+ e.target.classList.add('clicked');
+});
+
+function clickOn(element) {
+ return new test_driver.Actions()
+ .pointerMove(0, 0, {origin: element})
+ .pointerDown({button: test_driver.Actions.prototype.ButtonType.LEFT})
+ .pointerUp({button: test_driver.Actions.prototype.ButtonType.LEFT})
+ .send();
+}
+
+function auxClickOn(element) {
+ return new test_driver.Actions()
+ .pointerMove(0, 0, {origin: element})
+ .pointerDown({button: test_driver.Actions.prototype.ButtonType.RIGHT})
+ .pointerUp({button: test_driver.Actions.prototype.ButtonType.RIGHT})
+ .send();
+}
+
+function dblClickOn(element) {
+ return new test_driver.Actions()
+ .pointerMove(0, 0, {origin: element})
+ .pointerDown({button: test_driver.Actions.prototype.ButtonType.LEFT})
+ .pointerUp({button: test_driver.Actions.prototype.ButtonType.LEFT})
+ .pointerDown({button: test_driver.Actions.prototype.ButtonType.LEFT})
+ .pointerUp({button: test_driver.Actions.prototype.ButtonType.LEFT})
+ .send();
+}
+
+function movePointerOver(element) {
+ let rect = element.getBoundingClientRect();
+ return new test_driver.Actions()
+ .pointerMove(0, 0, { origin: element })
+ .send();
+}
+
+function movePointerTo(x, y) {
+ return new test_driver.Actions()
+ .pointerMove(x, y, { origin: "viewport" })
+ .send();
+}
+
+function expectEventsOn(events, element) {
+ let promises = [];
+ for (event of events) {
+ ((event, element) => {
+ var promise = new Promise((resolve, reject) => {
+ let f = (e) => {
+ assert_equals(e.type, event);
+ assert_equals(e.target, element);
+ resolve();
+ }
+ element.addEventListener(event, f, { capture: true, once: true });
+
+ step_timeout(() => {
+ element.removeEventListener(event, f, { capture: true });
+ reject("did not get " + event + " on " + element.id);
+ }, 1000);
+ });
+ promises.push(promise);
+ })(event, element);
+ }
+ return promises;
+}
+
+function unexpectEventsOn(events, element) {
+ let promises = [];
+ for (event of events) {
+ ((event, element) => {
+ var promise = new Promise((resolve, reject) => {
+ let f = (e) => {
+ assert_equals(e.type, event);
+ assert_equals(e.target, element);
+ reject("got " + e.type + " on " + e.target.id);
+ }
+ element.addEventListener(event, f, { capture: true, once: true });
+
+ step_timeout(() => {
+ element.removeEventListener(event, f, { capture: true });
+ resolve();
+ }, 1000);
+ });
+ promises.push(promise);
+ })(event, element);
+ }
+ return promises;
+}
+
+test(() => {
+ let rect = foreground.getBoundingClientRect();
+ let center_x = rect.left + (rect.width / 2);
+ let center_y = rect.top + (rect.height / 2);
+ assert_equals(document.elementsFromPoint(center_x, center_y)[0], foreground);
+}, "elementsFromPoint returns inert element");
+
+promise_test(async () => {
+ // Test mouse events on non-inert element - events should go to "foreground"
+ inertContainer.inert = false;
+ await movePointerTo(0, 0);
+ let promises = expectEventsOn(["mouseover", "mouseenter", "mousemove", "mousedown",
+ "mouseup", "click", "auxclick", "mouseout",
+ "mouseleave"],
+ foreground);
+ await clickOn(foreground);
+ await auxClickOn(foreground);
+ await dblClickOn(foreground);
+ let ancestorBox = ancestorContainer.getBoundingClientRect();
+ let inertBox = inertContainer.getBoundingClientRect();
+ let x = ancestorBox.left + (ancestorBox.width / 2);
+ let y = inertBox.bottom + ((ancestorBox.bottom - inertBox.bottom) / 2);
+ await movePointerTo(x, y);
+ await Promise.all(promises);
+}, "Tests that any mouse event on a non-inert element is correctly targeted to that element");
+
+promise_test(async () => {
+ // Make the containing element inert - now events should go to "container"
+ // which is the non-inert ancestor at the same position
+ inertContainer.inert = true;
+ await movePointerTo(0, 0);
+
+ let promises = expectEventsOn(["mouseover", "mouseenter", "mousemove", "mousedown",
+ "mouseup", "click", "auxclick"],
+ ancestorContainer);
+
+ // TODO(aboxhall): We are getting these unexpected events. Why?
+ promises = promises.concat(unexpectEventsOn(["mouseout", "mouseleave"],
+ ancestorContainer));
+
+ await clickOn(foreground);
+ await auxClickOn(foreground);
+ await dblClickOn(foreground);
+ let ancestorBox = ancestorContainer.getBoundingClientRect();
+ let inertBox = inertContainer.getBoundingClientRect();
+ let x = ancestorBox.left + (ancestorBox.width / 2);
+ let y = inertBox.bottom + ((ancestorBox.bottom - inertBox.bottom) / 2);
+ await movePointerTo(x, y);
+ await Promise.all(promises);
+}, 'Tests that any mouse event on an inert element is targeted to the nearest non-inert ancestor at the same coordinates');
+
+promise_test(async () => {
+ // Test pointer events on non-inert element - events should go to "foreground"
+ inertContainer.inert = false;
+ await movePointerTo(0, 0);
+
+ let promises = expectEventsOn(["pointerover", "pointerenter", "pointermove",
+ "pointerdown", "pointerup", "pointerout",
+ "pointerleave"],
+ foreground);
+ await clickOn(foreground);
+ let ancestorBox = ancestorContainer.getBoundingClientRect();
+ let inertBox = inertContainer.getBoundingClientRect();
+ let x = ancestorBox.left + (ancestorBox.width / 2);
+ let y = inertBox.bottom + ((ancestorBox.bottom - inertBox.bottom) / 2);
+ await movePointerTo(x, y);
+ await Promise.all(promises);
+}, "Tests that any pointer event on a non-inert element is correctly targeted to that element");
+
+promise_test(async () => {
+ // Make the containing element inert - now events should go to "container"
+ // which is the non-inert ancestor at the same position
+ inertContainer.inert = true;
+ await movePointerTo(0, 0);
+
+ let promises = expectEventsOn(["pointerover", "pointerenter", "pointermove",
+ "pointerdown", "pointerup" ],
+ ancestorContainer);
+
+ // TODO(aboxhall): We are getting these unexpected events. Why?
+ promises = promises.concat(unexpectEventsOn(["pointerout", "pointerleave"],
+ ancestorContainer));
+
+ await clickOn(foreground);
+ let ancestorBox = ancestorContainer.getBoundingClientRect();
+ let inertBox = inertContainer.getBoundingClientRect();
+ let x = ancestorBox.left + (ancestorBox.width / 2);
+ let y = inertBox.bottom + ((ancestorBox.bottom - inertBox.bottom) / 2);
+ await movePointerTo(x, y);
+ await Promise.all(promises);
+}, 'Tests that any pointer event on an inert element is targeted to the nearest non-inert ancestor at the same coordinates');
+
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsinertw3cimportlog"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/inert/w3c-import.log (0 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/inert/w3c-import.log (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/inert/w3c-import.log 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -0,0 +1,26 @@
</span><ins>+The tests in this directory were imported from the W3C repository.
+Do NOT modify these tests directly in WebKit.
+Instead, create a pull request on the WPT github:
+ https://github.com/web-platform-tests/wpt
+
+Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
+
+Do NOT modify or remove this file.
+
+------------------------------------------------------------------------
+Properties requiring vendor prefixes:
+None
+Property values requiring vendor prefixes:
+None
+------------------------------------------------------------------------
+List of files:
+/LayoutTests/imported/w3c/web-platform-tests/inert/inert-does-not-match-disabled-selector.tentative.html
+/LayoutTests/imported/w3c/web-platform-tests/inert/inert-in-shadow-dom.tentative.html
+/LayoutTests/imported/w3c/web-platform-tests/inert/inert-inlines.tentative.html
+/LayoutTests/imported/w3c/web-platform-tests/inert/inert-label-focus.tentative.html
+/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-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
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformioswk2importedw3cwebplatformtestsinertinertnodeisuneditabletentativeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-node-is-uneditable.tentative-expected.txt (0 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-node-is-uneditable.tentative-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-node-is-uneditable.tentative-expected.txt 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+I'm not editable. I'm editable.
+
+PASS Can't edit inert contenteditable
+FAIL Can edit non-inert contenteditable assert_not_equals: got disallowed value "I'm editable."
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformioswk2importedw3cwebplatformtestsinertinertretargetingiframetentativeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-retargeting-iframe.tentative-expected.txt (0 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-retargeting-iframe.tentative-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-retargeting-iframe.tentative-expected.txt 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+Click on "Inert button".
+
+The blue square ("Non-inert ancestor container") should turn green.
+The yellow, semi-transparent square ("Non-inert, displaced container") should not turn red.
+"Non-inert button" should not turn red.
+(The full test suite checks a range of events.)
+
+Non-inert ancestor container
+ Non-inert, displaced ancestor
+Inert container
+foreground
+
+PASS elementsFromPoint returns inert element
+FAIL Tests that any mouse event on a non-inert element is correctly targeted to that element promise_test: Unhandled rejection with value: "did not get mouseover on foreground"
+FAIL Tests that any mouse event on an inert element is targeted to the nearest non-inert ancestor at the same coordinates promise_test: Unhandled rejection with value: "did not get mouseover on ancestorContainer"
+FAIL Tests that any pointer event on a non-inert element is correctly targeted to that element promise_test: Unhandled rejection with value: "did not get pointerover on foreground"
+FAIL Tests that any pointer event on an inert element is targeted to the nearest non-inert ancestor at the same coordinates promise_test: Unhandled rejection with value: "did not get pointerover on ancestorContainer"
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformioswk2importedw3cwebplatformtestsinertinertretargetingtentativeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-retargeting.tentative-expected.txt (0 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-retargeting.tentative-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-retargeting.tentative-expected.txt 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+Click on "foreground".
+
+The blue square ("Non-inert ancestor container") should turn green.
+The yellow, semi-transparent square ("Non-inert, displaced container") should not turn red.
+"Non-inert button" should not turn red.
+(The full test suite checks a range of events.)
+
+Non-inert ancestor container
+backgroundNon-inert, displaced ancestor
+Inert container
+foreground
+
+PASS elementsFromPoint returns inert element
+FAIL Tests that any mouse event on a non-inert element is correctly targeted to that element promise_test: Unhandled rejection with value: "did not get mouseover on foreground"
+FAIL Tests that any mouse event on an inert element is targeted to the nearest non-inert ancestor at the same coordinates promise_test: Unhandled rejection with value: "did not get mouseover on ancestorContainer"
+FAIL Tests that any pointer event on a non-inert element is correctly targeted to that element promise_test: Unhandled rejection with value: "did not get pointerover on foreground"
+FAIL Tests that any pointer event on an inert element is targeted to the nearest non-inert ancestor at the same coordinates promise_test: Unhandled rejection with value: "did not get pointerover on ancestorContainer"
+
</ins></span></pre></div>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (281489 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog 2021-08-24 06:51:03 UTC (rev 281489)
+++ trunk/Source/WTF/ChangeLog 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2021-08-24 Tim Nguyen <ntim@apple.com>
+
+ Implement inert attribute behind feature flag
+ https://bugs.webkit.org/show_bug.cgi?id=165279
+
+ Reviewed by Chris Dumez.
+
+ Add runtime InertAttributeEnabled feature flag disabled by default.
+
+ * Scripts/Preferences/WebPreferencesExperimental.yaml:
+
</ins><span class="cx"> 2021-08-21 Myles C. Maxfield <mmaxfield@apple.com>
</span><span class="cx">
</span><span class="cx"> overwriteCodePoint() in createAndFillGlyphPage() is wrong
</span></span></pre></div>
<a id="trunkSourceWTFScriptsPreferencesWebPreferencesExperimentalyaml"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml (281489 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml 2021-08-24 06:51:03 UTC (rev 281489)
+++ trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -534,6 +534,18 @@
</span><span class="cx"> WebKit:
</span><span class="cx"> default: WebKit::defaultIncrementalPDFEnabled()
</span><span class="cx">
</span><ins>+InertAttributeEnabled:
+ type: bool
+ humanReadableName: "inert attribute"
+ humanReadableDescription: "Enable inert attribute support"
+ defaultValue:
+ WebKitLegacy:
+ default: false
+ WebKit:
+ default: false
+ WebCore:
+ default: false
+
</ins><span class="cx"> # FIXME: This is on by default in WebKit2. Perhaps we should consider turning it on for WebKitLegacy as well.
</span><span class="cx"> IntersectionObserverEnabled:
</span><span class="cx"> type: bool
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (281489 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog 2021-08-24 06:51:03 UTC (rev 281489)
+++ trunk/Source/WebCore/ChangeLog 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -1,3 +1,27 @@
</span><ins>+2021-08-24 Tim Nguyen <ntim@apple.com>
+
+ Implement inert attribute behind feature flag
+ https://bugs.webkit.org/show_bug.cgi?id=165279
+
+ Reviewed by Chris Dumez.
+
+ Tests: imported/w3c/web-platform-tests/inert/frame/button.html
+ imported/w3c/web-platform-tests/inert/inert-does-not-match-disabled-selector.tentative.html
+ imported/w3c/web-platform-tests/inert/inert-in-shadow-dom.tentative.html
+ imported/w3c/web-platform-tests/inert/inert-inlines.tentative.html
+ imported/w3c/web-platform-tests/inert/inert-label-focus.tentative.html
+ imported/w3c/web-platform-tests/inert/inert-node-is-uneditable.tentative.html
+ imported/w3c/web-platform-tests/inert/inert-node-is-unfocusable.tentative.html
+ imported/w3c/web-platform-tests/inert/inert-node-is-unselectable.tentative.html
+ imported/w3c/web-platform-tests/inert/inert-on-slots.tentative.html
+ imported/w3c/web-platform-tests/inert/inert-retargeting-iframe.tentative.html
+ imported/w3c/web-platform-tests/inert/inert-retargeting.tentative.html
+
+ * dom/Node.cpp:
+ (WebCore::Node::isInert const):
+ * html/HTMLAttributeNames.in:
+ * html/HTMLElement.idl:
+
</ins><span class="cx"> 2021-08-23 Cameron McCormack <heycam@apple.com>
</span><span class="cx">
</span><span class="cx"> Avoid unnecessary CGColor creation in Gradient::createCGGradient for common sRGB-only cases
</span></span></pre></div>
<a id="trunkSourceWebCoredomNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Node.cpp (281489 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Node.cpp 2021-08-24 06:51:03 UTC (rev 281489)
+++ trunk/Source/WebCore/dom/Node.cpp 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -2632,6 +2632,13 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ if (document().settings().inertAttributeEnabled()) {
+ for (RefPtr element = this; element; element = element->parentElementInComposedTree()) {
+ if (is<HTMLElement>(*element) && downcast<HTMLElement>(*element).hasAttribute(HTMLNames::inertAttr))
+ return true;
+ }
+ }
+
</ins><span class="cx"> if (!document().frame() || !document().frame()->ownerElement())
</span><span class="cx"> return false;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLAttributeNamesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLAttributeNames.in (281489 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLAttributeNames.in 2021-08-24 06:51:03 UTC (rev 281489)
+++ trunk/Source/WebCore/html/HTMLAttributeNames.in 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -157,6 +157,7 @@
</span><span class="cx"> imagesrcset
</span><span class="cx"> incremental
</span><span class="cx"> indeterminate
</span><ins>+inert
</ins><span class="cx"> inputmode
</span><span class="cx"> integrity
</span><span class="cx"> is
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLElement.cpp (281489 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLElement.cpp 2021-08-24 06:51:03 UTC (rev 281489)
+++ trunk/Source/WebCore/html/HTMLElement.cpp 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -481,7 +481,7 @@
</span><span class="cx"> setTabIndexExplicitly(std::nullopt);
</span><span class="cx"> return;
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> if (name == inputmodeAttr) {
</span><span class="cx"> auto& document = this->document();
</span><span class="cx"> if (this == document.focusedElement()) {
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLElement.idl (281489 => 281490)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLElement.idl 2021-08-24 06:51:03 UTC (rev 281489)
+++ trunk/Source/WebCore/html/HTMLElement.idl 2021-08-24 08:17:54 UTC (rev 281490)
</span><span class="lines">@@ -47,6 +47,9 @@
</span><span class="cx"> // FIXME: Implement 'attachInternals'.
</span><span class="cx"> // ElementInternals attachInternals();
</span><span class="cx">
</span><ins>+ // Experimental: https://github.com/WICG/inert/blob/master/README.md
+ [CEReactions, Reflect, EnabledBySetting=InertAttribute] attribute boolean inert;
+
</ins><span class="cx"> // Non-standard: IE extension. May get added to the specification (https://github.com/whatwg/html/issues/668).
</span><span class="cx"> [CEReactions] attribute [LegacyNullToEmptyString] DOMString outerText;
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>