<!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>[178648] 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/178648">178648</a></dd>
<dt>Author</dt> <dd>ap@apple.com</dd>
<dt>Date</dt> <dd>2015-01-19 09:25:23 -0800 (Mon, 19 Jan 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Console log sometimes prefixed with line number
https://bugs.webkit.org/show_bug.cgi?id=105280

Reviewed by Darin Adler.

Source/WebCore:

Improve the logic for determining whether a console message should be associated
with a source code location.

* dom/ScriptableDocumentParser.h:
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::shouldAssociateConsoleMessagesWithTextPosition):
* html/parser/HTMLDocumentParser.h:
* page/PageConsoleClient.cpp:
(WebCore::getParserLocationForConsoleMessage):
(WebCore::PageConsoleClient::addMessage):
* xml/parser/XMLDocumentParser.cpp:
(WebCore::XMLDocumentParser::pauseParsing):
* xml/parser/XMLDocumentParser.h:
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::shouldAssociateConsoleMessagesWithTextPosition):

LayoutTests:

Some messages lost line numbers now. Some of these were definitely wrong, others
were roughly right. Unfortunately, it is not currently possible to figure out whether
ScriptController actually executes a script after passing control to it. So the cases
where it refuses to execute the script and logs a message are handled like those
where it does.

I think that it shouldn't be a big obstacle in practice, it is easy enough to find
a script in a page when Web Inspector tells you that scripts were not allowed.

* fast/frames/sandboxed-iframe-attribute-parsing-06-expected.txt:
* fast/frames/sandboxed-iframe-attribute-parsing-07-expected.txt:
* fast/frames/sandboxed-iframe-attribute-parsing-08-expected.txt:
* fast/frames/sandboxed-iframe-attribute-parsing-09-expected.txt:
* fast/frames/sandboxed-iframe-attribute-parsing-10-expected.txt:
* fast/frames/sandboxed-iframe-attribute-parsing-11-expected.txt:
* fast/frames/sandboxed-iframe-attribute-parsing-12-expected.txt:
* fast/frames/sandboxed-iframe-attribute-parsing-13-expected.txt:
* fast/frames/sandboxed-iframe-attribute-parsing-14-expected.txt:
* fast/frames/sandboxed-iframe-parsing-space-characters-expected.txt:
* fast/frames/sandboxed-iframe-scripting-04-expected.txt:
* http/tests/security/contentSecurityPolicy/sandbox-empty-expected.txt:
* http/tests/security/contentSecurityPolicy/sandbox-empty-subframe-expected.txt:
* http/tests/security/contentSecurityPolicy/sandbox-in-http-header-control-expected.txt:
* http/tests/security/contentSecurityPolicy/sandbox-in-http-header-expected.txt:
* http/tests/security/contentSecurityPolicy/sandbox-invalid-header-expected.txt:
* http/tests/security/isolatedWorld/sandboxed-iframe-expected.txt:
* http/tests/security/mixedContent/insecure-script-in-iframe-expected.txt:
* http/tests/security/mixedContent/redirect-http-to-https-script-in-iframe-expected.txt:
* http/tests/security/no-javascript-refresh-expected.txt:
* http/tests/security/no-javascript-refresh-spaces-expected.txt:

* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
Unmark tests that were broken by this.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastframessandboxediframeattributeparsing06expectedtxt">trunk/LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing-06-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastframessandboxediframeattributeparsing07expectedtxt">trunk/LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing-07-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastframessandboxediframeattributeparsing08expectedtxt">trunk/LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing-08-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastframessandboxediframeattributeparsing09expectedtxt">trunk/LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing-09-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastframessandboxediframeattributeparsing10expectedtxt">trunk/LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing-10-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastframessandboxediframeattributeparsing11expectedtxt">trunk/LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing-11-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastframessandboxediframeattributeparsing12expectedtxt">trunk/LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing-12-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastframessandboxediframeattributeparsing13expectedtxt">trunk/LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing-13-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastframessandboxediframeattributeparsing14expectedtxt">trunk/LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing-14-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastframessandboxediframeparsingspacecharactersexpectedtxt">trunk/LayoutTests/fast/frames/sandboxed-iframe-parsing-space-characters-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastframessandboxediframescripting04expectedtxt">trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-04-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicysandboxemptyexpectedtxt">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/sandbox-empty-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicysandboxemptysubframeexpectedtxt">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/sandbox-empty-subframe-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicysandboxinhttpheadercontrolexpectedtxt">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/sandbox-in-http-header-control-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicysandboxinhttpheaderexpectedtxt">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/sandbox-in-http-header-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycontentSecurityPolicysandboxinvalidheaderexpectedtxt">trunk/LayoutTests/http/tests/security/contentSecurityPolicy/sandbox-invalid-header-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecurityisolatedWorldsandboxediframeexpectedtxt">trunk/LayoutTests/http/tests/security/isolatedWorld/sandboxed-iframe-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritymixedContentinsecurescriptiniframeexpectedtxt">trunk/LayoutTests/http/tests/security/mixedContent/insecure-script-in-iframe-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritymixedContentredirecthttptohttpsscriptiniframeexpectedtxt">trunk/LayoutTests/http/tests/security/mixedContent/redirect-http-to-https-script-in-iframe-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritynojavascriptrefreshexpectedtxt">trunk/LayoutTests/http/tests/security/no-javascript-refresh-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritynojavascriptrefreshspacesexpectedtxt">trunk/LayoutTests/http/tests/security/no-javascript-refresh-spaces-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformeflTestExpectations">trunk/LayoutTests/platform/efl/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformgtkTestExpectations">trunk/LayoutTests/platform/gtk/TestExpectations</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoredomScriptableDocumentParserh">trunk/Source/WebCore/dom/ScriptableDocumentParser.h</a></li>
<li><a href="#trunkSourceWebCorehtmlparserHTMLDocumentParsercpp">trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlparserHTMLDocumentParserh">trunk/Source/WebCore/html/parser/HTMLDocumentParser.h</a></li>
<li><a href="#trunkSourceWebCorepagePageConsoleClientcpp">trunk/Source/WebCore/page/PageConsoleClient.cpp</a></li>
<li><a href="#trunkSourceWebCorexmlparserXMLDocumentParsercpp">trunk/Source/WebCore/xml/parser/XMLDocumentParser.cpp</a></li>
<li><a href="#trunkSourceWebCorexmlparserXMLDocumentParserh">trunk/Source/WebCore/xml/parser/XMLDocumentParser.h</a></li>
<li><a href="#trunkSourceWebCorexmlparserXMLDocumentParserLibxml2cpp">trunk/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (178647 => 178648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-01-19 16:32:26 UTC (rev 178647)
+++ trunk/LayoutTests/ChangeLog        2015-01-19 17:25:23 UTC (rev 178648)
</span><span class="lines">@@ -1,3 +1,45 @@
</span><ins>+2015-01-16  Alexey Proskuryakov  &lt;ap@apple.com&gt;
+
+        Console log sometimes prefixed with line number
+        https://bugs.webkit.org/show_bug.cgi?id=105280
+
+        Reviewed by Darin Adler.
+
+        Some messages lost line numbers now. Some of these were definitely wrong, others
+        were roughly right. Unfortunately, it is not currently possible to figure out whether
+        ScriptController actually executes a script after passing control to it. So the cases
+        where it refuses to execute the script and logs a message are handled like those
+        where it does.
+
+        I think that it shouldn't be a big obstacle in practice, it is easy enough to find
+        a script in a page when Web Inspector tells you that scripts were not allowed.
+
+        * fast/frames/sandboxed-iframe-attribute-parsing-06-expected.txt:
+        * fast/frames/sandboxed-iframe-attribute-parsing-07-expected.txt:
+        * fast/frames/sandboxed-iframe-attribute-parsing-08-expected.txt:
+        * fast/frames/sandboxed-iframe-attribute-parsing-09-expected.txt:
+        * fast/frames/sandboxed-iframe-attribute-parsing-10-expected.txt:
+        * fast/frames/sandboxed-iframe-attribute-parsing-11-expected.txt:
+        * fast/frames/sandboxed-iframe-attribute-parsing-12-expected.txt:
+        * fast/frames/sandboxed-iframe-attribute-parsing-13-expected.txt:
+        * fast/frames/sandboxed-iframe-attribute-parsing-14-expected.txt:
+        * fast/frames/sandboxed-iframe-parsing-space-characters-expected.txt:
+        * fast/frames/sandboxed-iframe-scripting-04-expected.txt:
+        * http/tests/security/contentSecurityPolicy/sandbox-empty-expected.txt:
+        * http/tests/security/contentSecurityPolicy/sandbox-empty-subframe-expected.txt:
+        * http/tests/security/contentSecurityPolicy/sandbox-in-http-header-control-expected.txt:
+        * http/tests/security/contentSecurityPolicy/sandbox-in-http-header-expected.txt:
+        * http/tests/security/contentSecurityPolicy/sandbox-invalid-header-expected.txt:
+        * http/tests/security/isolatedWorld/sandboxed-iframe-expected.txt:
+        * http/tests/security/mixedContent/insecure-script-in-iframe-expected.txt:
+        * http/tests/security/mixedContent/redirect-http-to-https-script-in-iframe-expected.txt:
+        * http/tests/security/no-javascript-refresh-expected.txt:
+        * http/tests/security/no-javascript-refresh-spaces-expected.txt:
+
+        * platform/efl/TestExpectations:
+        * platform/gtk/TestExpectations:
+        Unmark tests that were broken by this.
+
</ins><span class="cx"> 2015-01-19  Csaba Osztrogonác  &lt;ossy@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         [Win] REGRESSION(r177542 or r177613): svg/W3C tests are broken
</span></span></pre></div>
<a id="trunkLayoutTestsfastframessandboxediframeattributeparsing06expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing-06-expected.txt (178647 => 178648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing-06-expected.txt        2015-01-19 16:32:26 UTC (rev 178647)
+++ trunk/LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing-06-expected.txt        2015-01-19 17:25:23 UTC (rev 178648)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> CONSOLE MESSAGE: line 9: Error while parsing the 'sandbox' attribute: 'allowscripts' is an invalid sandbox flag.
</span><del>-CONSOLE MESSAGE: line 4: Blocked script execution in 'sandboxed-iframe-attribute-parsing-disallowed.html' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
</del><ins>+CONSOLE MESSAGE: Blocked script execution in 'sandboxed-iframe-attribute-parsing-disallowed.html' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
</ins><span class="cx"> Misspelling.
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfastframessandboxediframeattributeparsing07expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing-07-expected.txt (178647 => 178648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing-07-expected.txt        2015-01-19 16:32:26 UTC (rev 178647)
+++ trunk/LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing-07-expected.txt        2015-01-19 17:25:23 UTC (rev 178648)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> CONSOLE MESSAGE: line 9: Error while parsing the 'sandbox' attribute: 'allows-cripts' is an invalid sandbox flag.
</span><del>-CONSOLE MESSAGE: line 4: Blocked script execution in 'sandboxed-iframe-attribute-parsing-disallowed.html' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
</del><ins>+CONSOLE MESSAGE: Blocked script execution in 'sandboxed-iframe-attribute-parsing-disallowed.html' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
</ins><span class="cx"> Misspelling.
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfastframessandboxediframeattributeparsing08expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing-08-expected.txt (178647 => 178648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing-08-expected.txt        2015-01-19 16:32:26 UTC (rev 178647)
+++ trunk/LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing-08-expected.txt        2015-01-19 17:25:23 UTC (rev 178648)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> CONSOLE MESSAGE: line 9: Error while parsing the 'sandbox' attribute: '-allow-scripts' is an invalid sandbox flag.
</span><del>-CONSOLE MESSAGE: line 4: Blocked script execution in 'sandboxed-iframe-attribute-parsing-disallowed.html' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
</del><ins>+CONSOLE MESSAGE: Blocked script execution in 'sandboxed-iframe-attribute-parsing-disallowed.html' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
</ins><span class="cx"> Misspelling.
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfastframessandboxediframeattributeparsing09expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing-09-expected.txt (178647 => 178648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing-09-expected.txt        2015-01-19 16:32:26 UTC (rev 178647)
+++ trunk/LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing-09-expected.txt        2015-01-19 17:25:23 UTC (rev 178648)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> CONSOLE MESSAGE: line 9: Error while parsing the 'sandbox' attribute: 'allow_scripts' is an invalid sandbox flag.
</span><del>-CONSOLE MESSAGE: line 4: Blocked script execution in 'sandboxed-iframe-attribute-parsing-disallowed.html' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
</del><ins>+CONSOLE MESSAGE: Blocked script execution in 'sandboxed-iframe-attribute-parsing-disallowed.html' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
</ins><span class="cx"> Misspelling.
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfastframessandboxediframeattributeparsing10expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing-10-expected.txt (178647 => 178648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing-10-expected.txt        2015-01-19 16:32:26 UTC (rev 178647)
+++ trunk/LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing-10-expected.txt        2015-01-19 17:25:23 UTC (rev 178648)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> CONSOLE MESSAGE: line 9: Error while parsing the 'sandbox' attribute: 'allowScripts' is an invalid sandbox flag.
</span><del>-CONSOLE MESSAGE: line 4: Blocked script execution in 'sandboxed-iframe-attribute-parsing-disallowed.html' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
</del><ins>+CONSOLE MESSAGE: Blocked script execution in 'sandboxed-iframe-attribute-parsing-disallowed.html' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
</ins><span class="cx"> Misspelling.
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfastframessandboxediframeattributeparsing11expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing-11-expected.txt (178647 => 178648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing-11-expected.txt        2015-01-19 16:32:26 UTC (rev 178647)
+++ trunk/LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing-11-expected.txt        2015-01-19 17:25:23 UTC (rev 178648)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> CONSOLE MESSAGE: line 9: Error while parsing the 'sandbox' attribute: 'aallow-scripts' is an invalid sandbox flag.
</span><del>-CONSOLE MESSAGE: line 4: Blocked script execution in 'sandboxed-iframe-attribute-parsing-disallowed.html' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
</del><ins>+CONSOLE MESSAGE: Blocked script execution in 'sandboxed-iframe-attribute-parsing-disallowed.html' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
</ins><span class="cx"> Misspelling.
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfastframessandboxediframeattributeparsing12expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing-12-expected.txt (178647 => 178648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing-12-expected.txt        2015-01-19 16:32:26 UTC (rev 178647)
+++ trunk/LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing-12-expected.txt        2015-01-19 17:25:23 UTC (rev 178648)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> CONSOLE MESSAGE: line 9: Error while parsing the 'sandbox' attribute: 'allow-scriptss' is an invalid sandbox flag.
</span><del>-CONSOLE MESSAGE: line 4: Blocked script execution in 'sandboxed-iframe-attribute-parsing-disallowed.html' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
</del><ins>+CONSOLE MESSAGE: Blocked script execution in 'sandboxed-iframe-attribute-parsing-disallowed.html' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
</ins><span class="cx"> Misspelling.
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfastframessandboxediframeattributeparsing13expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing-13-expected.txt (178647 => 178648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing-13-expected.txt        2015-01-19 16:32:26 UTC (rev 178647)
+++ trunk/LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing-13-expected.txt        2015-01-19 17:25:23 UTC (rev 178648)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> CONSOLE MESSAGE: line 9: Error while parsing the 'sandbox' attribute: 'allow-script' is an invalid sandbox flag.
</span><del>-CONSOLE MESSAGE: line 4: Blocked script execution in 'sandboxed-iframe-attribute-parsing-disallowed.html' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
</del><ins>+CONSOLE MESSAGE: Blocked script execution in 'sandboxed-iframe-attribute-parsing-disallowed.html' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
</ins><span class="cx"> Misspelling.
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfastframessandboxediframeattributeparsing14expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing-14-expected.txt (178647 => 178648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing-14-expected.txt        2015-01-19 16:32:26 UTC (rev 178647)
+++ trunk/LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing-14-expected.txt        2015-01-19 17:25:23 UTC (rev 178648)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-CONSOLE MESSAGE: line 4: Blocked script execution in 'sandboxed-iframe-attribute-parsing-disallowed.html' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
</del><ins>+CONSOLE MESSAGE: Blocked script execution in 'sandboxed-iframe-attribute-parsing-disallowed.html' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
</ins><span class="cx"> Full sandbox.
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfastframessandboxediframeparsingspacecharactersexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/frames/sandboxed-iframe-parsing-space-characters-expected.txt (178647 => 178648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/frames/sandboxed-iframe-parsing-space-characters-expected.txt        2015-01-19 16:32:26 UTC (rev 178647)
+++ trunk/LayoutTests/fast/frames/sandboxed-iframe-parsing-space-characters-expected.txt        2015-01-19 17:25:23 UTC (rev 178648)
</span><span class="lines">@@ -1,10 +1,10 @@
</span><span class="cx"> ALERT: PASS: Form feed is a delimiter.
</span><span class="cx"> CONSOLE MESSAGE: line 16: Error while parsing the 'sandbox' attribute: 'allow-scripts allow-forms' is an invalid sandbox flag.
</span><del>-CONSOLE MESSAGE: line 1: Blocked script execution in 'data:text/html,&lt;script&gt;alert('FAIL: Vertical tab is not a delimiter.');&lt;/script&gt;' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
</del><ins>+CONSOLE MESSAGE: Blocked script execution in 'data:text/html,&lt;script&gt;alert('FAIL: Vertical tab is not a delimiter.');&lt;/script&gt;' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
</ins><span class="cx"> ALERT: PASS: Newline is a delimiter.
</span><span class="cx"> ALERT: PASS: Return is a delimiter.
</span><span class="cx"> CONSOLE MESSAGE: line 16: Error while parsing the 'sandbox' attribute: 'allow-scriptsxallow-forms' is an invalid sandbox flag.
</span><del>-CONSOLE MESSAGE: line 1: Blocked script execution in 'data:text/html,&lt;script&gt;alert('FAIL: x is not a delimiter.');&lt;/script&gt;' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
</del><ins>+CONSOLE MESSAGE: Blocked script execution in 'data:text/html,&lt;script&gt;alert('FAIL: x is not a delimiter.');&lt;/script&gt;' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
</ins><span class="cx"> ALERT: PASS: Tab is a delimiter.
</span><span class="cx"> ALERT: PASS: Space is a delimiter character.
</span><span class="cx"> This tests whether we correct parse various space characters in the sandbox attribute.
</span></span></pre></div>
<a id="trunkLayoutTestsfastframessandboxediframescripting04expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-04-expected.txt (178647 => 178648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-04-expected.txt        2015-01-19 16:32:26 UTC (rev 178647)
+++ trunk/LayoutTests/fast/frames/sandboxed-iframe-scripting-04-expected.txt        2015-01-19 17:25:23 UTC (rev 178648)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-CONSOLE MESSAGE: line 1: Blocked script execution in 'data:text/html,&lt;script&gt;alert('FAIL: Executed script without allow-scripts in data URL');window.parent.postMessage({'fail': true}, '*');&lt;/script&gt;' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
</del><ins>+CONSOLE MESSAGE: Blocked script execution in 'data:text/html,&lt;script&gt;alert('FAIL: Executed script without allow-scripts in data URL');window.parent.postMessage({'fail': true}, '*');&lt;/script&gt;' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
</ins><span class="cx"> Verify that sandboxed frames without sandbox='allow-scripts' cannot execute script from data: URLs.
</span><span class="cx"> 
</span><span class="cx"> On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicysandboxemptyexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/sandbox-empty-expected.txt (178647 => 178648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/sandbox-empty-expected.txt        2015-01-19 16:32:26 UTC (rev 178647)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/sandbox-empty-expected.txt        2015-01-19 17:25:23 UTC (rev 178648)
</span><span class="lines">@@ -1,2 +1,2 @@
</span><del>-CONSOLE MESSAGE: line 9: Blocked script execution in 'http://127.0.0.1:8000/security/contentSecurityPolicy/sandbox-empty.html' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
</del><ins>+CONSOLE MESSAGE: Blocked script execution in 'http://127.0.0.1:8000/security/contentSecurityPolicy/sandbox-empty.html' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
</ins><span class="cx"> This test passes if it doesn't alert fail.
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicysandboxemptysubframeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/sandbox-empty-subframe-expected.txt (178647 => 178648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/sandbox-empty-subframe-expected.txt        2015-01-19 16:32:26 UTC (rev 178647)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/sandbox-empty-subframe-expected.txt        2015-01-19 17:25:23 UTC (rev 178648)
</span><span class="lines">@@ -1,2 +1,2 @@
</span><del>-CONSOLE MESSAGE: line 1: Blocked script execution in 'data:text/html,&lt;script&gt;alert('FAIL');&lt;/script&gt;' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
</del><ins>+CONSOLE MESSAGE: Blocked script execution in 'data:text/html,&lt;script&gt;alert('FAIL');&lt;/script&gt;' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
</ins><span class="cx"> This test passes if it doesn't alert fail. 
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicysandboxinhttpheadercontrolexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/sandbox-in-http-header-control-expected.txt (178647 => 178648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/sandbox-in-http-header-control-expected.txt        2015-01-19 16:32:26 UTC (rev 178647)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/sandbox-in-http-header-control-expected.txt        2015-01-19 17:25:23 UTC (rev 178648)
</span><span class="lines">@@ -1,3 +1,3 @@
</span><del>-CONSOLE MESSAGE: line 6: Blocked script execution in 'http://127.0.0.1:8000/security/contentSecurityPolicy/resources/sandbox.php?sandbox=allow-top-navigation%20allow-same-origin' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
</del><ins>+CONSOLE MESSAGE: Blocked script execution in 'http://127.0.0.1:8000/security/contentSecurityPolicy/resources/sandbox.php?sandbox=allow-top-navigation%20allow-same-origin' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
</ins><span class="cx"> ALERT: PASS: Iframe was not in a unique origin
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicysandboxinhttpheaderexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/sandbox-in-http-header-expected.txt (178647 => 178648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/sandbox-in-http-header-expected.txt        2015-01-19 16:32:26 UTC (rev 178647)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/sandbox-in-http-header-expected.txt        2015-01-19 17:25:23 UTC (rev 178648)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-CONSOLE MESSAGE: line 6: Blocked script execution in 'http://127.0.0.1:8000/security/contentSecurityPolicy/resources/sandbox.php?sandbox=allow-top-navigation' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
</del><ins>+CONSOLE MESSAGE: Blocked script execution in 'http://127.0.0.1:8000/security/contentSecurityPolicy/resources/sandbox.php?sandbox=allow-top-navigation' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
</ins><span class="cx"> CONSOLE MESSAGE: line 9: Sandbox access violation: Blocked a frame at &quot;http://127.0.0.1:8000&quot; from accessing a frame at &quot;http://127.0.0.1:8000&quot;.  The frame being accessed is sandboxed and lacks the &quot;allow-same-origin&quot; flag.
</span><span class="cx"> ALERT: PASS: Iframe was in a unique origin
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycontentSecurityPolicysandboxinvalidheaderexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/sandbox-invalid-header-expected.txt (178647 => 178648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/sandbox-invalid-header-expected.txt        2015-01-19 16:32:26 UTC (rev 178647)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/sandbox-invalid-header-expected.txt        2015-01-19 17:25:23 UTC (rev 178648)
</span><span class="lines">@@ -1,3 +1,3 @@
</span><span class="cx"> CONSOLE MESSAGE: Error while parsing the 'sandbox' Content Security Policy directive: 'allowScript' is an invalid sandbox flag.
</span><del>-CONSOLE MESSAGE: line 6: Blocked script execution in 'http://127.0.0.1:8000/security/contentSecurityPolicy/resources/sandbox.php?sandbox=allowScript' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
</del><ins>+CONSOLE MESSAGE: Blocked script execution in 'http://127.0.0.1:8000/security/contentSecurityPolicy/resources/sandbox.php?sandbox=allowScript' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecurityisolatedWorldsandboxediframeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/isolatedWorld/sandboxed-iframe-expected.txt (178647 => 178648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/isolatedWorld/sandboxed-iframe-expected.txt        2015-01-19 16:32:26 UTC (rev 178647)
+++ trunk/LayoutTests/http/tests/security/isolatedWorld/sandboxed-iframe-expected.txt        2015-01-19 17:25:23 UTC (rev 178648)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-CONSOLE MESSAGE: line 3: Blocked script execution in 'http://127.0.0.1:8000/security/isolatedWorld/resources/fail.html' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
</del><ins>+CONSOLE MESSAGE: Blocked script execution in 'http://127.0.0.1:8000/security/isolatedWorld/resources/fail.html' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
</ins><span class="cx"> ALERT: PASS
</span><span class="cx"> Test that executing scripts in an isolated world works even inside sandboxed iframes. The test passes, if an alert with the text &quot;PASS&quot; is shown.
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritymixedContentinsecurescriptiniframeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/mixedContent/insecure-script-in-iframe-expected.txt (178647 => 178648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/mixedContent/insecure-script-in-iframe-expected.txt        2015-01-19 16:32:26 UTC (rev 178647)
+++ trunk/LayoutTests/http/tests/security/mixedContent/insecure-script-in-iframe-expected.txt        2015-01-19 17:25:23 UTC (rev 178648)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-CONSOLE MESSAGE: line 1: The page at https://127.0.0.1:8443/security/mixedContent/resources/frame-with-insecure-script.html ran insecure content from http://127.0.0.1:8080/security/mixedContent/resources/script.js.
</del><ins>+CONSOLE MESSAGE: The page at https://127.0.0.1:8443/security/mixedContent/resources/frame-with-insecure-script.html ran insecure content from http://127.0.0.1:8080/security/mixedContent/resources/script.js.
</ins><span class="cx"> 
</span><span class="cx"> This test loads a secure iframe that loads an insecure script. We should trigger a mixed content callback even though the main frame is HTTP because the HTTPS frame's origin is contaminated with an insecure script.
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritymixedContentredirecthttptohttpsscriptiniframeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/mixedContent/redirect-http-to-https-script-in-iframe-expected.txt (178647 => 178648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/mixedContent/redirect-http-to-https-script-in-iframe-expected.txt        2015-01-19 16:32:26 UTC (rev 178647)
+++ trunk/LayoutTests/http/tests/security/mixedContent/redirect-http-to-https-script-in-iframe-expected.txt        2015-01-19 17:25:23 UTC (rev 178648)
</span><span class="lines">@@ -1,7 +1,7 @@
</span><span class="cx"> frame &quot;&lt;!--framePath //&lt;!--frame0--&gt;--&gt;&quot; - didStartProvisionalLoadForFrame
</span><span class="cx"> main frame - didFinishDocumentLoadForFrame
</span><span class="cx"> frame &quot;&lt;!--framePath //&lt;!--frame0--&gt;--&gt;&quot; - didCommitLoadForFrame
</span><del>-CONSOLE MESSAGE: line 1: The page at https://127.0.0.1:8443/security/mixedContent/resources/frame-with-redirect-http-to-https-script.html ran insecure content from http://127.0.0.1:8080/resources/redirect.php?url=https://127.0.0.1:8443/security/mixedContent/resources/script.js.
</del><ins>+CONSOLE MESSAGE: The page at https://127.0.0.1:8443/security/mixedContent/resources/frame-with-redirect-http-to-https-script.html ran insecure content from http://127.0.0.1:8080/resources/redirect.php?url=https://127.0.0.1:8443/security/mixedContent/resources/script.js.
</ins><span class="cx"> 
</span><span class="cx"> didRunInsecureContent
</span><span class="cx"> frame &quot;&lt;!--framePath //&lt;!--frame0--&gt;--&gt;&quot; - didFinishDocumentLoadForFrame
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritynojavascriptrefreshexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/no-javascript-refresh-expected.txt (178647 => 178648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/no-javascript-refresh-expected.txt        2015-01-19 16:32:26 UTC (rev 178647)
+++ trunk/LayoutTests/http/tests/security/no-javascript-refresh-expected.txt        2015-01-19 17:25:23 UTC (rev 178648)
</span><span class="lines">@@ -1,2 +1,2 @@
</span><del>-CONSOLE MESSAGE: line 1: Refused to refresh http://127.0.0.1:8000/security/no-javascript-refresh.php to a javascript: URL
</del><ins>+CONSOLE MESSAGE: Refused to refresh http://127.0.0.1:8000/security/no-javascript-refresh.php to a javascript: URL
</ins><span class="cx"> PASS: This is the content that appears in place of a refresh.
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritynojavascriptrefreshspacesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/no-javascript-refresh-spaces-expected.txt (178647 => 178648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/no-javascript-refresh-spaces-expected.txt        2015-01-19 16:32:26 UTC (rev 178647)
+++ trunk/LayoutTests/http/tests/security/no-javascript-refresh-spaces-expected.txt        2015-01-19 17:25:23 UTC (rev 178648)
</span><span class="lines">@@ -1,2 +1,2 @@
</span><del>-CONSOLE MESSAGE: line 1: Refused to refresh http://127.0.0.1:8000/security/no-javascript-refresh-spaces.php to a javascript: URL
</del><ins>+CONSOLE MESSAGE: Refused to refresh http://127.0.0.1:8000/security/no-javascript-refresh-spaces.php to a javascript: URL
</ins><span class="cx"> PASS: This is the content that appears in place of a refresh.
</span></span></pre></div>
<a id="trunkLayoutTestsplatformeflTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/efl/TestExpectations (178647 => 178648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/efl/TestExpectations        2015-01-19 16:32:26 UTC (rev 178647)
+++ trunk/LayoutTests/platform/efl/TestExpectations        2015-01-19 17:25:23 UTC (rev 178648)
</span><span class="lines">@@ -690,13 +690,6 @@
</span><span class="cx"> 
</span><span class="cx"> webkit.org/b/103383 fast/css/counters/element-removal-crash.xhtml [ Failure Pass ]
</span><span class="cx"> 
</span><del>-# flaky console output problem
-webkit.org/b/105280 http/tests/xmlhttprequest/origin-whitelisting-https.html [ Failure Pass ]
-webkit.org/b/105280 http/tests/xmlhttprequest/access-control-preflight-async-header-denied.html [ Failure Pass ]
-webkit.org/b/105280 http/tests/xmlhttprequest/access-control-preflight-async-method-denied.html [ Failure Pass ]
-webkit.org/b/105280 http/tests/xmlhttprequest/cross-site-denied-response.html [ Failure Pass ]
-webkit.org/b/105280 http/tests/xmlhttprequest/access-control-preflight-async-not-supported.html [ Failure Pass ]
-
</del><span class="cx"> webkit.org/b/105296 webaudio/delaynode-maxdelay.html [ Failure Pass ]
</span><span class="cx"> webkit.org/b/105296 webaudio/delaynode-max-nondefault-delay.html [ Failure Pass ]
</span><span class="cx"> webkit.org/b/105296 webaudio/delaynode-scheduling.html [ Failure Pass ]
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/TestExpectations (178647 => 178648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/TestExpectations        2015-01-19 16:32:26 UTC (rev 178647)
+++ trunk/LayoutTests/platform/gtk/TestExpectations        2015-01-19 17:25:23 UTC (rev 178648)
</span><span class="lines">@@ -761,14 +761,6 @@
</span><span class="cx"> 
</span><span class="cx"> webkit.org/b/105191 media/video-playing-and-pause.html [ Failure Pass ]
</span><span class="cx"> 
</span><del>-webkit.org/b/105280 http/tests/xmlhttprequest/access-control-preflight-async-header-denied.html [ Failure Pass ]
-webkit.org/b/105280 http/tests/xmlhttprequest/access-control-preflight-async-method-denied.html [ Failure Pass ]
-webkit.org/b/105280 http/tests/xmlhttprequest/access-control-preflight-async-not-supported.html [ Failure Pass ]
-webkit.org/b/105280 http/tests/xmlhttprequest/cross-site-denied-response.html [ Failure Pass ]
-webkit.org/b/105280 http/tests/xmlhttprequest/origin-whitelisting-https.html [ Failure Pass ]
-webkit.org/b/105280 http/tests/xmlhttprequest/simple-cross-origin-denied-events.html [ Failure Pass ]
-webkit.org/b/105280 http/tests/xmlhttprequest/simple-cross-origin-denied-events-post.html [ Failure Pass ]
-
</del><span class="cx"> webkit.org/b/118460 media/media-element-play-after-eos.html [ Timeout Pass ]
</span><span class="cx"> webkit.org/b/118460 media/video-duration-known-after-eos.html [ Timeout Pass ]
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (178647 => 178648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-01-19 16:32:26 UTC (rev 178647)
+++ trunk/Source/WebCore/ChangeLog        2015-01-19 17:25:23 UTC (rev 178648)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2015-01-16  Alexey Proskuryakov  &lt;ap@apple.com&gt;
+
+        Console log sometimes prefixed with line number
+        https://bugs.webkit.org/show_bug.cgi?id=105280
+
+        Reviewed by Darin Adler.
+
+        Improve the logic for determining whether a console message should be associated
+        with a source code location.
+
+        * dom/ScriptableDocumentParser.h:
+        * html/parser/HTMLDocumentParser.cpp:
+        (WebCore::HTMLDocumentParser::shouldAssociateConsoleMessagesWithTextPosition):
+        * html/parser/HTMLDocumentParser.h:
+        * page/PageConsoleClient.cpp:
+        (WebCore::getParserLocationForConsoleMessage):
+        (WebCore::PageConsoleClient::addMessage):
+        * xml/parser/XMLDocumentParser.cpp:
+        (WebCore::XMLDocumentParser::pauseParsing):
+        * xml/parser/XMLDocumentParser.h:
+        * xml/parser/XMLDocumentParserLibxml2.cpp:
+        (WebCore::XMLDocumentParser::shouldAssociateConsoleMessagesWithTextPosition):
+
</ins><span class="cx"> 2015-01-19  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [SVG -&gt; OTF Converter] Glyphs get clipped weirdly
</span></span></pre></div>
<a id="trunkSourceWebCoredomScriptableDocumentParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ScriptableDocumentParser.h (178647 => 178648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ScriptableDocumentParser.h        2015-01-19 16:32:26 UTC (rev 178647)
+++ trunk/Source/WebCore/dom/ScriptableDocumentParser.h        2015-01-19 17:25:23 UTC (rev 178648)
</span><span class="lines">@@ -46,6 +46,10 @@
</span><span class="cx"> 
</span><span class="cx">     virtual TextPosition textPosition() const = 0;
</span><span class="cx"> 
</span><ins>+    // Returns true if the parser didn't yield or pause or synchronously execute a script,
+    // so calls to PageConsoleClient should be associated with the parser's text position.
+    virtual bool shouldAssociateConsoleMessagesWithTextPosition() const = 0;
+
</ins><span class="cx">     void setWasCreatedByScript(bool wasCreatedByScript) { m_wasCreatedByScript = wasCreatedByScript; }
</span><span class="cx">     bool wasCreatedByScript() const { return m_wasCreatedByScript; }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlparserHTMLDocumentParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp (178647 => 178648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp        2015-01-19 16:32:26 UTC (rev 178647)
+++ trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp        2015-01-19 17:25:23 UTC (rev 178648)
</span><span class="lines">@@ -462,6 +462,11 @@
</span><span class="cx">     return TextPosition(currentString.currentLine(), currentString.currentColumn());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool HTMLDocumentParser::shouldAssociateConsoleMessagesWithTextPosition() const
+{
+    return inPumpSession() &amp;&amp; !isExecutingScript();
+}
+
</ins><span class="cx"> bool HTMLDocumentParser::isWaitingForScripts() const
</span><span class="cx"> {
</span><span class="cx">     // When the TreeBuilder encounters a &lt;/script&gt; tag, it returns to the HTMLDocumentParser
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlparserHTMLDocumentParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/parser/HTMLDocumentParser.h (178647 => 178648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/parser/HTMLDocumentParser.h        2015-01-19 16:32:26 UTC (rev 178647)
+++ trunk/Source/WebCore/html/parser/HTMLDocumentParser.h        2015-01-19 17:25:23 UTC (rev 178648)
</span><span class="lines">@@ -87,6 +87,8 @@
</span><span class="cx">     virtual void suspendScheduledTasks() override final;
</span><span class="cx">     virtual void resumeScheduledTasks() override final;
</span><span class="cx"> 
</span><ins>+    virtual bool shouldAssociateConsoleMessagesWithTextPosition() const override final;
+
</ins><span class="cx">     // HTMLScriptRunnerHost
</span><span class="cx">     virtual void watchForLoad(CachedResource*) override final;
</span><span class="cx">     virtual void stopWatchingForLoad(CachedResource*) override final;
</span></span></pre></div>
<a id="trunkSourceWebCorepagePageConsoleClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PageConsoleClient.cpp (178647 => 178648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PageConsoleClient.cpp        2015-01-19 16:32:26 UTC (rev 178647)
+++ trunk/Source/WebCore/page/PageConsoleClient.cpp        2015-01-19 17:25:23 UTC (rev 178648)
</span><span class="lines">@@ -83,27 +83,34 @@
</span><span class="cx">     muteCount--;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static void getParserLocationForConsoleMessage(Document* document, String&amp; url, unsigned&amp; line, unsigned&amp; column)
+{
+    if (!document)
+        return;
+
+    // We definitely cannot associate the message with a location being parsed if we are not even parsing.
+    if (!document-&gt;parsing())
+        return;
+
+    ScriptableDocumentParser* parser = document-&gt;scriptableDocumentParser();
+
+    // When the parser waits for scripts, any messages must be coming from some other source, and are not related to the location of the script element that made the parser wait.
+    if (!parser-&gt;shouldAssociateConsoleMessagesWithTextPosition())
+        return;
+
+    url = document-&gt;url().string();
+    TextPosition position = parser-&gt;textPosition();
+    line = position.m_line.oneBasedInt();
+    column = position.m_column.oneBasedInt();
+}
+
</ins><span class="cx"> void PageConsoleClient::addMessage(MessageSource source, MessageLevel level, const String&amp; message, unsigned long requestIdentifier, Document* document)
</span><span class="cx"> {
</span><span class="cx">     String url;
</span><del>-    if (document)
-        url = document-&gt;url().string();
-
-    // FIXME: The below code attempts to determine line numbers for parser generated errors, but this is not the only reason why we can get here.
-    // For example, if we are still parsing and get a WebSocket network error, it will be erroneously attributed to a line where parsing was paused.
-    // Also, we should determine line numbers for script generated messages (e.g. calling getImageData on a canvas).
-    // We probably need to split this function into multiple ones, as appropriate for different call sites. Or maybe decide based on MessageSource.
-    // https://bugs.webkit.org/show_bug.cgi?id=125340
</del><span class="cx">     unsigned line = 0;
</span><span class="cx">     unsigned column = 0;
</span><del>-    if (document &amp;&amp; document-&gt;parsing() &amp;&amp; !document-&gt;isInDocumentWrite() &amp;&amp; document-&gt;scriptableDocumentParser()) {
-        ScriptableDocumentParser* parser = document-&gt;scriptableDocumentParser();
-        if (!parser-&gt;isWaitingForScripts() &amp;&amp; !JSMainThreadExecState::currentState()) {
-            TextPosition position = parser-&gt;textPosition();
-            line = position.m_line.oneBasedInt();
-            column = position.m_column.oneBasedInt();
-        }
-    }
</del><ins>+    getParserLocationForConsoleMessage(document, url, line, column);
+
</ins><span class="cx">     addMessage(source, level, message, url, line, column, 0, JSMainThreadExecState::currentState(), requestIdentifier);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorexmlparserXMLDocumentParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/xml/parser/XMLDocumentParser.cpp (178647 => 178648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/xml/parser/XMLDocumentParser.cpp        2015-01-19 16:32:26 UTC (rev 178647)
+++ trunk/Source/WebCore/xml/parser/XMLDocumentParser.cpp        2015-01-19 17:25:23 UTC (rev 178648)
</span><span class="lines">@@ -261,6 +261,8 @@
</span><span class="cx"> 
</span><span class="cx"> void XMLDocumentParser::pauseParsing()
</span><span class="cx"> {
</span><ins>+    ASSERT(!m_parserPaused);
+
</ins><span class="cx">     if (m_parsingFragment)
</span><span class="cx">         return;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorexmlparserXMLDocumentParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/xml/parser/XMLDocumentParser.h (178647 => 178648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/xml/parser/XMLDocumentParser.h        2015-01-19 16:32:26 UTC (rev 178647)
+++ trunk/Source/WebCore/xml/parser/XMLDocumentParser.h        2015-01-19 17:25:23 UTC (rev 178648)
</span><span class="lines">@@ -65,7 +65,7 @@
</span><span class="cx">         xmlParserCtxtPtr m_context;
</span><span class="cx">     };
</span><span class="cx"> 
</span><del>-    class XMLDocumentParser : public ScriptableDocumentParser, public CachedResourceClient {
</del><ins>+    class XMLDocumentParser final : public ScriptableDocumentParser, public CachedResourceClient {
</ins><span class="cx">         WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx">     public:
</span><span class="cx">         static Ref&lt;XMLDocumentParser&gt; create(Document&amp; document, FrameView* view)
</span><span class="lines">@@ -90,8 +90,6 @@
</span><span class="cx">         // Used by the XMLHttpRequest to check if the responseXML was well formed.
</span><span class="cx">         virtual bool wellFormed() const { return !m_sawError; }
</span><span class="cx"> 
</span><del>-        TextPosition textPosition() const;
-
</del><span class="cx">         static bool supportsXMLVersion(const String&amp;);
</span><span class="cx"> 
</span><span class="cx">     private:
</span><span class="lines">@@ -106,6 +104,9 @@
</span><span class="cx">         virtual void stopParsing() override;
</span><span class="cx">         virtual void detach() override;
</span><span class="cx"> 
</span><ins>+        virtual TextPosition textPosition() const override;
+        virtual bool shouldAssociateConsoleMessagesWithTextPosition() const override;
+
</ins><span class="cx">         // from CachedResourceClient
</span><span class="cx">         virtual void notifyFinished(CachedResource*) override;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorexmlparserXMLDocumentParserLibxml2cpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp (178647 => 178648)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp        2015-01-19 16:32:26 UTC (rev 178647)
+++ trunk/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp        2015-01-19 17:25:23 UTC (rev 178648)
</span><span class="lines">@@ -1434,6 +1434,11 @@
</span><span class="cx">                         OrdinalNumber::fromOneBasedInt(context-&gt;input-&gt;col));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool XMLDocumentParser::shouldAssociateConsoleMessagesWithTextPosition() const
+{
+    return !m_parserPaused &amp;&amp; !m_requestingScript;
+}
+
</ins><span class="cx"> void XMLDocumentParser::stopParsing()
</span><span class="cx"> {
</span><span class="cx">     DocumentParser::stopParsing();
</span></span></pre>
</div>
</div>

</body>
</html>