<!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>[185714] 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/185714">185714</a></dd>
<dt>Author</dt> <dd>achristensen@apple.com</dd>
<dt>Date</dt> <dd>2015-06-18 11:38:13 -0700 (Thu, 18 Jun 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>[Content Extensions] Log blocked loads to the WebInspector console
https://bugs.webkit.org/show_bug.cgi?id=146089
Reviewed by Joseph Pecoraro.
Source/JavaScriptCore:
* inspector/ConsoleMessage.cpp:
(Inspector::messageSourceValue):
* inspector/protocol/Console.json:
* runtime/ConsoleTypes.h:
Add content blocker message source.
Source/WebCore:
* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
(WebCore::ContentExtensions::ContentExtensionsBackend::displayNoneCSSRule):
Log which URLs are blocked and the URL of the page they are blocked from.
Source/WebKit/mac:
* WebCoreSupport/WebChromeClient.mm:
(stringForMessageSource):
Added content blocker message source.
LayoutTests:
* http/tests/contentextensions/basic-filter-expected.txt:
* http/tests/contentextensions/character-set-basic-support-expected.txt:
* http/tests/contentextensions/domain-rules-expected.txt:
* http/tests/contentextensions/filters-with-quantifiers-combined-expected.txt:
* http/tests/contentextensions/main-resource-redirect-blocked-expected.txt:
* http/tests/contentextensions/media-filtered-expected.txt:
* http/tests/contentextensions/subresource-redirect-blocked-expected.txt:
* http/tests/contentextensions/text-track-blocked-expected.txt:
Add new logs.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestshttptestscontentextensionsbasicfilterexpectedtxt">trunk/LayoutTests/http/tests/contentextensions/basic-filter-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestscontentextensionscharactersetbasicsupportexpectedtxt">trunk/LayoutTests/http/tests/contentextensions/character-set-basic-support-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestscontentextensionsdomainrulesexpectedtxt">trunk/LayoutTests/http/tests/contentextensions/domain-rules-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestscontentextensionsfilterswithquantifierscombinedexpectedtxt">trunk/LayoutTests/http/tests/contentextensions/filters-with-quantifiers-combined-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestscontentextensionsmainresourceredirectblockedexpectedtxt">trunk/LayoutTests/http/tests/contentextensions/main-resource-redirect-blocked-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestscontentextensionsmediafilteredexpectedtxt">trunk/LayoutTests/http/tests/contentextensions/media-filtered-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestscontentextensionssubresourceredirectblockedexpectedtxt">trunk/LayoutTests/http/tests/contentextensions/subresource-redirect-blocked-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestscontentextensionstexttrackblockedexpectedtxt">trunk/LayoutTests/http/tests/contentextensions/text-track-blocked-expected.txt</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorConsoleMessagecpp">trunk/Source/JavaScriptCore/inspector/ConsoleMessage.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorprotocolConsolejson">trunk/Source/JavaScriptCore/inspector/protocol/Console.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeConsoleTypesh">trunk/Source/JavaScriptCore/runtime/ConsoleTypes.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecontentextensionsContentExtensionsBackendcpp">trunk/Source/WebCore/contentextensions/ContentExtensionsBackend.cpp</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebChromeClientmm">trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (185713 => 185714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-06-18 18:34:28 UTC (rev 185713)
+++ trunk/LayoutTests/ChangeLog        2015-06-18 18:38:13 UTC (rev 185714)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2015-06-17 Alex Christensen <achristensen@webkit.org>
+
+ [Content Extensions] Log blocked loads to the WebInspector console
+ https://bugs.webkit.org/show_bug.cgi?id=146089
+
+ Reviewed by Joseph Pecoraro.
+
+ * http/tests/contentextensions/basic-filter-expected.txt:
+ * http/tests/contentextensions/character-set-basic-support-expected.txt:
+ * http/tests/contentextensions/domain-rules-expected.txt:
+ * http/tests/contentextensions/filters-with-quantifiers-combined-expected.txt:
+ * http/tests/contentextensions/main-resource-redirect-blocked-expected.txt:
+ * http/tests/contentextensions/media-filtered-expected.txt:
+ * http/tests/contentextensions/subresource-redirect-blocked-expected.txt:
+ * http/tests/contentextensions/text-track-blocked-expected.txt:
+ Add new logs.
+
</ins><span class="cx"> 2015-06-18 Alexey Proskuryakov <ap@apple.com>
</span><span class="cx">
</span><span class="cx"> Mark mathml/very-large-stretchy-operators.html as Slow on newer OS X versions.
</span></span></pre></div>
<a id="trunkLayoutTestshttptestscontentextensionsbasicfilterexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/contentextensions/basic-filter-expected.txt (185713 => 185714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/contentextensions/basic-filter-expected.txt        2015-06-18 18:34:28 UTC (rev 185713)
+++ trunk/LayoutTests/http/tests/contentextensions/basic-filter-expected.txt        2015-06-18 18:38:13 UTC (rev 185714)
</span><span class="lines">@@ -1,3 +1,6 @@
</span><ins>+CONSOLE MESSAGE: line 7: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/basic-filter.html from loading a resource from http://localhost:8000/resources/square100.png
+CONSOLE MESSAGE: line 8: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/basic-filter.html from loading a resource from http://127.0.0.1:8000/resources/square100.png?localhost_not_at_end
+CONSOLE MESSAGE: line 9: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/basic-filter.html from loading a resource from http://127.0.0.1:8000/resources/square100.png?ends_with_localhost
</ins><span class="cx"> layer at (0,0) size 800x600
</span><span class="cx"> RenderView at (0,0) size 800x600
</span><span class="cx"> layer at (0,0) size 800x600
</span></span></pre></div>
<a id="trunkLayoutTestshttptestscontentextensionscharactersetbasicsupportexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/contentextensions/character-set-basic-support-expected.txt (185713 => 185714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/contentextensions/character-set-basic-support-expected.txt        2015-06-18 18:34:28 UTC (rev 185713)
+++ trunk/LayoutTests/http/tests/contentextensions/character-set-basic-support-expected.txt        2015-06-18 18:38:13 UTC (rev 185714)
</span><span class="lines">@@ -1,3 +1,7 @@
</span><ins>+CONSOLE MESSAGE: line 25: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/character-set-basic-support.html from loading a resource from http://127.0.0.1:8000/resources/square100.png?BaSiC-TeSt-cAsE
+CONSOLE MESSAGE: line 25: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/character-set-basic-support.html from loading a resource from http://127.0.0.1:8000/resources/square100.png?any-scheme-matcher
+CONSOLE MESSAGE: line 25: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/character-set-basic-support.html from loading a resource from http://127.0.0.1:8000/resources/square100.png?casesensitive
+CONSOLE MESSAGE: line 25: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/character-set-basic-support.html from loading a resource from http://127.0.0.1:8000/resources/square100.png?caseSeNsitive
</ins><span class="cx"> Test basic cases of filter using a character set (e.g. [a-z]).
</span><span class="cx">
</span><span class="cx"> On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
</span></span></pre></div>
<a id="trunkLayoutTestshttptestscontentextensionsdomainrulesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/contentextensions/domain-rules-expected.txt (185713 => 185714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/contentextensions/domain-rules-expected.txt        2015-06-18 18:34:28 UTC (rev 185713)
+++ trunk/LayoutTests/http/tests/contentextensions/domain-rules-expected.txt        2015-06-18 18:38:13 UTC (rev 185714)
</span><span class="lines">@@ -1,3 +1,6 @@
</span><ins>+CONSOLE MESSAGE: line 6: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/domain-rules.html from loading a resource from http://127.0.0.1:8000/resources/square100.png?should_be_blocked_1
+CONSOLE MESSAGE: line 7: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/domain-rules.html from loading a resource from http://127.0.0.1:8000/resources/square100.png?should_be_blocked_2
+CONSOLE MESSAGE: line 8: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/domain-rules.html from loading a resource from http://127.0.0.1:8000/resources/square100.png?should_be_blocked_3
</ins><span class="cx"> layer at (0,0) size 800x600
</span><span class="cx"> RenderView at (0,0) size 800x600
</span><span class="cx"> layer at (0,0) size 800x600
</span></span></pre></div>
<a id="trunkLayoutTestshttptestscontentextensionsfilterswithquantifierscombinedexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/contentextensions/filters-with-quantifiers-combined-expected.txt (185713 => 185714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/contentextensions/filters-with-quantifiers-combined-expected.txt        2015-06-18 18:34:28 UTC (rev 185713)
+++ trunk/LayoutTests/http/tests/contentextensions/filters-with-quantifiers-combined-expected.txt        2015-06-18 18:38:13 UTC (rev 185714)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+CONSOLE MESSAGE: line 14: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/filters-with-quantifiers-combined.html from loading a resource from http://localhost:8000/resources/square100.png?abcabc
+CONSOLE MESSAGE: line 15: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/filters-with-quantifiers-combined.html from loading a resource from http://localhost:8000/resources/square100.png?abccabc
+CONSOLE MESSAGE: line 16: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/filters-with-quantifiers-combined.html from loading a resource from http://localhost:8000/resources/square100.png?defghi
+CONSOLE MESSAGE: line 17: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/filters-with-quantifiers-combined.html from loading a resource from http://localhost:8000/resources/square100.png?defgghi
+CONSOLE MESSAGE: line 18: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/filters-with-quantifiers-combined.html from loading a resource from http://localhost:8000/resources/square100.png?jklmno
+CONSOLE MESSAGE: line 19: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/filters-with-quantifiers-combined.html from loading a resource from http://localhost:8000/resources/square100.png?jkljklmno
+CONSOLE MESSAGE: line 20: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/filters-with-quantifiers-combined.html from loading a resource from http://localhost:8000/resources/square100.png?pqrstv
+CONSOLE MESSAGE: line 21: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/filters-with-quantifiers-combined.html from loading a resource from http://localhost:8000/resources/square100.png?pqrabcstv
+CONSOLE MESSAGE: line 22: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/filters-with-quantifiers-combined.html from loading a resource from http://localhost:8000/resources/square100.png?wxyabc
+CONSOLE MESSAGE: line 23: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/filters-with-quantifiers-combined.html from loading a resource from http://localhost:8000/resources/square100.png?wxydefabc
+CONSOLE MESSAGE: line 24: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/filters-with-quantifiers-combined.html from loading a resource from http://localhost:8000/resources/square100.png?acbwxy
+CONSOLE MESSAGE: line 25: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/filters-with-quantifiers-combined.html from loading a resource from http://localhost:8000/resources/square100.png?abcacbdefabcdjklwhitelistwxy
</ins><span class="cx"> layer at (0,0) size 785x952
</span><span class="cx"> RenderView at (0,0) size 785x600
</span><span class="cx"> layer at (0,0) size 785x952
</span></span></pre></div>
<a id="trunkLayoutTestshttptestscontentextensionsmainresourceredirectblockedexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/contentextensions/main-resource-redirect-blocked-expected.txt (185713 => 185714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/contentextensions/main-resource-redirect-blocked-expected.txt        2015-06-18 18:34:28 UTC (rev 185713)
+++ trunk/LayoutTests/http/tests/contentextensions/main-resource-redirect-blocked-expected.txt        2015-06-18 18:38:13 UTC (rev 185714)
</span><span class="lines">@@ -1,3 +1 @@
</span><del>-main frame - didStartProvisionalLoadForFrame
-main frame - didFailProvisionalLoadWithError
-main frame - (kWKErrorCodeCannotShowURL)
</del><ins>+CONSOLE MESSAGE: Content blocker prevented frame displaying about:blank from loading a resource from http://127.0.0.1:8000/contentextensions/resources/main-resource-redirect-blocked-target.html
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestscontentextensionsmediafilteredexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/contentextensions/media-filtered-expected.txt (185713 => 185714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/contentextensions/media-filtered-expected.txt        2015-06-18 18:34:28 UTC (rev 185713)
+++ trunk/LayoutTests/http/tests/contentextensions/media-filtered-expected.txt        2015-06-18 18:38:13 UTC (rev 185714)
</span><span class="lines">@@ -1,3 +1,4 @@
</span><ins>+CONSOLE MESSAGE: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/media-filtered.html from loading a resource from http://localhost:8000/media/resources/test.mp4
</ins><span class="cx"> CONSOLE MESSAGE: line 14: Video error
</span><span class="cx"> layer at (0,0) size 800x600
</span><span class="cx"> RenderView at (0,0) size 800x600
</span></span></pre></div>
<a id="trunkLayoutTestshttptestscontentextensionssubresourceredirectblockedexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/contentextensions/subresource-redirect-blocked-expected.txt (185713 => 185714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/contentextensions/subresource-redirect-blocked-expected.txt        2015-06-18 18:34:28 UTC (rev 185713)
+++ trunk/LayoutTests/http/tests/contentextensions/subresource-redirect-blocked-expected.txt        2015-06-18 18:38:13 UTC (rev 185714)
</span><span class="lines">@@ -1,3 +1,4 @@
</span><ins>+CONSOLE MESSAGE: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/subresource-redirect-blocked.html from loading a resource from http://127.0.0.1:8000/resources/square128.png
</ins><span class="cx"> layer at (0,0) size 800x600
</span><span class="cx"> RenderView at (0,0) size 800x600
</span><span class="cx"> layer at (0,0) size 800x600
</span></span></pre></div>
<a id="trunkLayoutTestshttptestscontentextensionstexttrackblockedexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/contentextensions/text-track-blocked-expected.txt (185713 => 185714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/contentextensions/text-track-blocked-expected.txt        2015-06-18 18:34:28 UTC (rev 185713)
+++ trunk/LayoutTests/http/tests/contentextensions/text-track-blocked-expected.txt        2015-06-18 18:38:13 UTC (rev 185714)
</span><span class="lines">@@ -1,4 +1,5 @@
</span><span class="cx"> CONSOLE MESSAGE: line 21: video loaded
</span><ins>+CONSOLE MESSAGE: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/text-track-blocked.html from loading a resource from http://127.0.0.1:8000/media-resources/track/captions-webvtt/captions-fast.vtt
</ins><span class="cx"> CONSOLE MESSAGE: line 14: vttError
</span><span class="cx"> layer at (0,0) size 800x600
</span><span class="cx"> RenderView at (0,0) size 800x600
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (185713 => 185714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2015-06-18 18:34:28 UTC (rev 185713)
+++ trunk/Source/JavaScriptCore/ChangeLog        2015-06-18 18:38:13 UTC (rev 185714)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2015-06-17 Alex Christensen <achristensen@webkit.org>
+
+ [Content Extensions] Log blocked loads to the WebInspector console
+ https://bugs.webkit.org/show_bug.cgi?id=146089
+
+ Reviewed by Joseph Pecoraro.
+
+ * inspector/ConsoleMessage.cpp:
+ (Inspector::messageSourceValue):
+ * inspector/protocol/Console.json:
+ * runtime/ConsoleTypes.h:
+ Add content blocker message source.
+
</ins><span class="cx"> 2015-06-18 Saam Barati <saambarati1@gmail.com>
</span><span class="cx">
</span><span class="cx"> [ES6] support default values in deconstruction parameter nodes
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorConsoleMessagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/ConsoleMessage.cpp (185713 => 185714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/ConsoleMessage.cpp        2015-06-18 18:34:28 UTC (rev 185713)
+++ trunk/Source/JavaScriptCore/inspector/ConsoleMessage.cpp        2015-06-18 18:38:13 UTC (rev 185714)
</span><span class="lines">@@ -141,6 +141,7 @@
</span><span class="cx"> case MessageSource::Rendering: return Inspector::Protocol::Console::ConsoleMessage::Source::Rendering;
</span><span class="cx"> case MessageSource::CSS: return Inspector::Protocol::Console::ConsoleMessage::Source::CSS;
</span><span class="cx"> case MessageSource::Security: return Inspector::Protocol::Console::ConsoleMessage::Source::Security;
</span><ins>+ case MessageSource::ContentBlocker: return Inspector::Protocol::Console::ConsoleMessage::Source::ContentBlocker;
</ins><span class="cx"> case MessageSource::Other: return Inspector::Protocol::Console::ConsoleMessage::Source::Other;
</span><span class="cx"> }
</span><span class="cx"> return Inspector::Protocol::Console::ConsoleMessage::Source::Other;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorprotocolConsolejson"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/protocol/Console.json (185713 => 185714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/protocol/Console.json        2015-06-18 18:34:28 UTC (rev 185713)
+++ trunk/Source/JavaScriptCore/inspector/protocol/Console.json        2015-06-18 18:38:13 UTC (rev 185714)
</span><span class="lines">@@ -7,7 +7,7 @@
</span><span class="cx"> "type": "object",
</span><span class="cx"> "description": "Console message.",
</span><span class="cx"> "properties": [
</span><del>- { "name": "source", "type": "string", "enum": ["xml", "javascript", "network", "console-api", "storage", "appcache", "rendering", "css", "security", "other"], "description": "Message source." },
</del><ins>+ { "name": "source", "type": "string", "enum": ["xml", "javascript", "network", "console-api", "storage", "appcache", "rendering", "css", "security", "content-blocker", "other"], "description": "Message source." },
</ins><span class="cx"> { "name": "level", "type": "string", "enum": ["log", "info", "warning", "error", "debug"], "description": "Message severity." },
</span><span class="cx"> { "name": "text", "type": "string", "description": "Message text." },
</span><span class="cx"> { "name": "type", "type": "string", "optional": true, "enum": ["log", "dir", "dirxml", "table", "trace", "clear", "startGroup", "startGroupCollapsed", "endGroup", "assert", "timing", "profile", "profileEnd"], "description": "Console message type." },
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeConsoleTypesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/ConsoleTypes.h (185713 => 185714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/ConsoleTypes.h        2015-06-18 18:34:28 UTC (rev 185713)
+++ trunk/Source/JavaScriptCore/runtime/ConsoleTypes.h        2015-06-18 18:38:13 UTC (rev 185714)
</span><span class="lines">@@ -38,6 +38,7 @@
</span><span class="cx"> Rendering,
</span><span class="cx"> CSS,
</span><span class="cx"> Security,
</span><ins>+ ContentBlocker,
</ins><span class="cx"> Other,
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (185713 => 185714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-06-18 18:34:28 UTC (rev 185713)
+++ trunk/Source/WebCore/ChangeLog        2015-06-18 18:38:13 UTC (rev 185714)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2015-06-17 Alex Christensen <achristensen@webkit.org>
+
+ [Content Extensions] Log blocked loads to the WebInspector console
+ https://bugs.webkit.org/show_bug.cgi?id=146089
+
+ Reviewed by Joseph Pecoraro.
+
+ * contentextensions/ContentExtensionsBackend.cpp:
+ (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
+ (WebCore::ContentExtensions::ContentExtensionsBackend::displayNoneCSSRule):
+ Log which URLs are blocked and the URL of the page they are blocked from.
+
</ins><span class="cx"> 2015-06-18 Joseph Pecoraro <pecoraro@apple.com>
</span><span class="cx">
</span><span class="cx"> Crash under WebCore::DOMWindow::dispatchMessageEventWithOriginCheck attempting to log console message
</span></span></pre></div>
<a id="trunkSourceWebCorecontentextensionsContentExtensionsBackendcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/contentextensions/ContentExtensionsBackend.cpp (185713 => 185714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/contentextensions/ContentExtensionsBackend.cpp        2015-06-18 18:34:28 UTC (rev 185713)
+++ trunk/Source/WebCore/contentextensions/ContentExtensionsBackend.cpp        2015-06-18 18:38:13 UTC (rev 185714)
</span><span class="lines">@@ -210,8 +210,11 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (willBlockLoad)
</del><ins>+ if (willBlockLoad) {
+ if (currentDocument)
+ currentDocument->addConsoleMessage(MessageSource::ContentBlocker, MessageLevel::Info, makeString("Content blocker prevented frame displaying ", mainDocumentURL.string(), " from loading a resource from ", request.url().string()));
</ins><span class="cx"> request = ResourceRequest();
</span><ins>+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> const String& ContentExtensionsBackend::displayNoneCSSRule()
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (185713 => 185714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2015-06-18 18:34:28 UTC (rev 185713)
+++ trunk/Source/WebKit/mac/ChangeLog        2015-06-18 18:38:13 UTC (rev 185714)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2015-06-17 Alex Christensen <achristensen@webkit.org>
+
+ [Content Extensions] Log blocked loads to the WebInspector console
+ https://bugs.webkit.org/show_bug.cgi?id=146089
+
+ Reviewed by Joseph Pecoraro.
+
+ * WebCoreSupport/WebChromeClient.mm:
+ (stringForMessageSource):
+ Added content blocker message source.
+
</ins><span class="cx"> 2015-06-17 Dan Bernstein <mitz@apple.com>
</span><span class="cx">
</span><span class="cx"> <rdar://problem/19034131> Cleaned up the WebDownload.h framework header.
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebChromeClientmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm (185713 => 185714)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm        2015-06-18 18:34:28 UTC (rev 185713)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm        2015-06-18 18:38:13 UTC (rev 185714)
</span><span class="lines">@@ -109,6 +109,7 @@
</span><span class="cx"> NSString *WebConsoleMessageRenderingMessageSource = @"RenderingMessageSource";
</span><span class="cx"> NSString *WebConsoleMessageCSSMessageSource = @"CSSMessageSource";
</span><span class="cx"> NSString *WebConsoleMessageSecurityMessageSource = @"SecurityMessageSource";
</span><ins>+NSString *WebConsoleMessageContentBlockerMessageSource = @"ContentBlockerMessageSource";
</ins><span class="cx"> NSString *WebConsoleMessageOtherMessageSource = @"OtherMessageSource";
</span><span class="cx">
</span><span class="cx"> NSString *WebConsoleMessageDebugMessageLevel = @"DebugMessageLevel";
</span><span class="lines">@@ -387,6 +388,8 @@
</span><span class="cx"> return WebConsoleMessageCSSMessageSource;
</span><span class="cx"> case MessageSource::Security:
</span><span class="cx"> return WebConsoleMessageSecurityMessageSource;
</span><ins>+ case MessageSource::ContentBlocker:
+ return WebConsoleMessageContentBlockerMessageSource;
</ins><span class="cx"> case MessageSource::Other:
</span><span class="cx"> return WebConsoleMessageOtherMessageSource;
</span><span class="cx"> }
</span></span></pre>
</div>
</div>
</body>
</html>