<!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>[182922] 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/182922">182922</a></dd>
<dt>Author</dt> <dd>achristensen@apple.com</dd>
<dt>Date</dt> <dd>2015-04-16 16:41:22 -0700 (Thu, 16 Apr 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Removed unused WKUserContentFilterRef.
https://bugs.webkit.org/show_bug.cgi?id=143852

Reviewed by Sam Weinig.

Source/WebKit2:

* Shared/WebCompiledContentExtension.cpp:
(WebKit::LegacyContentExtensionCompilationClient::LegacyContentExtensionCompilationClient): Deleted.
(WebKit::LegacyContentExtensionCompilationClient::writeBytecode): Deleted.
(WebKit::LegacyContentExtensionCompilationClient::writeActions): Deleted.
(WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData): Deleted.
* Shared/WebCompiledContentExtension.h:
* UIProcess/API/C/WKUserContentFilterRef.cpp: Removed.
* UIProcess/API/C/WKUserContentFilterRef.h: Removed.
* UIProcess/API/C/WebKit2_C.h:
* UIProcess/API/Cocoa/_WKUserContentFilter.h:
* UIProcess/API/Cocoa/_WKUserContentFilter.mm:
(-[_WKUserContentFilter initWithName:serializedRules:]): Deleted.
* WebKit2.xcodeproj/project.pbxproj:

Tools:

* TestWebKitAPI/Tests/WebKit2Cocoa/_WKUserContentExtensionStore.mm:
* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::TestController::platformResetPreferencesToConsistentValues):
(WTR::TestController::platformConfigureViewForTest):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedWebCompiledContentExtensioncpp">trunk/Source/WebKit2/Shared/WebCompiledContentExtension.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedWebCompiledContentExtensionh">trunk/Source/WebKit2/Shared/WebCompiledContentExtension.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWebKit2_Ch">trunk/Source/WebKit2/UIProcess/API/C/WebKit2_C.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoa_WKUserContentFilterh">trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKUserContentFilter.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoa_WKUserContentFiltermm">trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKUserContentFilter.mm</a></li>
<li><a href="#trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj">trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2Cocoa_WKUserContentExtensionStoremm">trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/_WKUserContentExtensionStore.mm</a></li>
<li><a href="#trunkToolsWebKitTestRunnermacTestControllerMacmm">trunk/Tools/WebKitTestRunner/mac/TestControllerMac.mm</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKUserContentFilterRefcpp">trunk/Source/WebKit2/UIProcess/API/C/WKUserContentFilterRef.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKUserContentFilterRefh">trunk/Source/WebKit2/UIProcess/API/C/WKUserContentFilterRef.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (182921 => 182922)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-04-16 23:28:21 UTC (rev 182921)
+++ trunk/Source/WebKit2/ChangeLog        2015-04-16 23:41:22 UTC (rev 182922)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2015-04-16  Alex Christensen  &lt;achristensen@webkit.org&gt;
+
+        Removed unused WKUserContentFilterRef.
+        https://bugs.webkit.org/show_bug.cgi?id=143852
+
+        Reviewed by Sam Weinig.
+
+        * Shared/WebCompiledContentExtension.cpp:
+        (WebKit::LegacyContentExtensionCompilationClient::LegacyContentExtensionCompilationClient): Deleted.
+        (WebKit::LegacyContentExtensionCompilationClient::writeBytecode): Deleted.
+        (WebKit::LegacyContentExtensionCompilationClient::writeActions): Deleted.
+        (WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData): Deleted.
+        * Shared/WebCompiledContentExtension.h:
+        * UIProcess/API/C/WKUserContentFilterRef.cpp: Removed.
+        * UIProcess/API/C/WKUserContentFilterRef.h: Removed.
+        * UIProcess/API/C/WebKit2_C.h:
+        * UIProcess/API/Cocoa/_WKUserContentFilter.h:
+        * UIProcess/API/Cocoa/_WKUserContentFilter.mm:
+        (-[_WKUserContentFilter initWithName:serializedRules:]): Deleted.
+        * WebKit2.xcodeproj/project.pbxproj:
+
</ins><span class="cx"> 2015-04-16  Beth Dakin  &lt;bdakin@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Rubber-stamped by Tim Horton.
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebCompiledContentExtensioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebCompiledContentExtension.cpp (182921 => 182922)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebCompiledContentExtension.cpp        2015-04-16 23:28:21 UTC (rev 182921)
+++ trunk/Source/WebKit2/Shared/WebCompiledContentExtension.cpp        2015-04-16 23:41:22 UTC (rev 182922)
</span><span class="lines">@@ -30,34 +30,6 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><del>-LegacyContentExtensionCompilationClient::LegacyContentExtensionCompilationClient(WebCore::ContentExtensions::CompiledContentExtensionData&amp; data)
-    : m_data(data)
-{
-}
-
-void LegacyContentExtensionCompilationClient::writeBytecode(Vector&lt;WebCore::ContentExtensions::DFABytecode&gt;&amp;&amp; bytecode)
-{
-    m_data.bytecode = WTF::move(bytecode);
-}
-
-void LegacyContentExtensionCompilationClient::writeActions(Vector&lt;WebCore::ContentExtensions::SerializedActionByte&gt;&amp;&amp; actions)
-{
-    m_data.actions = WTF::move(actions);
-}
-
-
-Ref&lt;WebCompiledContentExtension&gt; WebCompiledContentExtension::createFromCompiledContentExtensionData(const WebCore::ContentExtensions::CompiledContentExtensionData&amp; compilerData)
-{
-    RefPtr&lt;SharedMemory&gt; sharedMemory = SharedMemory::allocate(compilerData.bytecode.size() + compilerData.actions.size());
-    memcpy(static_cast&lt;char*&gt;(sharedMemory-&gt;data()), compilerData.actions.data(), compilerData.actions.size());
-    memcpy(static_cast&lt;char*&gt;(sharedMemory-&gt;data()) + compilerData.actions.size(), compilerData.bytecode.data(), compilerData.bytecode.size());
-
-    NetworkCache::Data fileData; // We don't have an mmap'd file to keep alive here, so just use an empty Data object.
-    WebCompiledContentExtensionData data(WTF::move(sharedMemory), fileData, 0, compilerData.actions.size(), compilerData.actions.size(), compilerData.bytecode.size());
-
-    return create(WTF::move(data));
-}
-
</del><span class="cx"> Ref&lt;WebCompiledContentExtension&gt; WebCompiledContentExtension::create(WebCompiledContentExtensionData&amp;&amp; data)
</span><span class="cx"> {
</span><span class="cx">     return adoptRef(*new WebCompiledContentExtension(WTF::move(data)));
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebCompiledContentExtensionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebCompiledContentExtension.h (182921 => 182922)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebCompiledContentExtension.h        2015-04-16 23:28:21 UTC (rev 182921)
+++ trunk/Source/WebKit2/Shared/WebCompiledContentExtension.h        2015-04-16 23:41:22 UTC (rev 182922)
</span><span class="lines">@@ -34,24 +34,8 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><del>-// FIXME: Remove this once everyone is converted to using the UserContentExtensionStore.
-class LegacyContentExtensionCompilationClient final : public WebCore::ContentExtensions::ContentExtensionCompilationClient {
-public:
-    LegacyContentExtensionCompilationClient(WebCore::ContentExtensions::CompiledContentExtensionData&amp;);
-
-    virtual void writeBytecode(Vector&lt;WebCore::ContentExtensions::DFABytecode&gt;&amp;&amp;) override;
-    virtual void writeActions(Vector&lt;WebCore::ContentExtensions::SerializedActionByte&gt;&amp;&amp;) override;
-
-private:
-    WebCore::ContentExtensions::CompiledContentExtensionData&amp; m_data;
-};
-
-
</del><span class="cx"> class WebCompiledContentExtension final : public WebCore::ContentExtensions::CompiledContentExtension {
</span><span class="cx"> public:
</span><del>-    // FIXME: Remove this once everyone is converted to using the UserContentExtensionStore.
-    static Ref&lt;WebCompiledContentExtension&gt; createFromCompiledContentExtensionData(const WebCore::ContentExtensions::CompiledContentExtensionData&amp;);
-
</del><span class="cx">     static Ref&lt;WebCompiledContentExtension&gt; create(WebCompiledContentExtensionData&amp;&amp;);
</span><span class="cx">     virtual ~WebCompiledContentExtension();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKUserContentFilterRefcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/API/C/WKUserContentFilterRef.cpp (182921 => 182922)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKUserContentFilterRef.cpp        2015-04-16 23:28:21 UTC (rev 182921)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKUserContentFilterRef.cpp        2015-04-16 23:41:22 UTC (rev 182922)
</span><span class="lines">@@ -1,60 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include &quot;config.h&quot;
-#include &quot;WKUserContentFilterRef.h&quot;
-
-#include &quot;APIUserContentExtension.h&quot;
-#include &quot;WKAPICast.h&quot;
-#include &quot;WebCompiledContentExtension.h&quot;
-#include &lt;WebCore/ContentExtensionCompiler.h&gt;
-#include &lt;WebCore/ContentExtensionError.h&gt;
-
-using namespace WebKit;
-
-WKTypeID WKUserContentFilterGetTypeID()
-{
-    return toAPI(API::UserContentExtension::APIType);
-}
-
-WKUserContentFilterRef WKUserContentFilterCreate(WKStringRef nameRef, WKStringRef serializedRulesRef)
-{
-#if ENABLE(CONTENT_EXTENSIONS)
-    WebCore::ContentExtensions::CompiledContentExtensionData data;
-    LegacyContentExtensionCompilationClient client(data);
-
-    auto compilerError = WebCore::ContentExtensions::compileRuleList(client, toWTFString(serializedRulesRef));
-    if (compilerError)
-        return nullptr;
-
-    auto compiledContentExtension = WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData(data);
-
-    return toAPI(&amp;API::UserContentExtension::create(toWTFString(nameRef), WTF::move(compiledContentExtension)).leakRef());
-#else
-    UNUSED_PARAM(nameRef);
-    UNUSED_PARAM(serializedRulesRef);
-    return nullptr;
-#endif
-}
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKUserContentFilterRefh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/API/C/WKUserContentFilterRef.h (182921 => 182922)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKUserContentFilterRef.h        2015-04-16 23:28:21 UTC (rev 182921)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKUserContentFilterRef.h        2015-04-16 23:41:22 UTC (rev 182922)
</span><span class="lines">@@ -1,43 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WKUserContentFilterRef_h
-#define WKUserContentFilterRef_h
-
-#include &lt;WebKit/WKBase.h&gt;
-
-#ifdef __cplusplus
-extern &quot;C&quot; {
-#endif
-
-WK_EXPORT WKTypeID WKUserContentFilterGetTypeID();
-
-WK_EXPORT WKUserContentFilterRef WKUserContentFilterCreate(WKStringRef name, WKStringRef serializedRules);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* WKUserContentFilterRef_h */
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWebKit2_Ch"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WebKit2_C.h (182921 => 182922)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WebKit2_C.h        2015-04-16 23:28:21 UTC (rev 182921)
+++ trunk/Source/WebKit2/UIProcess/API/C/WebKit2_C.h        2015-04-16 23:41:22 UTC (rev 182922)
</span><span class="lines">@@ -59,7 +59,6 @@
</span><span class="cx"> #include &lt;WebKit/WKURLRequest.h&gt;
</span><span class="cx"> #include &lt;WebKit/WKURLResponse.h&gt;
</span><span class="cx"> #include &lt;WebKit/WKUserContentControllerRef.h&gt;
</span><del>-#include &lt;WebKit/WKUserContentFilterRef.h&gt;
</del><span class="cx"> #include &lt;WebKit/WKUserMediaPermissionRequest.h&gt;
</span><span class="cx"> #include &lt;WebKit/WKUserScriptRef.h&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoa_WKUserContentFilterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKUserContentFilter.h (182921 => 182922)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKUserContentFilter.h        2015-04-16 23:28:21 UTC (rev 182921)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKUserContentFilter.h        2015-04-16 23:41:22 UTC (rev 182922)
</span><span class="lines">@@ -30,8 +30,6 @@
</span><span class="cx"> WK_CLASS_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA)
</span><span class="cx"> @interface _WKUserContentFilter : NSObject
</span><span class="cx"> 
</span><del>-- (instancetype)initWithName:(NSString *)name serializedRules:(NSString *)serializedRules;
-
</del><span class="cx"> @end
</span><span class="cx"> 
</span><span class="cx"> #endif // WK_API_ENABLED
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoa_WKUserContentFiltermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKUserContentFilter.mm (182921 => 182922)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKUserContentFilter.mm        2015-04-16 23:28:21 UTC (rev 182921)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKUserContentFilter.mm        2015-04-16 23:41:22 UTC (rev 182922)
</span><span class="lines">@@ -35,23 +35,6 @@
</span><span class="cx"> 
</span><span class="cx"> @implementation _WKUserContentFilter
</span><span class="cx"> 
</span><del>-- (instancetype)initWithName:(NSString *)name serializedRules:(NSString *)serializedRules
-{
-    if (!(self = [super init]))
-        return nil;
-
-    WebCore::ContentExtensions::CompiledContentExtensionData data;
-    WebKit::LegacyContentExtensionCompilationClient client(data);
-
-    if (auto compilerError = WebCore::ContentExtensions::compileRuleList(client, String(serializedRules)))
-        [NSException raise:NSGenericException format:@&quot;Failed to compile rules with error: %s&quot;, compilerError.message().c_str()];
-
-    auto compiledContentExtension = WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData(data);
-    API::Object::constructInWrapper&lt;API::UserContentExtension&gt;(self, String(name), WTF::move(compiledContentExtension));
-
-    return self;
-}
-
</del><span class="cx"> - (void)dealloc
</span><span class="cx"> {
</span><span class="cx">     _userContentExtension-&gt;~UserContentExtension();
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (182921 => 182922)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2015-04-16 23:28:21 UTC (rev 182921)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2015-04-16 23:41:22 UTC (rev 182922)
</span><span class="lines">@@ -1143,8 +1143,6 @@
</span><span class="cx">                 7C89D2B91A6B0F2C003A5FDE /* _WKUserContentFilter.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7C89D2B71A6B0F2C003A5FDE /* _WKUserContentFilter.mm */; };
</span><span class="cx">                 7C89D2BA1A6B0F2C003A5FDE /* _WKUserContentFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C89D2B81A6B0F2C003A5FDE /* _WKUserContentFilter.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 7C89D2BC1A6B0F5B003A5FDE /* _WKUserContentFilterInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C89D2BB1A6B0F5B003A5FDE /* _WKUserContentFilterInternal.h */; };
</span><del>-                7C89D2BF1A6B11EF003A5FDE /* WKUserContentFilterRef.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C89D2BD1A6B11EF003A5FDE /* WKUserContentFilterRef.cpp */; };
-                7C89D2C01A6B11EF003A5FDE /* WKUserContentFilterRef.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C89D2BE1A6B11EF003A5FDE /* WKUserContentFilterRef.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><span class="cx">                 7C89D2D71A6C6BE6003A5FDE /* _WKProcessPoolConfigurationInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C89D2D61A6C6BE6003A5FDE /* _WKProcessPoolConfigurationInternal.h */; };
</span><span class="cx">                 7C8EB11718DB6A19007917C2 /* WKPreferencesPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C8EB11618DB6A19007917C2 /* WKPreferencesPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 7C9D1537184584DA009D3918 /* WKBrowsingContextGroupInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C9D1536184584DA009D3918 /* WKBrowsingContextGroupInternal.h */; };
</span><span class="lines">@@ -3368,8 +3366,6 @@
</span><span class="cx">                 7C89D2B71A6B0F2C003A5FDE /* _WKUserContentFilter.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = _WKUserContentFilter.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7C89D2B81A6B0F2C003A5FDE /* _WKUserContentFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKUserContentFilter.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7C89D2BB1A6B0F5B003A5FDE /* _WKUserContentFilterInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKUserContentFilterInternal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                7C89D2BD1A6B11EF003A5FDE /* WKUserContentFilterRef.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKUserContentFilterRef.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                7C89D2BE1A6B11EF003A5FDE /* WKUserContentFilterRef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKUserContentFilterRef.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 7C89D2D61A6C6BE6003A5FDE /* _WKProcessPoolConfigurationInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKProcessPoolConfigurationInternal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7C8EB11618DB6A19007917C2 /* WKPreferencesPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKPreferencesPrivate.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7C9D1536184584DA009D3918 /* WKBrowsingContextGroupInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKBrowsingContextGroupInternal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -6471,8 +6467,6 @@
</span><span class="cx">                                 7C89D29E1A678554003A5FDE /* WKUserContentControllerRef.h */,
</span><span class="cx">                                 7C2413061AACFCB400A58C15 /* WKUserContentExtensionStoreRef.cpp */,
</span><span class="cx">                                 7C2413071AACFCB400A58C15 /* WKUserContentExtensionStoreRef.h */,
</span><del>-                                7C89D2BD1A6B11EF003A5FDE /* WKUserContentFilterRef.cpp */,
-                                7C89D2BE1A6B11EF003A5FDE /* WKUserContentFilterRef.h */,
</del><span class="cx">                                 4A410F3519AF7AC3002EBAB5 /* WKUserMediaPermissionRequest.cpp */,
</span><span class="cx">                                 4A410F3619AF7AC3002EBAB5 /* WKUserMediaPermissionRequest.h */,
</span><span class="cx">                                 7C89D2A11A678875003A5FDE /* WKUserScriptRef.cpp */,
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (182921 => 182922)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2015-04-16 23:28:21 UTC (rev 182921)
+++ trunk/Tools/ChangeLog        2015-04-16 23:41:22 UTC (rev 182922)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2015-04-16  Alex Christensen  &lt;achristensen@webkit.org&gt;
+
+        Removed unused WKUserContentFilterRef.
+        https://bugs.webkit.org/show_bug.cgi?id=143852
+
+        Reviewed by Sam Weinig.
+
+        * TestWebKitAPI/Tests/WebKit2Cocoa/_WKUserContentExtensionStore.mm:
+        * WebKitTestRunner/mac/TestControllerMac.mm:
+        (WTR::TestController::platformResetPreferencesToConsistentValues):
+        (WTR::TestController::platformConfigureViewForTest):
+
</ins><span class="cx"> 2015-04-16  Jake Nielsen  &lt;jacob_nielsen@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed. Adding myself as a commiter in contributers.json.
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKit2Cocoa_WKUserContentExtensionStoremm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/_WKUserContentExtensionStore.mm (182921 => 182922)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/_WKUserContentExtensionStore.mm        2015-04-16 23:28:21 UTC (rev 182921)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/_WKUserContentExtensionStore.mm        2015-04-16 23:41:22 UTC (rev 182922)
</span><span class="lines">@@ -31,7 +31,6 @@
</span><span class="cx"> #import &quot;PlatformUtilities.h&quot;
</span><span class="cx"> #import &quot;Test.h&quot;
</span><span class="cx"> #import &lt;WebKit/_WKUserContentExtensionStorePrivate.h&gt;
</span><del>-#import &lt;WebKit/_WKUserContentFilter.h&gt;
</del><span class="cx"> #import &lt;wtf/RetainPtr.h&gt;
</span><span class="cx"> 
</span><span class="cx"> class _WKUserContentExtensionStoreTest : public testing::Test {
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnermacTestControllerMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/mac/TestControllerMac.mm (182921 => 182922)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/mac/TestControllerMac.mm        2015-04-16 23:28:21 UTC (rev 182921)
+++ trunk/Tools/WebKitTestRunner/mac/TestControllerMac.mm        2015-04-16 23:41:22 UTC (rev 182922)
</span><span class="lines">@@ -31,9 +31,11 @@
</span><span class="cx"> #import &quot;PoseAsClass.h&quot;
</span><span class="cx"> #import &quot;TestInvocation.h&quot;
</span><span class="cx"> #import &quot;WebKitTestRunnerPasteboard.h&quot;
</span><ins>+#import &lt;WebKit/WKPageGroup.h&gt;
</ins><span class="cx"> #import &lt;WebKit/WKStringCF.h&gt;
</span><span class="cx"> #import &lt;WebKit/WKURLCF.h&gt;
</span><del>-#import &lt;WebKit/WKUserContentFilterRef.h&gt;
</del><ins>+#import &lt;WebKit/_WKUserContentExtensionStore.h&gt;
+#import &lt;WebKit/_WKUserContentExtensionStorePrivate.h&gt;
</ins><span class="cx"> #import &lt;mach-o/dyld.h&gt;
</span><span class="cx"> 
</span><span class="cx"> @interface NSSound (Details)
</span><span class="lines">@@ -82,6 +84,7 @@
</span><span class="cx"> 
</span><span class="cx"> void TestController::platformResetPreferencesToConsistentValues()
</span><span class="cx"> {
</span><ins>+    [[_WKUserContentExtensionStore defaultStore] _removeAllContentExtensions];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TestController::platformConfigureViewForTest(const TestInvocation&amp; test)
</span><span class="lines">@@ -107,12 +110,15 @@
</span><span class="cx">     NSString *contentExtensionString = [NSString stringWithContentsOfURL:filterURL usedEncoding:&amp;encoding error:NULL];
</span><span class="cx">     if (!contentExtensionString)
</span><span class="cx">         return;
</span><del>-
-    WKRetainPtr&lt;WKStringRef&gt; name = adoptWK(WKStringCreateWithUTF8CString(&quot;TestContentExtensions&quot;));
-    WKRetainPtr&lt;WKStringRef&gt; contentExtensionStringWK = adoptWK(WKStringCreateWithCFString((CFStringRef)contentExtensionString));
-    WKRetainPtr&lt;WKUserContentFilterRef&gt; filter = adoptWK(WKUserContentFilterCreate(name.get(), contentExtensionStringWK.get()));
-
-    WKPageGroupAddUserContentFilter(WKPageGetPageGroup(TestController::singleton().mainWebView()-&gt;page()), filter.get());
</del><ins>+    
+    __block bool done = false;
+    [[_WKUserContentExtensionStore defaultStore] compileContentExtensionForIdentifier:@&quot;TestContentExtensions&quot; encodedContentExtension:contentExtensionString completionHandler:^(_WKUserContentFilter *filter, NSError *error)
+    {
+        if (!error)
+            WKPageGroupAddUserContentFilter(WKPageGetPageGroup(TestController::singleton().mainWebView()-&gt;page()), (__bridge WKUserContentFilterRef)filter);
+        done = true;
+    }];
+    platformRunUntil(done, 0);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TestController::platformRunUntil(bool&amp; done, double timeout)
</span></span></pre>
</div>
</div>

</body>
</html>