<!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>[171150] 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/171150">171150</a></dd>
<dt>Author</dt> <dd>mkwst@chromium.org</dd>
<dt>Date</dt> <dd>2014-07-16 13:31:06 -0700 (Wed, 16 Jul 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>CSP: Drop 'script-nonce' directive.
https://bugs.webkit.org/show_bug.cgi?id=134926

Reviewed by Darin Adler.

Source/WebCore:
This patch drops the outdated 'script-nonce' Content Security
Policy directive. It was removed from the spec, and replaced in
CSP2 with a new 'script-src' syntax. We should implement that
instead.

Until then, removing the outdated syntax will ensure that no one
ends up relying on it in WebKit's implementation.

This should have limited web-visible impact, as the feature is
behind the CSP_NEXT flag, which is not enabled by default.

* dom/ScriptElement.cpp:
(WebCore::ScriptElement::requestScript):
(WebCore::ScriptElement::executeScript):
* page/ContentSecurityPolicy.cpp:
(WebCore::CSPDirectiveList::allowJavaScriptURLs):
(WebCore::CSPDirectiveList::allowInlineEventHandlers):
(WebCore::CSPDirectiveList::addDirective):
(WebCore::NonceDirective::NonceDirective): Deleted.
(WebCore::NonceDirective::allows): Deleted.
(WebCore::NonceDirective::parse): Deleted.
(WebCore::CSPDirectiveList::checkNonce): Deleted.
(WebCore::CSPDirectiveList::checkNonceAndReportViolation): Deleted.
(WebCore::CSPDirectiveList::allowScriptNonce): Deleted.
(WebCore::isAllowedByAllWithNonce): Deleted.
(WebCore::ContentSecurityPolicy::allowScriptNonce): Deleted.
(WebCore::ContentSecurityPolicy::reportInvalidNonce): Deleted.
* page/ContentSecurityPolicy.h:

LayoutTests:
Dropping the nonce tests, as we're removing the functionality.

* http/tests/security/contentSecurityPolicy/1.1/scriptnonce-allowed-expected.txt: Removed.
* http/tests/security/contentSecurityPolicy/1.1/scriptnonce-allowed.html: Removed.
* http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked-expected.txt: Removed.
* http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked.html: Removed.
* http/tests/security/contentSecurityPolicy/1.1/scriptnonce-invalidnonce-expected.txt: Removed.
* http/tests/security/contentSecurityPolicy/1.1/scriptnonce-invalidnonce.html: Removed.
* http/tests/security/contentSecurityPolicy/1.1/scriptnonce-scriptsrc-blocked-expected.txt: Removed.
* http/tests/security/contentSecurityPolicy/1.1/scriptnonce-scriptsrc-blocked.html: Removed.
* http/tests/security/contentSecurityPolicy/1.1/scriptnonce-separators-allowed-expected.txt: Removed.
* http/tests/security/contentSecurityPolicy/1.1/scriptnonce-separators-allowed.html: Removed.</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="#trunkSourceWebCorepageContentSecurityPolicycpp">trunk/Source/WebCore/page/ContentSecurityPolicy.cpp</a></li>
<li><a href="#trunkSourceWebCorepageContentSecurityPolicyh">trunk/Source/WebCore/page/ContentSecurityPolicy.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicy11scriptnonceallowedexpectedtxt">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-allowed-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicy11scriptnonceallowedhtml">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-allowed.html</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicy11scriptnonceblockedexpectedtxt">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicy11scriptnonceblockedhtml">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked.html</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicy11scriptnonceinvalidnonceexpectedtxt">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-invalidnonce-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicy11scriptnonceinvalidnoncehtml">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-invalidnonce.html</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicy11scriptnoncescriptsrcblockedexpectedtxt">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-scriptsrc-blocked-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicy11scriptnoncescriptsrcblockedhtml">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-scriptsrc-blocked.html</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicy11scriptnonceseparatorsallowedexpectedtxt">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-separators-allowed-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicy11scriptnonceseparatorsallowedhtml">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-separators-allowed.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (171149 => 171150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-07-16 19:10:22 UTC (rev 171149)
+++ trunk/LayoutTests/ChangeLog        2014-07-16 20:31:06 UTC (rev 171150)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2014-07-16  Mike West  &lt;mkwst@chromium.org&gt;
+
+        CSP: Drop 'script-nonce' directive.
+        https://bugs.webkit.org/show_bug.cgi?id=134926
+
+        Reviewed by Darin Adler.
+
+        Dropping the nonce tests, as we're removing the functionality.
+
+        * http/tests/security/contentSecurityPolicy/1.1/scriptnonce-allowed-expected.txt: Removed.
+        * http/tests/security/contentSecurityPolicy/1.1/scriptnonce-allowed.html: Removed.
+        * http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked-expected.txt: Removed.
+        * http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked.html: Removed.
+        * http/tests/security/contentSecurityPolicy/1.1/scriptnonce-invalidnonce-expected.txt: Removed.
+        * http/tests/security/contentSecurityPolicy/1.1/scriptnonce-invalidnonce.html: Removed.
+        * http/tests/security/contentSecurityPolicy/1.1/scriptnonce-scriptsrc-blocked-expected.txt: Removed.
+        * http/tests/security/contentSecurityPolicy/1.1/scriptnonce-scriptsrc-blocked.html: Removed.
+        * http/tests/security/contentSecurityPolicy/1.1/scriptnonce-separators-allowed-expected.txt: Removed.
+        * http/tests/security/contentSecurityPolicy/1.1/scriptnonce-separators-allowed.html: Removed.
+
</ins><span class="cx"> 2014-07-16  Jer Noble  &lt;jer.noble@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [MSE] REGRESSION(r171033): ASSERT in WebCore::MediaSource::onReadyStateChange()
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicy11scriptnonceallowedexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-allowed-expected.txt (171149 => 171150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-allowed-expected.txt        2014-07-16 19:10:22 UTC (rev 171149)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-allowed-expected.txt        2014-07-16 20:31:06 UTC (rev 171150)
</span><span class="lines">@@ -1,2 +0,0 @@
</span><del>-ALERT: PASS (1/1)
-This tests the effect of a valid script-nonce value. It passes if no console warning is visible, and the alert() is executed.
</del></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicy11scriptnonceallowedhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-allowed.html (171149 => 171150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-allowed.html        2014-07-16 19:10:22 UTC (rev 171149)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-allowed.html        2014-07-16 20:31:06 UTC (rev 171150)
</span><span class="lines">@@ -1,19 +0,0 @@
</span><del>-&lt;!DOCTYPE html&gt;
-&lt;html&gt;
-    &lt;head&gt;
-        &lt;meta http-equiv=&quot;X-WebKit-CSP&quot; content=&quot;script-nonce noncynonce;&quot;&gt;
-        &lt;script nonce=&quot;noncynonce&quot;&gt;
-        if (window.testRunner)
-            testRunner.dumpAsText();
-        &lt;/script&gt;
-        &lt;script nonce=&quot;noncynonce&quot;&gt;
-            alert('PASS (1/1)');
-        &lt;/script&gt;
-    &lt;/head&gt;
-    &lt;body&gt;
-        &lt;p&gt;
-            This tests the effect of a valid script-nonce value. It passes if
-            no console warning is visible, and the alert() is executed.
-        &lt;/p&gt;
-    &lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicy11scriptnonceblockedexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked-expected.txt (171149 => 171150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked-expected.txt        2014-07-16 19:10:22 UTC (rev 171149)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked-expected.txt        2014-07-16 20:31:06 UTC (rev 171150)
</span><span class="lines">@@ -1,9 +0,0 @@
</span><del>-ALERT: PASS (1/2)
-ALERT: PASS (2/2)
-CONSOLE MESSAGE: line 13: Refused to execute script because it violates the following Content Security Policy directive: &quot;script-nonce noncynonce&quot;.
-
-CONSOLE MESSAGE: line 16: Refused to execute script because it violates the following Content Security Policy directive: &quot;script-nonce noncynonce&quot;.
-
-CONSOLE MESSAGE: line 19: Refused to execute script because it violates the following Content Security Policy directive: &quot;script-nonce noncynonce&quot;.
-
-This tests the effect of a valid script-nonce value. It passes if three console warnings are visible, and the two PASS alerts are executed.
</del></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicy11scriptnonceblockedhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked.html (171149 => 171150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked.html        2014-07-16 19:10:22 UTC (rev 171149)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked.html        2014-07-16 20:31:06 UTC (rev 171150)
</span><span class="lines">@@ -1,30 +0,0 @@
</span><del>-&lt;!DOCTYPE html&gt;
-&lt;html&gt;
-    &lt;head&gt;
-        &lt;meta http-equiv=&quot;X-WebKit-CSP&quot; content=&quot;script-nonce noncynonce;&quot;&gt;
-        &lt;script nonce=&quot;noncynonce&quot;&gt;
-        if (window.testRunner)
-            testRunner.dumpAsText();
-        alert('PASS (1/2)');
-        &lt;/script&gt;
-        &lt;script nonce=&quot;   noncynonce    &quot;&gt;
-        alert('PASS (2/2)');
-        &lt;/script&gt;
-        &lt;script nonce=&quot;noncynonce noncynonce&quot;&gt;
-            alert('FAIL (1/3)');
-        &lt;/script&gt;
-        &lt;script&gt;
-            alert('FAIL (2/3)');
-        &lt;/script&gt;
-        &lt;script nonce=&quot;noncynonceno?&quot;&gt;
-            alert('FAIL (3/3)');
-        &lt;/script&gt;
-    &lt;/head&gt;
-    &lt;body&gt;
-        &lt;p&gt;
-            This tests the effect of a valid script-nonce value. It passes if
-            three console warnings are visible, and the two PASS alerts are
-            executed.
-        &lt;/p&gt;
-    &lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicy11scriptnonceinvalidnonceexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-invalidnonce-expected.txt (171149 => 171150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-invalidnonce-expected.txt        2014-07-16 19:10:22 UTC (rev 171149)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-invalidnonce-expected.txt        2014-07-16 20:31:06 UTC (rev 171150)
</span><span class="lines">@@ -1,39 +0,0 @@
</span><del>-CONSOLE MESSAGE: Ignoring invalid Content Security Policy script nonce: ''.
-
-CONSOLE MESSAGE: line 7: Refused to load 'http://127.0.0.1:8000/security/contentSecurityPolicy/resources/script.js' because it violates the following Content Security Policy directive: &quot;script-nonce &quot;.
-
-CONSOLE MESSAGE: Ignoring invalid Content Security Policy script nonce: ''.
-
-CONSOLE MESSAGE: line 7: Refused to load 'http://127.0.0.1:8000/security/contentSecurityPolicy/resources/script.js' because it violates the following Content Security Policy directive: &quot;script-nonce &quot;.
-
-CONSOLE MESSAGE: Ignoring invalid Content Security Policy script nonce: ''.
-
-CONSOLE MESSAGE: line 7: Refused to load 'http://127.0.0.1:8000/security/contentSecurityPolicy/resources/script.js' because it violates the following Content Security Policy directive: &quot;script-nonce &quot;.
-
-CONSOLE MESSAGE: Ignoring invalid Content Security Policy script nonce: 'nonces have no spaces'.
-
-CONSOLE MESSAGE: line 7: Refused to load 'http://127.0.0.1:8000/security/contentSecurityPolicy/resources/script.js' because it violates the following Content Security Policy directive: &quot;script-nonce nonces have no spaces&quot;.
-
-None of these scripts should execute, as all the nonces are invalid.
-
-
-
---------
-Frame: '&lt;!--framePath //&lt;!--frame0--&gt;--&gt;'
---------
-PASS
-
---------
-Frame: '&lt;!--framePath //&lt;!--frame1--&gt;--&gt;'
---------
-PASS
-
---------
-Frame: '&lt;!--framePath //&lt;!--frame2--&gt;--&gt;'
---------
-PASS
-
---------
-Frame: '&lt;!--framePath //&lt;!--frame3--&gt;--&gt;'
---------
-PASS
</del></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicy11scriptnonceinvalidnoncehtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-invalidnonce.html (171149 => 171150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-invalidnonce.html        2014-07-16 19:10:22 UTC (rev 171149)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-invalidnonce.html        2014-07-16 20:31:06 UTC (rev 171150)
</span><span class="lines">@@ -1,17 +0,0 @@
</span><del>-&lt;!DOCTYPE html&gt;
-&lt;html&gt;
-&lt;head&gt;
-&lt;script src='../resources/multiple-iframe-test.js'&gt;&lt;/script&gt;
-&lt;script&gt;
-var tests = [
-    ['no', 'script-src 127.0.0.1:8000; script-nonce;', 'resources/script.js', ''],
-    ['no', 'script-src 127.0.0.1:8000; script-nonce ;', 'resources/script.js', ''],
-    ['no', 'script-src 127.0.0.1:8000; script-nonce      ;', 'resources/script.js', ''],
-    ['no', 'script-src 127.0.0.1:8000; script-nonce nonces have no spaces;', 'resources/script.js', ''],
-];
-&lt;/script&gt;
-&lt;/head&gt;
-&lt;body onload=&quot;testExperimentalPolicy()&quot;&gt;
-  &lt;p&gt;
-      None of these scripts should execute, as all the nonces are invalid.
-  &lt;/p&gt;
</del></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicy11scriptnoncescriptsrcblockedexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-scriptsrc-blocked-expected.txt (171149 => 171150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-scriptsrc-blocked-expected.txt        2014-07-16 19:10:22 UTC (rev 171149)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-scriptsrc-blocked-expected.txt        2014-07-16 20:31:06 UTC (rev 171150)
</span><span class="lines">@@ -1,27 +0,0 @@
</span><del>-CONSOLE MESSAGE: line 7: Refused to load 'http://127.0.0.1:8000/security/contentSecurityPolicy/resources/script.js' because it violates the following Content Security Policy directive: &quot;script-nonce nonce&quot;.
-
-CONSOLE MESSAGE: line 7: Refused to load 'http://127.0.0.1:8000/security/contentSecurityPolicy/resources/script.js' because it violates the following Content Security Policy directive: &quot;script-nonce notnonce&quot;.
-
-None of these scripts should execute even though there are parse errors in the policy.
-
-
-
---------
-Frame: '&lt;!--framePath //&lt;!--frame0--&gt;--&gt;'
---------
-PASS
-
---------
-Frame: '&lt;!--framePath //&lt;!--frame1--&gt;--&gt;'
---------
-PASS
-
---------
-Frame: '&lt;!--framePath //&lt;!--frame2--&gt;--&gt;'
---------
-PASS
-
---------
-Frame: '&lt;!--framePath //&lt;!--frame3--&gt;--&gt;'
---------
-PASS
</del></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicy11scriptnoncescriptsrcblockedhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-scriptsrc-blocked.html (171149 => 171150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-scriptsrc-blocked.html        2014-07-16 19:10:22 UTC (rev 171149)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-scriptsrc-blocked.html        2014-07-16 20:31:06 UTC (rev 171150)
</span><span class="lines">@@ -1,17 +0,0 @@
</span><del>-&lt;!DOCTYPE html&gt;
-&lt;html&gt;
-&lt;head&gt;
-&lt;script src='../resources/multiple-iframe-test.js'&gt;&lt;/script&gt;
-&lt;script&gt;
-var tests = [
-    ['yes', 'script-src 127.0.0.1:8000', 'resources/script.js', 'nonce'],
-    ['yes', 'script-src 127.0.0.1:8000; script-nonce nonce', 'resources/script.js', 'nonce'],
-    ['no', 'script-src 127.0.0.1:8000; script-nonce nonce', 'resources/script.js', 'notnonce'],
-    ['no', 'script-src 127.0.0.1:8000; script-nonce notnonce', 'resources/script.js', 'nonce'],
-];
-&lt;/script&gt;
-&lt;/head&gt;
-&lt;body onload=&quot;testExperimentalPolicy()&quot;&gt;
-  &lt;p&gt;
-    None of these scripts should execute even though there are parse errors in the policy.
-  &lt;/p&gt;
</del></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicy11scriptnonceseparatorsallowedexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-separators-allowed-expected.txt (171149 => 171150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-separators-allowed-expected.txt        2014-07-16 19:10:22 UTC (rev 171149)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-separators-allowed-expected.txt        2014-07-16 20:31:06 UTC (rev 171150)
</span><span class="lines">@@ -1,18 +0,0 @@
</span><del>-All of these scripts should execute, as all the nonces are valid.
-
-
-
---------
-Frame: '&lt;!--framePath //&lt;!--frame0--&gt;--&gt;'
---------
-PASS
-
---------
-Frame: '&lt;!--framePath //&lt;!--frame1--&gt;--&gt;'
---------
-PASS
-
---------
-Frame: '&lt;!--framePath //&lt;!--frame2--&gt;--&gt;'
---------
-PASS
</del></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicy11scriptnonceseparatorsallowedhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-separators-allowed.html (171149 => 171150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-separators-allowed.html        2014-07-16 19:10:22 UTC (rev 171149)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/scriptnonce-separators-allowed.html        2014-07-16 20:31:06 UTC (rev 171150)
</span><span class="lines">@@ -1,16 +0,0 @@
</span><del>-&lt;!DOCTYPE html&gt;
-&lt;html&gt;
-&lt;head&gt;
-&lt;script src='../resources/multiple-iframe-test.js'&gt;&lt;/script&gt;
-&lt;script&gt;
-var tests = [
-    ['yes', 'script-src 127.0.0.1:8000; script-nonce 1/1;', 'resources/script.js', '1/1'],
-    ['yes', 'script-src 127.0.0.1:8000; script-nonce {};', 'resources/script.js', '{}'],
-    ['yes', 'script-src 127.0.0.1:8000; script-nonce /\\;', 'resources/script.js', '/\\'],
-];
-&lt;/script&gt;
-&lt;/head&gt;
-&lt;body onload=&quot;testExperimentalPolicy()&quot;&gt;
-  &lt;p&gt;
-      All of these scripts should execute, as all the nonces are valid.
-  &lt;/p&gt;
</del></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (171149 => 171150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-07-16 19:10:22 UTC (rev 171149)
+++ trunk/Source/WebCore/ChangeLog        2014-07-16 20:31:06 UTC (rev 171150)
</span><span class="lines">@@ -1,3 +1,39 @@
</span><ins>+2014-07-16  Mike West  &lt;mkwst@chromium.org&gt;
+
+        CSP: Drop 'script-nonce' directive.
+        https://bugs.webkit.org/show_bug.cgi?id=134926
+
+        Reviewed by Darin Adler.
+
+        This patch drops the outdated 'script-nonce' Content Security
+        Policy directive. It was removed from the spec, and replaced in
+        CSP2 with a new 'script-src' syntax. We should implement that
+        instead.
+
+        Until then, removing the outdated syntax will ensure that no one
+        ends up relying on it in WebKit's implementation.
+
+        This should have limited web-visible impact, as the feature is
+        behind the CSP_NEXT flag, which is not enabled by default.
+
+        * dom/ScriptElement.cpp:
+        (WebCore::ScriptElement::requestScript):
+        (WebCore::ScriptElement::executeScript):
+        * page/ContentSecurityPolicy.cpp:
+        (WebCore::CSPDirectiveList::allowJavaScriptURLs):
+        (WebCore::CSPDirectiveList::allowInlineEventHandlers):
+        (WebCore::CSPDirectiveList::addDirective):
+        (WebCore::NonceDirective::NonceDirective): Deleted.
+        (WebCore::NonceDirective::allows): Deleted.
+        (WebCore::NonceDirective::parse): Deleted.
+        (WebCore::CSPDirectiveList::checkNonce): Deleted.
+        (WebCore::CSPDirectiveList::checkNonceAndReportViolation): Deleted.
+        (WebCore::CSPDirectiveList::allowScriptNonce): Deleted.
+        (WebCore::isAllowedByAllWithNonce): Deleted.
+        (WebCore::ContentSecurityPolicy::allowScriptNonce): Deleted.
+        (WebCore::ContentSecurityPolicy::reportInvalidNonce): Deleted.
+        * page/ContentSecurityPolicy.h:
+
</ins><span class="cx"> 2014-07-16  Jer Noble  &lt;jer.noble@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION(r171069) 75% repro crash in WebCore::AudioHardwareListenerMac::processIsRunningChanged()
</span></span></pre></div>
<a id="trunkSourceWebCoredomScriptElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ScriptElement.cpp (171149 => 171150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ScriptElement.cpp        2014-07-16 19:10:22 UTC (rev 171149)
+++ trunk/Source/WebCore/dom/ScriptElement.cpp        2014-07-16 20:31:06 UTC (rev 171150)
</span><span class="lines">@@ -247,8 +247,6 @@
</span><span class="cx">         return false;
</span><span class="cx">     if (!m_element.inDocument() || &amp;m_element.document() != &amp;originalDocument.get())
</span><span class="cx">         return false;
</span><del>-    if (!m_element.document().contentSecurityPolicy()-&gt;allowScriptNonce(m_element.fastGetAttribute(HTMLNames::nonceAttr), m_element.document().url(), m_startLineNumber, m_element.document().completeURL(sourceUrl)))
-        return false;
</del><span class="cx"> 
</span><span class="cx">     ASSERT(!m_cachedScript);
</span><span class="cx">     if (!stripLeadingAndTrailingHTMLSpaces(sourceUrl).isEmpty()) {
</span><span class="lines">@@ -282,9 +280,6 @@
</span><span class="cx">     if (sourceCode.isEmpty())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    if (!m_element.document().contentSecurityPolicy()-&gt;allowScriptNonce(m_element.fastGetAttribute(HTMLNames::nonceAttr), m_element.document().url(), m_startLineNumber))
-        return;
-
</del><span class="cx">     if (!m_isExternalScript &amp;&amp; !m_element.document().contentSecurityPolicy()-&gt;allowInlineScript(m_element.document().url(), m_startLineNumber))
</span><span class="cx">         return;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepageContentSecurityPolicycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/ContentSecurityPolicy.cpp (171149 => 171150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/ContentSecurityPolicy.cpp        2014-07-16 19:10:22 UTC (rev 171149)
+++ trunk/Source/WebCore/page/ContentSecurityPolicy.cpp        2014-07-16 20:31:06 UTC (rev 171150)
</span><span class="lines">@@ -67,11 +67,6 @@
</span><span class="cx">     return isASCIISpace(c) || (c &gt;= 0x21 &amp;&amp; c &lt;= 0x7e); // Whitespace + VCHAR
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool isNonceCharacter(UChar c)
-{
-    return (c &gt;= 0x21 &amp;&amp; c &lt;= 0x7e) &amp;&amp; c != ',' &amp;&amp; c != ';'; // VCHAR - ',' - ';'
-}
-
</del><span class="cx"> bool isSourceCharacter(UChar c)
</span><span class="cx"> {
</span><span class="cx">     return !isASCIISpace(c);
</span><span class="lines">@@ -124,7 +119,6 @@
</span><span class="cx"> static const char baseURI[] = &quot;base-uri&quot;;
</span><span class="cx"> static const char formAction[] = &quot;form-action&quot;;
</span><span class="cx"> static const char pluginTypes[] = &quot;plugin-types&quot;;
</span><del>-static const char scriptNonce[] = &quot;script-nonce&quot;;
</del><span class="cx"> #if ENABLE(CSP_NEXT)
</span><span class="cx"> static const char reflectedXSS[] = &quot;reflected-xss&quot;;
</span><span class="cx"> #endif
</span><span class="lines">@@ -146,7 +140,6 @@
</span><span class="cx">         || equalIgnoringCase(name, baseURI)
</span><span class="cx">         || equalIgnoringCase(name, formAction)
</span><span class="cx">         || equalIgnoringCase(name, pluginTypes)
</span><del>-        || equalIgnoringCase(name, scriptNonce)
</del><span class="cx">         || equalIgnoringCase(name, reflectedXSS)
</span><span class="cx"> #endif
</span><span class="cx">     );
</span><span class="lines">@@ -664,51 +657,6 @@
</span><span class="cx">     ContentSecurityPolicy* m_policy;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-class NonceDirective : public CSPDirective {
-public:
-    NonceDirective(const String&amp; name, const String&amp; value, ContentSecurityPolicy* policy)
-        : CSPDirective(name, value, policy)
-    {
-        parse(value);
-    }
-
-    bool allows(const String&amp; nonce) const
-    {
-        return (!m_scriptNonce.isEmpty() &amp;&amp; nonce.stripWhiteSpace() == m_scriptNonce);
-    }
-
-private:
-    void parse(const String&amp; value)
-    {
-        String nonce;
-        auto characters = StringView(value).upconvertedCharacters();
-        const UChar* position = characters;
-        const UChar* end = position + value.length();
-
-        skipWhile&lt;isASCIISpace&gt;(position, end);
-        const UChar* nonceBegin = position;
-        if (position == end) {
-            policy()-&gt;reportInvalidNonce(String());
-            m_scriptNonce = &quot;&quot;;
-            return;
-        }
-        skipWhile&lt;isNonceCharacter&gt;(position, end);
-        if (nonceBegin &lt; position)
-            nonce = String(nonceBegin, position - nonceBegin);
-
-        // Trim off trailing whitespace: If we're not at the end of the string, log
-        // an error.
-        skipWhile&lt;isASCIISpace&gt;(position, end);
-        if (position &lt; end) {
-            policy()-&gt;reportInvalidNonce(value);
-            m_scriptNonce = &quot;&quot;;
-        } else
-            m_scriptNonce = nonce;
-    }
-
-    String m_scriptNonce;
-};
-
</del><span class="cx"> class MediaListDirective : public CSPDirective {
</span><span class="cx"> public:
</span><span class="cx">     MediaListDirective(const String&amp; name, const String&amp; value, ContentSecurityPolicy* policy)
</span><span class="lines">@@ -821,7 +769,6 @@
</span><span class="cx">     bool allowInlineScript(const String&amp; contextURL, const WTF::OrdinalNumber&amp; contextLine, ContentSecurityPolicy::ReportingStatus) const;
</span><span class="cx">     bool allowInlineStyle(const String&amp; contextURL, const WTF::OrdinalNumber&amp; contextLine, ContentSecurityPolicy::ReportingStatus) const;
</span><span class="cx">     bool allowEval(JSC::ExecState*, ContentSecurityPolicy::ReportingStatus) const;
</span><del>-    bool allowScriptNonce(const String&amp; nonce, const String&amp; contextURL, const WTF::OrdinalNumber&amp; contextLine, const URL&amp;) const;
</del><span class="cx">     bool allowPluginType(const String&amp; type, const String&amp; typeAttribute, const URL&amp;, ContentSecurityPolicy::ReportingStatus) const;
</span><span class="cx"> 
</span><span class="cx">     bool allowScriptFromSource(const URL&amp;, ContentSecurityPolicy::ReportingStatus) const;
</span><span class="lines">@@ -846,7 +793,6 @@
</span><span class="cx"> 
</span><span class="cx">     bool parseDirective(const UChar* begin, const UChar* end, String&amp; name, String&amp; value);
</span><span class="cx">     void parseReportURI(const String&amp; name, const String&amp; value);
</span><del>-    void parseScriptNonce(const String&amp; name, const String&amp; value);
</del><span class="cx">     void parsePluginTypes(const String&amp; name, const String&amp; value);
</span><span class="cx">     void parseReflectedXSS(const String&amp; name, const String&amp; value);
</span><span class="cx">     void addDirective(const String&amp; name, const String&amp; value);
</span><span class="lines">@@ -860,7 +806,6 @@
</span><span class="cx"> 
</span><span class="cx">     bool checkEval(SourceListDirective*) const;
</span><span class="cx">     bool checkInline(SourceListDirective*) const;
</span><del>-    bool checkNonce(NonceDirective*, const String&amp;) const;
</del><span class="cx">     bool checkSource(SourceListDirective*, const URL&amp;) const;
</span><span class="cx">     bool checkMediaType(MediaListDirective*, const String&amp; type, const String&amp; typeAttribute) const;
</span><span class="cx"> 
</span><span class="lines">@@ -868,7 +813,6 @@
</span><span class="cx"> 
</span><span class="cx">     bool checkEvalAndReportViolation(SourceListDirective*, const String&amp; consoleMessage, const String&amp; contextURL = String(), const WTF::OrdinalNumber&amp; contextLine = WTF::OrdinalNumber::beforeFirst(), JSC::ExecState* = 0) const;
</span><span class="cx">     bool checkInlineAndReportViolation(SourceListDirective*, const String&amp; consoleMessage, const String&amp; contextURL, const WTF::OrdinalNumber&amp; contextLine, bool isScript) const;
</span><del>-    bool checkNonceAndReportViolation(NonceDirective*, const String&amp; nonce, const String&amp; consoleMessage, const String&amp; contextURL, const WTF::OrdinalNumber&amp; contextLine) const;
</del><span class="cx"> 
</span><span class="cx">     bool checkSourceAndReportViolation(SourceListDirective*, const URL&amp;, const String&amp; effectiveDirective) const;
</span><span class="cx">     bool checkMediaTypeAndReportViolation(MediaListDirective*, const String&amp; type, const String&amp; typeAttribute, const String&amp; consoleMessage) const;
</span><span class="lines">@@ -885,7 +829,6 @@
</span><span class="cx">     ContentSecurityPolicy::ReflectedXSSDisposition m_reflectedXSSDisposition;
</span><span class="cx"> 
</span><span class="cx">     std::unique_ptr&lt;MediaListDirective&gt; m_pluginTypes;
</span><del>-    std::unique_ptr&lt;NonceDirective&gt; m_scriptNonce;
</del><span class="cx">     std::unique_ptr&lt;SourceListDirective&gt; m_baseURI;
</span><span class="cx">     std::unique_ptr&lt;SourceListDirective&gt; m_connectSrc;
</span><span class="cx">     std::unique_ptr&lt;SourceListDirective&gt; m_defaultSrc;
</span><span class="lines">@@ -945,11 +888,6 @@
</span><span class="cx">     return !directive || directive-&gt;allowInline();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool CSPDirectiveList::checkNonce(NonceDirective* directive, const String&amp; nonce) const
-{
-    return !directive || directive-&gt;allows(nonce);
-}
-
</del><span class="cx"> bool CSPDirectiveList::checkSource(SourceListDirective* directive, const URL&amp; url) const
</span><span class="cx"> {
</span><span class="cx">     return !directive || directive-&gt;allows(url);
</span><span class="lines">@@ -986,14 +924,6 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool CSPDirectiveList::checkNonceAndReportViolation(NonceDirective* directive, const String&amp; nonce, const String&amp; consoleMessage, const String&amp; contextURL, const WTF::OrdinalNumber&amp; contextLine) const
-{
-    if (checkNonce(directive, nonce))
-        return true;
-    reportViolation(directive-&gt;text(), scriptNonce, consoleMessage + &quot;\&quot;&quot; + directive-&gt;text() + &quot;\&quot;.\n&quot;, URL(), contextURL, contextLine);
-    return denyIfEnforcingPolicy();
-}
-
</del><span class="cx"> bool CSPDirectiveList::checkMediaTypeAndReportViolation(MediaListDirective* directive, const String&amp; type, const String&amp; typeAttribute, const String&amp; consoleMessage) const
</span><span class="cx"> {
</span><span class="cx">     if (checkMediaType(directive, type, typeAttribute))
</span><span class="lines">@@ -1064,25 +994,17 @@
</span><span class="cx"> bool CSPDirectiveList::allowJavaScriptURLs(const String&amp; contextURL, const WTF::OrdinalNumber&amp; contextLine, ContentSecurityPolicy::ReportingStatus reportingStatus) const
</span><span class="cx"> {
</span><span class="cx">     DEPRECATED_DEFINE_STATIC_LOCAL(String, consoleMessage, (ASCIILiteral(&quot;Refused to execute JavaScript URL because it violates the following Content Security Policy directive: &quot;)));
</span><del>-    if (reportingStatus == ContentSecurityPolicy::SendReport) {
-        return (checkInlineAndReportViolation(operativeDirective(m_scriptSrc.get()), consoleMessage, contextURL, contextLine, true)
-                &amp;&amp; checkNonceAndReportViolation(m_scriptNonce.get(), String(), consoleMessage, contextURL, contextLine));
-    } else {
-        return (checkInline(operativeDirective(m_scriptSrc.get()))
-                &amp;&amp; checkNonce(m_scriptNonce.get(), String()));
-    }
</del><ins>+    return reportingStatus == ContentSecurityPolicy::SendReport ?
+        checkInlineAndReportViolation(operativeDirective(m_scriptSrc.get()), consoleMessage, contextURL, contextLine, true)
+        : checkInline(operativeDirective(m_scriptSrc.get()));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool CSPDirectiveList::allowInlineEventHandlers(const String&amp; contextURL, const WTF::OrdinalNumber&amp; contextLine, ContentSecurityPolicy::ReportingStatus reportingStatus) const
</span><span class="cx"> {
</span><span class="cx">     DEPRECATED_DEFINE_STATIC_LOCAL(String, consoleMessage, (ASCIILiteral(&quot;Refused to execute inline event handler because it violates the following Content Security Policy directive: &quot;)));
</span><del>-    if (reportingStatus == ContentSecurityPolicy::SendReport) {
-        return (checkInlineAndReportViolation(operativeDirective(m_scriptSrc.get()), consoleMessage, contextURL, contextLine, true)
-                &amp;&amp; checkNonceAndReportViolation(m_scriptNonce.get(), String(), consoleMessage, contextURL, contextLine));
-    } else {
-        return (checkInline(operativeDirective(m_scriptSrc.get()))
-                &amp;&amp; checkNonce(m_scriptNonce.get(), String()));
-    }
</del><ins>+    return reportingStatus == ContentSecurityPolicy::SendReport ?
+        checkInlineAndReportViolation(operativeDirective(m_scriptSrc.get()), consoleMessage, contextURL, contextLine, true)
+        : checkInline(operativeDirective(m_scriptSrc.get()));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool CSPDirectiveList::allowInlineScript(const String&amp; contextURL, const WTF::OrdinalNumber&amp; contextLine, ContentSecurityPolicy::ReportingStatus reportingStatus) const
</span><span class="lines">@@ -1109,14 +1031,6 @@
</span><span class="cx">         checkEval(operativeDirective(m_scriptSrc.get()));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool CSPDirectiveList::allowScriptNonce(const String&amp; nonce, const String&amp; contextURL, const WTF::OrdinalNumber&amp; contextLine, const URL&amp; url) const
-{
-    DEPRECATED_DEFINE_STATIC_LOCAL(String, consoleMessage, (ASCIILiteral(&quot;Refused to execute script because it violates the following Content Security Policy directive: &quot;)));
-    if (url.isEmpty())
-        return checkNonceAndReportViolation(m_scriptNonce.get(), nonce, consoleMessage, contextURL, contextLine);
-    return checkNonceAndReportViolation(m_scriptNonce.get(), nonce, &quot;Refused to load '&quot; + url.stringCenterEllipsizedToLength() + &quot;' because it violates the following Content Security Policy directive: &quot;, contextURL, contextLine);
-}
-
</del><span class="cx"> bool CSPDirectiveList::allowPluginType(const String&amp; type, const String&amp; typeAttribute, const URL&amp; url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
</span><span class="cx"> {
</span><span class="cx">     return reportingStatus == ContentSecurityPolicy::SendReport ?
</span><span class="lines">@@ -1415,8 +1329,6 @@
</span><span class="cx">             setCSPDirective&lt;SourceListDirective&gt;(name, value, m_formAction);
</span><span class="cx">         else if (equalIgnoringCase(name, pluginTypes))
</span><span class="cx">             setCSPDirective&lt;MediaListDirective&gt;(name, value, m_pluginTypes);
</span><del>-        else if (equalIgnoringCase(name, scriptNonce))
-            setCSPDirective&lt;NonceDirective&gt;(name, value, m_scriptNonce);
</del><span class="cx">         else if (equalIgnoringCase(name, reflectedXSS))
</span><span class="cx">             parseReflectedXSS(name, value);
</span><span class="cx">         else
</span><span class="lines">@@ -1516,16 +1428,6 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template&lt;bool (CSPDirectiveList::*allowed)(const String&amp;, const String&amp;, const WTF::OrdinalNumber&amp;, const URL&amp;) const&gt;
-bool isAllowedByAllWithNonce(const CSPDirectiveListVector&amp; policies, const String&amp; nonce, const String&amp; contextURL, const WTF::OrdinalNumber&amp; contextLine, const URL&amp; url)
-{
-    for (size_t i = 0; i &lt; policies.size(); ++i) {
-        if (!(policies[i].get()-&gt;*allowed)(nonce, contextURL, contextLine, url))
-            return false;
-    }
-    return true;
-}
-
</del><span class="cx"> template&lt;bool (CSPDirectiveList::*allowFromURL)(const URL&amp;, ContentSecurityPolicy::ReportingStatus) const&gt;
</span><span class="cx"> bool isAllowedByAllWithURL(const CSPDirectiveListVector&amp; policies, const URL&amp; url, ContentSecurityPolicy::ReportingStatus reportingStatus)
</span><span class="cx"> {
</span><span class="lines">@@ -1575,11 +1477,6 @@
</span><span class="cx">     return String();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool ContentSecurityPolicy::allowScriptNonce(const String&amp; nonce, const String&amp; contextURL, const WTF::OrdinalNumber&amp; contextLine, const URL&amp; url) const
-{
-    return isAllowedByAllWithNonce&lt;&amp;CSPDirectiveList::allowScriptNonce&gt;(m_policies, nonce, contextURL, contextLine, url);
-}
-
</del><span class="cx"> bool ContentSecurityPolicy::allowPluginType(const String&amp; type, const String&amp; typeAttribute, const URL&amp; url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
</span><span class="cx"> {
</span><span class="cx">     for (size_t i = 0; i &lt; m_policies.size(); ++i) {
</span><span class="lines">@@ -1845,12 +1742,6 @@
</span><span class="cx">     logToConsole(message);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void ContentSecurityPolicy::reportInvalidNonce(const String&amp; nonce) const
-{
-    String message = makeString(&quot;Ignoring invalid Content Security Policy script nonce: '&quot;, nonce, &quot;'.\n&quot;);
-    logToConsole(message);
-}
-
</del><span class="cx"> void ContentSecurityPolicy::reportInvalidSourceExpression(const String&amp; directiveName, const String&amp; source) const
</span><span class="cx"> {
</span><span class="cx">     String message = makeString(&quot;The source list for Content Security Policy directive '&quot;, directiveName, &quot;' contains an invalid source: '&quot;, source, &quot;'. It will be ignored.&quot;);
</span></span></pre></div>
<a id="trunkSourceWebCorepageContentSecurityPolicyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/ContentSecurityPolicy.h (171149 => 171150)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/ContentSecurityPolicy.h        2014-07-16 19:10:22 UTC (rev 171149)
+++ trunk/Source/WebCore/page/ContentSecurityPolicy.h        2014-07-16 20:31:06 UTC (rev 171150)
</span><span class="lines">@@ -89,7 +89,6 @@
</span><span class="cx">     bool allowInlineScript(const String&amp; contextURL, const WTF::OrdinalNumber&amp; contextLine, ReportingStatus = SendReport) const;
</span><span class="cx">     bool allowInlineStyle(const String&amp; contextURL, const WTF::OrdinalNumber&amp; contextLine, ReportingStatus = SendReport) const;
</span><span class="cx">     bool allowEval(JSC::ExecState* = 0, ReportingStatus = SendReport) const;
</span><del>-    bool allowScriptNonce(const String&amp; nonce, const String&amp; contextURL, const WTF::OrdinalNumber&amp; contextLine, const URL&amp; = URL()) const;
</del><span class="cx">     bool allowPluginType(const String&amp; type, const String&amp; typeAttribute, const URL&amp;, ReportingStatus = SendReport) const;
</span><span class="cx"> 
</span><span class="cx">     bool allowScriptFromSource(const URL&amp;, ReportingStatus = SendReport) const;
</span><span class="lines">@@ -114,7 +113,6 @@
</span><span class="cx">     void reportDuplicateDirective(const String&amp;) const;
</span><span class="cx">     void reportInvalidDirectiveValueCharacter(const String&amp; directiveName, const String&amp; value) const;
</span><span class="cx">     void reportInvalidPathCharacter(const String&amp; directiveName, const String&amp; value, const char) const;
</span><del>-    void reportInvalidNonce(const String&amp;) const;
</del><span class="cx">     void reportInvalidPluginTypes(const String&amp;) const;
</span><span class="cx">     void reportInvalidSandboxFlags(const String&amp;) const;
</span><span class="cx">     void reportInvalidSourceExpression(const String&amp; directiveName, const String&amp; source) const;
</span></span></pre>
</div>
</div>

</body>
</html>