<!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>[211078] 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/211078">211078</a></dd>
<dt>Author</dt> <dd>utatane.tea@gmail.com</dd>
<dt>Date</dt> <dd>2017-01-23 22:52:49 -0800 (Mon, 23 Jan 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add the support for nomodule attribute on script element
https://bugs.webkit.org/show_bug.cgi?id=166987

Reviewed by Sam Weinig.

Source/WebCore:

As discussed on https://github.com/whatwg/html/pull/2261, we should have
the way to suppress classic script execution when our user agent have
modules support. With such a feature, developers can write the code like,

    &lt;script type=&quot;module&quot; src=&quot;./app.js&quot;&gt;&lt;/script&gt;
    &lt;script nomodule src=&quot;./bundled-app.js&quot;&gt;&lt;/script&gt;

In the above code, if the user agent does not support modules, the bundled-app.js
will be executed. On the other hand, if the user agent supports modules, we should
ignore the script tag which has the `nomodule` attribute.
This way allows us to support the legacy browsers while using modules.

In WebKit, we already support modules. Thus, we should ignore the classic script
attributed `nomodule`.

We also rename asyncAttributeValue and deferAttributeValue to hasAsyncAttribute and
hasDeferAttribute.

Tests: js/dom/modules/nomodule-has-no-effect-on-module-inline.html
       js/dom/modules/nomodule-has-no-effect-on-module-src.html
       js/dom/modules/nomodule-prevents-execution-classic-script-inline.html
       js/dom/modules/nomodule-prevents-execution-classic-script-src.html

* dom/ScriptElement.cpp:
(WebCore::ScriptElement::prepareScript):
* dom/ScriptElement.h:
* html/HTMLAttributeNames.in:
* html/HTMLScriptElement.cpp:
(WebCore::HTMLScriptElement::hasAsyncAttribute):
(WebCore::HTMLScriptElement::hasDeferAttribute):
(WebCore::HTMLScriptElement::hasNoModuleAttribute):
(WebCore::HTMLScriptElement::asyncAttributeValue): Deleted.
(WebCore::HTMLScriptElement::deferAttributeValue): Deleted.
* html/HTMLScriptElement.h:
* html/HTMLScriptElement.idl:
* svg/SVGScriptElement.cpp:
(WebCore::SVGScriptElement::hasAsyncAttribute):
(WebCore::SVGScriptElement::hasDeferAttribute):
(WebCore::SVGScriptElement::hasNoModuleAttribute):
(WebCore::SVGScriptElement::asyncAttributeValue): Deleted.
(WebCore::SVGScriptElement::deferAttributeValue): Deleted.
* svg/SVGScriptElement.h:

LayoutTests:

* js/dom/modules/nomodule-dynamic-classic-inline-expected.txt: Added.
* js/dom/modules/nomodule-dynamic-classic-inline.html: Added.
* js/dom/modules/nomodule-dynamic-classic-src-expected.txt: Added.
* js/dom/modules/nomodule-dynamic-classic-src.html: Added.
* js/dom/modules/nomodule-has-no-effect-on-module-inline-expected.txt: Added.
* js/dom/modules/nomodule-has-no-effect-on-module-inline.html: Added.
* js/dom/modules/nomodule-has-no-effect-on-module-src-expected.txt: Added.
* js/dom/modules/nomodule-has-no-effect-on-module-src.html: Added.
* js/dom/modules/nomodule-prevents-execution-classic-script-inline-expected.txt: Added.
* js/dom/modules/nomodule-prevents-execution-classic-script-inline.html: Added.
* js/dom/modules/nomodule-prevents-execution-classic-script-src-expected.txt: Added.
* js/dom/modules/nomodule-prevents-execution-classic-script-src.html: Added.
* js/dom/modules/nomodule-reflect-expected.txt: Added.
* js/dom/modules/nomodule-reflect.html: Added.
* js/dom/modules/script-tests/error-classic-script.js: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoredomScriptElementcpp">trunk/Source/WebCore/dom/ScriptElement.cpp</a></li>
<li><a href="#trunkSourceWebCoredomScriptElementh">trunk/Source/WebCore/dom/ScriptElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLAttributeNamesin">trunk/Source/WebCore/html/HTMLAttributeNames.in</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLScriptElementcpp">trunk/Source/WebCore/html/HTMLScriptElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLScriptElementh">trunk/Source/WebCore/html/HTMLScriptElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLScriptElementidl">trunk/Source/WebCore/html/HTMLScriptElement.idl</a></li>
<li><a href="#trunkSourceWebCoresvgSVGScriptElementcpp">trunk/Source/WebCore/svg/SVGScriptElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGScriptElementh">trunk/Source/WebCore/svg/SVGScriptElement.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsjsdommodulesnomoduledynamicclassicinlineexpectedtxt">trunk/LayoutTests/js/dom/modules/nomodule-dynamic-classic-inline-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesnomoduledynamicclassicinlinehtml">trunk/LayoutTests/js/dom/modules/nomodule-dynamic-classic-inline.html</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesnomoduledynamicclassicsrcexpectedtxt">trunk/LayoutTests/js/dom/modules/nomodule-dynamic-classic-src-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesnomoduledynamicclassicsrchtml">trunk/LayoutTests/js/dom/modules/nomodule-dynamic-classic-src.html</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesnomodulehasnoeffectonmoduleinlineexpectedtxt">trunk/LayoutTests/js/dom/modules/nomodule-has-no-effect-on-module-inline-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesnomodulehasnoeffectonmoduleinlinehtml">trunk/LayoutTests/js/dom/modules/nomodule-has-no-effect-on-module-inline.html</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesnomodulehasnoeffectonmodulesrcexpectedtxt">trunk/LayoutTests/js/dom/modules/nomodule-has-no-effect-on-module-src-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesnomodulehasnoeffectonmodulesrchtml">trunk/LayoutTests/js/dom/modules/nomodule-has-no-effect-on-module-src.html</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesnomodulepreventsexecutionclassicscriptinlineexpectedtxt">trunk/LayoutTests/js/dom/modules/nomodule-prevents-execution-classic-script-inline-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesnomodulepreventsexecutionclassicscriptinlinehtml">trunk/LayoutTests/js/dom/modules/nomodule-prevents-execution-classic-script-inline.html</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesnomodulepreventsexecutionclassicscriptsrcexpectedtxt">trunk/LayoutTests/js/dom/modules/nomodule-prevents-execution-classic-script-src-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesnomodulepreventsexecutionclassicscriptsrchtml">trunk/LayoutTests/js/dom/modules/nomodule-prevents-execution-classic-script-src.html</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesnomodulereflectexpectedtxt">trunk/LayoutTests/js/dom/modules/nomodule-reflect-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesnomodulereflecthtml">trunk/LayoutTests/js/dom/modules/nomodule-reflect.html</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesscripttestserrorclassicscriptjs">trunk/LayoutTests/js/dom/modules/script-tests/error-classic-script.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (211077 => 211078)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2017-01-24 06:07:28 UTC (rev 211077)
+++ trunk/LayoutTests/ChangeLog        2017-01-24 06:52:49 UTC (rev 211078)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2017-01-15  Yusuke Suzuki  &lt;utatane.tea@gmail.com&gt;
+
+        Add the support for nomodule attribute on script element
+        https://bugs.webkit.org/show_bug.cgi?id=166987
+
+        Reviewed by Sam Weinig.
+
+        * js/dom/modules/nomodule-dynamic-classic-inline-expected.txt: Added.
+        * js/dom/modules/nomodule-dynamic-classic-inline.html: Added.
+        * js/dom/modules/nomodule-dynamic-classic-src-expected.txt: Added.
+        * js/dom/modules/nomodule-dynamic-classic-src.html: Added.
+        * js/dom/modules/nomodule-has-no-effect-on-module-inline-expected.txt: Added.
+        * js/dom/modules/nomodule-has-no-effect-on-module-inline.html: Added.
+        * js/dom/modules/nomodule-has-no-effect-on-module-src-expected.txt: Added.
+        * js/dom/modules/nomodule-has-no-effect-on-module-src.html: Added.
+        * js/dom/modules/nomodule-prevents-execution-classic-script-inline-expected.txt: Added.
+        * js/dom/modules/nomodule-prevents-execution-classic-script-inline.html: Added.
+        * js/dom/modules/nomodule-prevents-execution-classic-script-src-expected.txt: Added.
+        * js/dom/modules/nomodule-prevents-execution-classic-script-src.html: Added.
+        * js/dom/modules/nomodule-reflect-expected.txt: Added.
+        * js/dom/modules/nomodule-reflect.html: Added.
+        * js/dom/modules/script-tests/error-classic-script.js: Added.
+
</ins><span class="cx"> 2017-01-23  Gyuyoung Kim  &lt;gyuyoung.kim@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         [EFL] Update timeout tests in media/modern-media-controls
</span></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesnomoduledynamicclassicinlineexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/nomodule-dynamic-classic-inline-expected.txt (0 => 211078)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/nomodule-dynamic-classic-inline-expected.txt                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/nomodule-dynamic-classic-inline-expected.txt        2017-01-24 06:52:49 UTC (rev 211078)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+Test dynamic inlined classic script with nomodule.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS executed is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesnomoduledynamicclassicinlinehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/nomodule-dynamic-classic-inline.html (0 => 211078)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/nomodule-dynamic-classic-inline.html                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/nomodule-dynamic-classic-inline.html        2017-01-24 06:52:49 UTC (rev 211078)
</span><span class="lines">@@ -0,0 +1,31 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+description('Test dynamic inlined classic script with nomodule.');
+window.executed = false;
+
+// Module will be executed asynchronously.
+window.jsTestIsAsync = true;
+&lt;/script&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+(function () {
+    var element = document.createElement(&quot;script&quot;);
+    element.noModule = true;
+    element.textContent = `
+        testFailed('error');
+        window.executed = true;
+    `;
+    document.body.appendChild(element);
+    setTimeout(function () {
+        shouldBeFalse(`executed`);
+        finishJSTest();
+    }, 100);
+} ());
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesnomoduledynamicclassicsrcexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/nomodule-dynamic-classic-src-expected.txt (0 => 211078)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/nomodule-dynamic-classic-src-expected.txt                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/nomodule-dynamic-classic-src-expected.txt        2017-01-24 06:52:49 UTC (rev 211078)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+Test dynamic &quot;src&quot; classic script with nomodule.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS executed is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesnomoduledynamicclassicsrchtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/nomodule-dynamic-classic-src.html (0 => 211078)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/nomodule-dynamic-classic-src.html                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/nomodule-dynamic-classic-src.html        2017-01-24 06:52:49 UTC (rev 211078)
</span><span class="lines">@@ -0,0 +1,28 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+description('Test dynamic &quot;src&quot; classic script with nomodule.');
+window.executed = false;
+
+// Module will be executed asynchronously.
+window.jsTestIsAsync = true;
+&lt;/script&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+(function () {
+    var element = document.createElement('script');
+    element.noModule = true;
+    element.src = './script-tests/error-classic-script.js';
+    document.body.appendChild(element);
+    setTimeout(function () {
+        shouldBeFalse(`executed`);
+        finishJSTest();
+    }, 100);
+}());
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesnomodulehasnoeffectonmoduleinlineexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/nomodule-has-no-effect-on-module-inline-expected.txt (0 => 211078)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/nomodule-has-no-effect-on-module-inline-expected.txt                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/nomodule-has-no-effect-on-module-inline-expected.txt        2017-01-24 06:52:49 UTC (rev 211078)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+Test nomodule does not have any effect on module script.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Module is not executed yet.
+Module execution is confined in the module environment.
+PASS typeof cocoa is &quot;undefined&quot;
+PASS typeof exportedCocoa is &quot;object&quot;
+PASS exportedCocoa.taste() is &quot;awesome&quot;
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesnomodulehasnoeffectonmoduleinlinehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/nomodule-has-no-effect-on-module-inline.html (0 => 211078)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/nomodule-has-no-effect-on-module-inline.html                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/nomodule-has-no-effect-on-module-inline.html        2017-01-24 06:52:49 UTC (rev 211078)
</span><span class="lines">@@ -0,0 +1,30 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+description('Test nomodule does not have any effect on module script.');
+
+// Module will be executed asynchronously.
+window.jsTestIsAsync = true;
+&lt;/script&gt;
+&lt;script&gt;
+debug('Module is not executed yet.');
+&lt;/script&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;script nomodule type=&quot;module&quot;&gt;
+import Cocoa from &quot;./script-tests/module-inline-simple.js&quot;;
+var cocoa = new Cocoa();
+
+debug(&quot;Module execution is confined in the module environment.&quot;);
+shouldBeEqualToString(&quot;typeof cocoa&quot;, &quot;undefined&quot;);
+
+window.exportedCocoa = cocoa;
+shouldBeEqualToString(&quot;typeof exportedCocoa&quot;, &quot;object&quot;);
+shouldBeEqualToString(&quot;exportedCocoa.taste()&quot;, &quot;awesome&quot;);
+finishJSTest();
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesnomodulehasnoeffectonmodulesrcexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/nomodule-has-no-effect-on-module-src-expected.txt (0 => 211078)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/nomodule-has-no-effect-on-module-src-expected.txt                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/nomodule-has-no-effect-on-module-src-expected.txt        2017-01-24 06:52:49 UTC (rev 211078)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+Test nomodule does not have any effect on module script.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Module is not executed yet.
+Module execution is confined in the module environment.
+PASS typeof cocoa is &quot;undefined&quot;
+PASS typeof exportedCocoa is &quot;object&quot;
+PASS exportedCocoa.taste() is &quot;nice&quot;
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesnomodulehasnoeffectonmodulesrchtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/nomodule-has-no-effect-on-module-src.html (0 => 211078)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/nomodule-has-no-effect-on-module-src.html                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/nomodule-has-no-effect-on-module-src.html        2017-01-24 06:52:49 UTC (rev 211078)
</span><span class="lines">@@ -0,0 +1,19 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+description('Test nomodule does not have any effect on module script.');
+
+// Module will be executed asynchronously.
+window.jsTestIsAsync = true;
+&lt;/script&gt;
+&lt;script&gt;
+debug('Module is not executed yet.');
+&lt;/script&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;script nomodule type=&quot;module&quot; src=&quot;./script-tests/module-src-simple.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesnomodulepreventsexecutionclassicscriptinlineexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/nomodule-prevents-execution-classic-script-inline-expected.txt (0 => 211078)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/nomodule-prevents-execution-classic-script-inline-expected.txt                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/nomodule-prevents-execution-classic-script-inline-expected.txt        2017-01-24 06:52:49 UTC (rev 211078)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+Test nomodule prevents execution of classic script.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS executed is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesnomodulepreventsexecutionclassicscriptinlinehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/nomodule-prevents-execution-classic-script-inline.html (0 => 211078)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/nomodule-prevents-execution-classic-script-inline.html                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/nomodule-prevents-execution-classic-script-inline.html        2017-01-24 06:52:49 UTC (rev 211078)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+description('Test nomodule prevents execution of classic script.');
+window.executed = false;
+&lt;/script&gt;
+&lt;script nomodule&gt;
+window.executed = true;
+testFailed(&quot;error&quot;);
+&lt;/script&gt;
+&lt;script&gt;
+shouldBeFalse(`executed`);
+&lt;/script&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesnomodulepreventsexecutionclassicscriptsrcexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/nomodule-prevents-execution-classic-script-src-expected.txt (0 => 211078)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/nomodule-prevents-execution-classic-script-src-expected.txt                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/nomodule-prevents-execution-classic-script-src-expected.txt        2017-01-24 06:52:49 UTC (rev 211078)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+Test nomodule prevents execution of classic script.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS executed is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesnomodulepreventsexecutionclassicscriptsrchtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/nomodule-prevents-execution-classic-script-src.html (0 => 211078)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/nomodule-prevents-execution-classic-script-src.html                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/nomodule-prevents-execution-classic-script-src.html        2017-01-24 06:52:49 UTC (rev 211078)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+description('Test nomodule prevents execution of classic script.');
+window.executed = false;
+&lt;/script&gt;
+&lt;script nomodule src=&quot;./script-tests/module-src-simple.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+shouldBeFalse(`executed`);
+&lt;/script&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesnomodulereflectexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/nomodule-reflect-expected.txt (0 => 211078)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/nomodule-reflect-expected.txt                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/nomodule-reflect-expected.txt        2017-01-24 06:52:49 UTC (rev 211078)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+Test dynamic &quot;src&quot; classic script with nomodule.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS element.noModule is true
+PASS executed is false
+PASS element.noModule is false
+PASS executed2 is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesnomodulereflecthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/nomodule-reflect.html (0 => 211078)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/nomodule-reflect.html                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/nomodule-reflect.html        2017-01-24 06:52:49 UTC (rev 211078)
</span><span class="lines">@@ -0,0 +1,37 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+description('Test dynamic &quot;src&quot; classic script with nomodule.');
+window.executed = false;
+window.executed2 = false;
+
+// Module will be executed asynchronously.
+window.jsTestIsAsync = true;
+&lt;/script&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;script id=&quot;target&quot; src=&quot;./script-tests/error-classic-script.js&quot; nomodule&gt;&lt;/script&gt;
+&lt;script id=&quot;target2&quot;&gt;
+window.executed2 = true;
+&lt;/script&gt;
+&lt;script&gt;
+window.element = null;
+(function () {
+    {
+        element = document.getElementById('target');
+        shouldBeTrue(`element.noModule`);
+        shouldBeFalse(`executed`);
+    }
+    {
+        element = document.getElementById('target2');
+        shouldBeFalse(`element.noModule`);
+        shouldBeTrue(`executed2`);
+    }
+    finishJSTest();
+}());
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesscripttestserrorclassicscriptjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/script-tests/error-classic-script.js (0 => 211078)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/script-tests/error-classic-script.js                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/script-tests/error-classic-script.js        2017-01-24 06:52:49 UTC (rev 211078)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+window.executed = true;
+testFailed(&quot;error&quot;);
+
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (211077 => 211078)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-01-24 06:07:28 UTC (rev 211077)
+++ trunk/Source/WebCore/ChangeLog        2017-01-24 06:52:49 UTC (rev 211078)
</span><span class="lines">@@ -1,3 +1,53 @@
</span><ins>+2017-01-15  Yusuke Suzuki  &lt;utatane.tea@gmail.com&gt;
+
+        Add the support for nomodule attribute on script element
+        https://bugs.webkit.org/show_bug.cgi?id=166987
+
+        Reviewed by Sam Weinig.
+
+        As discussed on https://github.com/whatwg/html/pull/2261, we should have
+        the way to suppress classic script execution when our user agent have
+        modules support. With such a feature, developers can write the code like,
+
+            &lt;script type=&quot;module&quot; src=&quot;./app.js&quot;&gt;&lt;/script&gt;
+            &lt;script nomodule src=&quot;./bundled-app.js&quot;&gt;&lt;/script&gt;
+
+        In the above code, if the user agent does not support modules, the bundled-app.js
+        will be executed. On the other hand, if the user agent supports modules, we should
+        ignore the script tag which has the `nomodule` attribute.
+        This way allows us to support the legacy browsers while using modules.
+
+        In WebKit, we already support modules. Thus, we should ignore the classic script
+        attributed `nomodule`.
+
+        We also rename asyncAttributeValue and deferAttributeValue to hasAsyncAttribute and
+        hasDeferAttribute.
+
+        Tests: js/dom/modules/nomodule-has-no-effect-on-module-inline.html
+               js/dom/modules/nomodule-has-no-effect-on-module-src.html
+               js/dom/modules/nomodule-prevents-execution-classic-script-inline.html
+               js/dom/modules/nomodule-prevents-execution-classic-script-src.html
+
+        * dom/ScriptElement.cpp:
+        (WebCore::ScriptElement::prepareScript):
+        * dom/ScriptElement.h:
+        * html/HTMLAttributeNames.in:
+        * html/HTMLScriptElement.cpp:
+        (WebCore::HTMLScriptElement::hasAsyncAttribute):
+        (WebCore::HTMLScriptElement::hasDeferAttribute):
+        (WebCore::HTMLScriptElement::hasNoModuleAttribute):
+        (WebCore::HTMLScriptElement::asyncAttributeValue): Deleted.
+        (WebCore::HTMLScriptElement::deferAttributeValue): Deleted.
+        * html/HTMLScriptElement.h:
+        * html/HTMLScriptElement.idl:
+        * svg/SVGScriptElement.cpp:
+        (WebCore::SVGScriptElement::hasAsyncAttribute):
+        (WebCore::SVGScriptElement::hasDeferAttribute):
+        (WebCore::SVGScriptElement::hasNoModuleAttribute):
+        (WebCore::SVGScriptElement::asyncAttributeValue): Deleted.
+        (WebCore::SVGScriptElement::deferAttributeValue): Deleted.
+        * svg/SVGScriptElement.h:
+
</ins><span class="cx"> 2017-01-23  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: Provide a way to trigger a Garbage Collection
</span></span></pre></div>
<a id="trunkSourceWebCoredomScriptElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ScriptElement.cpp (211077 => 211078)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ScriptElement.cpp        2017-01-24 06:07:28 UTC (rev 211077)
+++ trunk/Source/WebCore/dom/ScriptElement.cpp        2017-01-24 06:52:49 UTC (rev 211078)
</span><span class="lines">@@ -187,7 +187,7 @@
</span><span class="cx">     } else
</span><span class="cx">         wasParserInserted = false;
</span><span class="cx"> 
</span><del>-    if (wasParserInserted &amp;&amp; !asyncAttributeValue())
</del><ins>+    if (wasParserInserted &amp;&amp; !hasAsyncAttribute())
</ins><span class="cx">         m_forceAsync = true;
</span><span class="cx"> 
</span><span class="cx">     // FIXME: HTML5 spec says we should check that all children are either comments or empty text nodes.
</span><span class="lines">@@ -220,6 +220,9 @@
</span><span class="cx">     if (!document.frame())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><ins>+    if (scriptType == ScriptType::Classic &amp;&amp; hasNoModuleAttribute())
+        return false;
+
</ins><span class="cx">     if (!document.frame()-&gt;script().canExecuteScripts(AboutToExecuteScript))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="lines">@@ -249,21 +252,21 @@
</span><span class="cx">     // is handled as the same to the external module script.
</span><span class="cx"> 
</span><span class="cx">     bool isClassicExternalScript = scriptType == ScriptType::Classic &amp;&amp; hasSourceAttribute();
</span><del>-    bool isParserInsertedDeferredScript = ((isClassicExternalScript &amp;&amp; deferAttributeValue()) || scriptType == ScriptType::Module)
-        &amp;&amp; m_parserInserted &amp;&amp; !asyncAttributeValue();
</del><ins>+    bool isParserInsertedDeferredScript = ((isClassicExternalScript &amp;&amp; hasDeferAttribute()) || scriptType == ScriptType::Module)
+        &amp;&amp; m_parserInserted &amp;&amp; !hasAsyncAttribute();
</ins><span class="cx">     if (isParserInsertedDeferredScript) {
</span><span class="cx">         m_willExecuteWhenDocumentFinishedParsing = true;
</span><span class="cx">         m_willBeParserExecuted = true;
</span><del>-    } else if (isClassicExternalScript &amp;&amp; m_parserInserted &amp;&amp; !asyncAttributeValue()) {
</del><ins>+    } else if (isClassicExternalScript &amp;&amp; m_parserInserted &amp;&amp; !hasAsyncAttribute()) {
</ins><span class="cx">         ASSERT(scriptType == ScriptType::Classic);
</span><span class="cx">         m_willBeParserExecuted = true;
</span><del>-    } else if ((isClassicExternalScript || scriptType == ScriptType::Module) &amp;&amp; !asyncAttributeValue() &amp;&amp; !m_forceAsync) {
</del><ins>+    } else if ((isClassicExternalScript || scriptType == ScriptType::Module) &amp;&amp; !hasAsyncAttribute() &amp;&amp; !m_forceAsync) {
</ins><span class="cx">         m_willExecuteInOrder = true;
</span><span class="cx">         ASSERT(m_loadableScript);
</span><span class="cx">         document.scriptRunner()-&gt;queueScriptForExecution(*this, *m_loadableScript, ScriptRunner::IN_ORDER_EXECUTION);
</span><span class="cx">     } else if (hasSourceAttribute() || scriptType == ScriptType::Module) {
</span><span class="cx">         ASSERT(m_loadableScript);
</span><del>-        ASSERT(asyncAttributeValue() || m_forceAsync);
</del><ins>+        ASSERT(hasAsyncAttribute() || m_forceAsync);
</ins><span class="cx">         document.scriptRunner()-&gt;queueScriptForExecution(*this, *m_loadableScript, ScriptRunner::ASYNC_EXECUTION);
</span><span class="cx">     } else if (!hasSourceAttribute() &amp;&amp; m_parserInserted &amp;&amp; !document.haveStylesheetsLoaded()) {
</span><span class="cx">         ASSERT(scriptType == ScriptType::Classic);
</span></span></pre></div>
<a id="trunkSourceWebCoredomScriptElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ScriptElement.h (211077 => 211078)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ScriptElement.h        2017-01-24 06:07:28 UTC (rev 211077)
+++ trunk/Source/WebCore/dom/ScriptElement.h        2017-01-24 06:52:49 UTC (rev 211078)
</span><span class="lines">@@ -106,9 +106,10 @@
</span><span class="cx">     virtual String languageAttributeValue() const = 0;
</span><span class="cx">     virtual String forAttributeValue() const = 0;
</span><span class="cx">     virtual String eventAttributeValue() const = 0;
</span><del>-    virtual bool asyncAttributeValue() const = 0;
-    virtual bool deferAttributeValue() const = 0;
</del><ins>+    virtual bool hasAsyncAttribute() const = 0;
+    virtual bool hasDeferAttribute() const = 0;
</ins><span class="cx">     virtual bool hasSourceAttribute() const = 0;
</span><ins>+    virtual bool hasNoModuleAttribute() const = 0;
</ins><span class="cx"> 
</span><span class="cx">     Element&amp; m_element;
</span><span class="cx">     WTF::OrdinalNumber m_startLineNumber;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLAttributeNamesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLAttributeNames.in (211077 => 211078)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLAttributeNames.in        2017-01-24 06:07:28 UTC (rev 211077)
+++ trunk/Source/WebCore/html/HTMLAttributeNames.in        2017-01-24 06:52:49 UTC (rev 211078)
</span><span class="lines">@@ -174,6 +174,7 @@
</span><span class="cx"> muted
</span><span class="cx"> name
</span><span class="cx"> nohref
</span><ins>+nomodule
</ins><span class="cx"> nonce
</span><span class="cx"> noresize
</span><span class="cx"> noshade
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLScriptElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLScriptElement.cpp (211077 => 211078)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLScriptElement.cpp        2017-01-24 06:07:28 UTC (rev 211077)
+++ trunk/Source/WebCore/html/HTMLScriptElement.cpp        2017-01-24 06:52:49 UTC (rev 211078)
</span><span class="lines">@@ -148,16 +148,21 @@
</span><span class="cx">     return attributeWithoutSynchronization(eventAttr).string();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool HTMLScriptElement::asyncAttributeValue() const
</del><ins>+bool HTMLScriptElement::hasAsyncAttribute() const
</ins><span class="cx"> {
</span><span class="cx">     return hasAttributeWithoutSynchronization(asyncAttr);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool HTMLScriptElement::deferAttributeValue() const
</del><ins>+bool HTMLScriptElement::hasDeferAttribute() const
</ins><span class="cx"> {
</span><span class="cx">     return hasAttributeWithoutSynchronization(deferAttr);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool HTMLScriptElement::hasNoModuleAttribute() const
+{
+    return hasAttributeWithoutSynchronization(nomoduleAttr);
+}
+
</ins><span class="cx"> bool HTMLScriptElement::hasSourceAttribute() const
</span><span class="cx"> {
</span><span class="cx">     return hasAttributeWithoutSynchronization(srcAttr);
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLScriptElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLScriptElement.h (211077 => 211078)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLScriptElement.h        2017-01-24 06:07:28 UTC (rev 211077)
+++ trunk/Source/WebCore/html/HTMLScriptElement.h        2017-01-24 06:52:49 UTC (rev 211078)
</span><span class="lines">@@ -64,8 +64,9 @@
</span><span class="cx">     String languageAttributeValue() const final;
</span><span class="cx">     String forAttributeValue() const final;
</span><span class="cx">     String eventAttributeValue() const final;
</span><del>-    bool asyncAttributeValue() const final;
-    bool deferAttributeValue() const final;
</del><ins>+    bool hasAsyncAttribute() const final;
+    bool hasDeferAttribute() const final;
+    bool hasNoModuleAttribute() const final;
</ins><span class="cx">     bool hasSourceAttribute() const final;
</span><span class="cx"> 
</span><span class="cx">     void dispatchLoadEvent() final;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLScriptElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLScriptElement.idl (211077 => 211078)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLScriptElement.idl        2017-01-24 06:07:28 UTC (rev 211077)
+++ trunk/Source/WebCore/html/HTMLScriptElement.idl        2017-01-24 06:52:49 UTC (rev 211078)
</span><span class="lines">@@ -29,4 +29,5 @@
</span><span class="cx">     [Reflect] attribute DOMString type;
</span><span class="cx">     attribute DOMString? crossOrigin;
</span><span class="cx">     [Reflect] attribute DOMString nonce;
</span><ins>+    [Reflect] attribute boolean noModule;
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGScriptElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGScriptElement.cpp (211077 => 211078)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGScriptElement.cpp        2017-01-24 06:07:28 UTC (rev 211077)
+++ trunk/Source/WebCore/svg/SVGScriptElement.cpp        2017-01-24 06:52:49 UTC (rev 211078)
</span><span class="lines">@@ -138,16 +138,21 @@
</span><span class="cx">     return String();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool SVGScriptElement::asyncAttributeValue() const
</del><ins>+bool SVGScriptElement::hasAsyncAttribute() const
</ins><span class="cx"> {
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool SVGScriptElement::deferAttributeValue() const
</del><ins>+bool SVGScriptElement::hasDeferAttribute() const
</ins><span class="cx"> {
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool SVGScriptElement::hasNoModuleAttribute() const
+{
+    return false;
+}
+
</ins><span class="cx"> bool SVGScriptElement::hasSourceAttribute() const
</span><span class="cx"> {
</span><span class="cx">     return hasAttribute(XLinkNames::hrefAttr);
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGScriptElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGScriptElement.h (211077 => 211078)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGScriptElement.h        2017-01-24 06:07:28 UTC (rev 211077)
+++ trunk/Source/WebCore/svg/SVGScriptElement.h        2017-01-24 06:52:49 UTC (rev 211078)
</span><span class="lines">@@ -59,8 +59,9 @@
</span><span class="cx">     String languageAttributeValue() const final;
</span><span class="cx">     String forAttributeValue() const final;
</span><span class="cx">     String eventAttributeValue() const final;
</span><del>-    bool asyncAttributeValue() const final;
-    bool deferAttributeValue() const final;
</del><ins>+    bool hasAsyncAttribute() const final;
+    bool hasDeferAttribute() const final;
+    bool hasNoModuleAttribute() const final;
</ins><span class="cx">     bool hasSourceAttribute() const final;
</span><span class="cx"> 
</span><span class="cx">     void dispatchLoadEvent() final { SVGExternalResourcesRequired::dispatchLoadEvent(this); }
</span></span></pre>
</div>
</div>

</body>
</html>