<!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>[213533] 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/213533">213533</a></dd>
<dt>Author</dt> <dd>achristensen@apple.com</dd>
<dt>Date</dt> <dd>2017-03-07 12:54:09 -0800 (Tue, 07 Mar 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>[Content Extensions] Rename &quot;Domain&quot; to &quot;Condition&quot; where appropriate
https://bugs.webkit.org/show_bug.cgi?id=169297

Reviewed by Brady Eidson.

Source/WebCore:

In <a href="http://trac.webkit.org/projects/webkit/changeset/184116">r184116</a> I added the ability for a content blocker author to add conditions to the triggers,
if-domain and unless-domain which look at the domain of the main document URL.
I plan to add more conditions soon to run regexes on the entire URL, but to make that patch more
manageable, I took the non-behavior-changing parts and put them in this patch.

No change in behavior except some error messages were made more generic.

* contentextensions/CompiledContentExtension.h:
* contentextensions/ContentExtension.cpp:
(WebCore::ContentExtensions::ContentExtension::ContentExtension):
(WebCore::ContentExtensions::ContentExtension::compileGlobalDisplayNoneStyleSheet):
(WebCore::ContentExtensions::ContentExtension::populateConditionCacheIfNeeded):
Pass the main document URL instead of just the domain.  No change in behavior yet.
(WebCore::ContentExtensions::ContentExtension::cachedConditionedActions):
(WebCore::ContentExtensions::ContentExtension::universalActionsWithConditions):
(WebCore::ContentExtensions::ContentExtension::populateDomainCacheIfNeeded): Deleted.
(WebCore::ContentExtensions::ContentExtension::cachedDomainActions): Deleted.
(WebCore::ContentExtensions::ContentExtension::universalActionsWithDomains): Deleted.
* contentextensions/ContentExtension.h:
(WebCore::ContentExtensions::ContentExtension::universalActionsWithoutConditions):
(WebCore::ContentExtensions::ContentExtension::universalActionsWithoutDomains): Deleted.
* contentextensions/ContentExtensionCompiler.cpp:
(WebCore::ContentExtensions::serializeActions):
(WebCore::ContentExtensions::compileRuleList):
* contentextensions/ContentExtensionCompiler.h:
* contentextensions/ContentExtensionError.cpp:
(WebCore::ContentExtensions::contentExtensionErrorCategory):
* contentextensions/ContentExtensionError.h:
* contentextensions/ContentExtensionParser.cpp:
(WebCore::ContentExtensions::getStringList):
Don't pass the error type as a parameter.  It's always JSONInvalidConditionList.
(WebCore::ContentExtensions::getDomainList):
(WebCore::ContentExtensions::loadTrigger):
* contentextensions/ContentExtensionRule.h:
(WebCore::ContentExtensions::Trigger::~Trigger):
(WebCore::ContentExtensions::Trigger::isEmpty):
(WebCore::ContentExtensions::Trigger::operator==):
(WebCore::ContentExtensions::TriggerHash::hash):
Use bitwise xor instead of bitwise or to have fewer hash collisions.
Also, before we were accidentally doing the same hash operation here for IfDomain and UnlessDomain.
This caused unnecessary hash collisions.  This is fixed, but should not change any behavior.
* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
* contentextensions/DFABytecode.h:
(WebCore::ContentExtensions::instructionSizeWithArguments):
* contentextensions/DFABytecodeCompiler.cpp:
(WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendAction):
* contentextensions/DFABytecodeInterpreter.cpp:
(WebCore::ContentExtensions::matchesCondition):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpretAppendAction):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
(WebCore::ContentExtensions::DFABytecodeInterpreter::actionsMatchingEverything):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpretWithConditions):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
(WebCore::ContentExtensions::matchesDomain): Deleted.
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpretWithDomains): Deleted.
* contentextensions/DFABytecodeInterpreter.h:
* loader/ResourceLoadInfo.h:

Source/WebKit2:

* Shared/WebCompiledContentExtension.cpp:
(WebKit::WebCompiledContentExtension::filtersWithoutConditionsBytecode):
(WebKit::WebCompiledContentExtension::filtersWithoutConditionsBytecodeLength):
(WebKit::WebCompiledContentExtension::filtersWithConditionsBytecode):
(WebKit::WebCompiledContentExtension::filtersWithConditionsBytecodeLength):
(WebKit::WebCompiledContentExtension::conditionedFiltersBytecode):
(WebKit::WebCompiledContentExtension::conditionedFiltersBytecodeLength):
(WebKit::WebCompiledContentExtension::filtersWithoutDomainsBytecode): Deleted.
(WebKit::WebCompiledContentExtension::filtersWithoutDomainsBytecodeLength): Deleted.
(WebKit::WebCompiledContentExtension::filtersWithDomainsBytecode): Deleted.
(WebKit::WebCompiledContentExtension::filtersWithDomainsBytecodeLength): Deleted.
(WebKit::WebCompiledContentExtension::domainFiltersBytecode): Deleted.
(WebKit::WebCompiledContentExtension::domainFiltersBytecodeLength): Deleted.
* Shared/WebCompiledContentExtension.h:
* Shared/WebCompiledContentExtensionData.cpp:
(WebKit::WebCompiledContentExtensionData::encode):
(WebKit::WebCompiledContentExtensionData::decode):
* Shared/WebCompiledContentExtensionData.h:
(WebKit::WebCompiledContentExtensionData::WebCompiledContentExtensionData):
* UIProcess/API/APIUserContentExtensionStore.cpp:
(API::ContentExtensionMetaData::fileSize):
(API::encodeContentExtensionMetaData):
(API::decodeContentExtensionMetaData):
(API::compiledToFile):
(API::createExtension):
(API::UserContentExtensionStore::lookupContentExtension):
(API::UserContentExtensionStore::compileContentExtension):
(API::UserContentExtensionStore::removeContentExtension):
* UIProcess/API/APIUserContentExtensionStore.h:

Tools:

* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::InMemoryCompiledContentExtension::create):
(TestWebKitAPI::TEST_F):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecontentextensionsCompiledContentExtensionh">trunk/Source/WebCore/contentextensions/CompiledContentExtension.h</a></li>
<li><a href="#trunkSourceWebCorecontentextensionsContentExtensioncpp">trunk/Source/WebCore/contentextensions/ContentExtension.cpp</a></li>
<li><a href="#trunkSourceWebCorecontentextensionsContentExtensionh">trunk/Source/WebCore/contentextensions/ContentExtension.h</a></li>
<li><a href="#trunkSourceWebCorecontentextensionsContentExtensionCompilercpp">trunk/Source/WebCore/contentextensions/ContentExtensionCompiler.cpp</a></li>
<li><a href="#trunkSourceWebCorecontentextensionsContentExtensionCompilerh">trunk/Source/WebCore/contentextensions/ContentExtensionCompiler.h</a></li>
<li><a href="#trunkSourceWebCorecontentextensionsContentExtensionErrorcpp">trunk/Source/WebCore/contentextensions/ContentExtensionError.cpp</a></li>
<li><a href="#trunkSourceWebCorecontentextensionsContentExtensionErrorh">trunk/Source/WebCore/contentextensions/ContentExtensionError.h</a></li>
<li><a href="#trunkSourceWebCorecontentextensionsContentExtensionParsercpp">trunk/Source/WebCore/contentextensions/ContentExtensionParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecontentextensionsContentExtensionRuleh">trunk/Source/WebCore/contentextensions/ContentExtensionRule.h</a></li>
<li><a href="#trunkSourceWebCorecontentextensionsContentExtensionsBackendcpp">trunk/Source/WebCore/contentextensions/ContentExtensionsBackend.cpp</a></li>
<li><a href="#trunkSourceWebCorecontentextensionsDFABytecodeh">trunk/Source/WebCore/contentextensions/DFABytecode.h</a></li>
<li><a href="#trunkSourceWebCorecontentextensionsDFABytecodeCompilercpp">trunk/Source/WebCore/contentextensions/DFABytecodeCompiler.cpp</a></li>
<li><a href="#trunkSourceWebCorecontentextensionsDFABytecodeInterpretercpp">trunk/Source/WebCore/contentextensions/DFABytecodeInterpreter.cpp</a></li>
<li><a href="#trunkSourceWebCorecontentextensionsDFABytecodeInterpreterh">trunk/Source/WebCore/contentextensions/DFABytecodeInterpreter.h</a></li>
<li><a href="#trunkSourceWebCoreloaderResourceLoadInfoh">trunk/Source/WebCore/loader/ResourceLoadInfo.h</a></li>
<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="#trunkSourceWebKit2SharedWebCompiledContentExtensionDatacpp">trunk/Source/WebKit2/Shared/WebCompiledContentExtensionData.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedWebCompiledContentExtensionDatah">trunk/Source/WebKit2/Shared/WebCompiledContentExtensionData.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPIUserContentExtensionStorecpp">trunk/Source/WebKit2/UIProcess/API/APIUserContentExtensionStore.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPIUserContentExtensionStoreh">trunk/Source/WebKit2/UIProcess/API/APIUserContentExtensionStore.h</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebCoreContentExtensionscpp">trunk/Tools/TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (213532 => 213533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-03-07 20:36:29 UTC (rev 213532)
+++ trunk/Source/WebCore/ChangeLog        2017-03-07 20:54:09 UTC (rev 213533)
</span><span class="lines">@@ -1,3 +1,69 @@
</span><ins>+2017-03-07  Alex Christensen  &lt;achristensen@webkit.org&gt;
+
+        [Content Extensions] Rename &quot;Domain&quot; to &quot;Condition&quot; where appropriate
+        https://bugs.webkit.org/show_bug.cgi?id=169297
+
+        Reviewed by Brady Eidson.
+
+        In r184116 I added the ability for a content blocker author to add conditions to the triggers,
+        if-domain and unless-domain which look at the domain of the main document URL.
+        I plan to add more conditions soon to run regexes on the entire URL, but to make that patch more
+        manageable, I took the non-behavior-changing parts and put them in this patch.
+
+        No change in behavior except some error messages were made more generic.
+
+        * contentextensions/CompiledContentExtension.h:
+        * contentextensions/ContentExtension.cpp:
+        (WebCore::ContentExtensions::ContentExtension::ContentExtension):
+        (WebCore::ContentExtensions::ContentExtension::compileGlobalDisplayNoneStyleSheet):
+        (WebCore::ContentExtensions::ContentExtension::populateConditionCacheIfNeeded):
+        Pass the main document URL instead of just the domain.  No change in behavior yet.
+        (WebCore::ContentExtensions::ContentExtension::cachedConditionedActions):
+        (WebCore::ContentExtensions::ContentExtension::universalActionsWithConditions):
+        (WebCore::ContentExtensions::ContentExtension::populateDomainCacheIfNeeded): Deleted.
+        (WebCore::ContentExtensions::ContentExtension::cachedDomainActions): Deleted.
+        (WebCore::ContentExtensions::ContentExtension::universalActionsWithDomains): Deleted.
+        * contentextensions/ContentExtension.h:
+        (WebCore::ContentExtensions::ContentExtension::universalActionsWithoutConditions):
+        (WebCore::ContentExtensions::ContentExtension::universalActionsWithoutDomains): Deleted.
+        * contentextensions/ContentExtensionCompiler.cpp:
+        (WebCore::ContentExtensions::serializeActions):
+        (WebCore::ContentExtensions::compileRuleList):
+        * contentextensions/ContentExtensionCompiler.h:
+        * contentextensions/ContentExtensionError.cpp:
+        (WebCore::ContentExtensions::contentExtensionErrorCategory):
+        * contentextensions/ContentExtensionError.h:
+        * contentextensions/ContentExtensionParser.cpp:
+        (WebCore::ContentExtensions::getStringList):
+        Don't pass the error type as a parameter.  It's always JSONInvalidConditionList.
+        (WebCore::ContentExtensions::getDomainList):
+        (WebCore::ContentExtensions::loadTrigger):
+        * contentextensions/ContentExtensionRule.h:
+        (WebCore::ContentExtensions::Trigger::~Trigger):
+        (WebCore::ContentExtensions::Trigger::isEmpty):
+        (WebCore::ContentExtensions::Trigger::operator==):
+        (WebCore::ContentExtensions::TriggerHash::hash):
+        Use bitwise xor instead of bitwise or to have fewer hash collisions.
+        Also, before we were accidentally doing the same hash operation here for IfDomain and UnlessDomain.
+        This caused unnecessary hash collisions.  This is fixed, but should not change any behavior.
+        * contentextensions/ContentExtensionsBackend.cpp:
+        (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
+        * contentextensions/DFABytecode.h:
+        (WebCore::ContentExtensions::instructionSizeWithArguments):
+        * contentextensions/DFABytecodeCompiler.cpp:
+        (WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendAction):
+        * contentextensions/DFABytecodeInterpreter.cpp:
+        (WebCore::ContentExtensions::matchesCondition):
+        (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretAppendAction):
+        (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
+        (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsMatchingEverything):
+        (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretWithConditions):
+        (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
+        (WebCore::ContentExtensions::matchesDomain): Deleted.
+        (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretWithDomains): Deleted.
+        * contentextensions/DFABytecodeInterpreter.h:
+        * loader/ResourceLoadInfo.h:
+
</ins><span class="cx"> 2017-03-07  Michael Catanzaro  &lt;mcatanzaro@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [FreeType] FontPlatformData::fallbacks() returns unprepared FcPatterns
</span></span></pre></div>
<a id="trunkSourceWebCorecontentextensionsCompiledContentExtensionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/contentextensions/CompiledContentExtension.h (213532 => 213533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/contentextensions/CompiledContentExtension.h        2017-03-07 20:36:29 UTC (rev 213532)
+++ trunk/Source/WebCore/contentextensions/CompiledContentExtension.h        2017-03-07 20:54:09 UTC (rev 213533)
</span><span class="lines">@@ -38,12 +38,12 @@
</span><span class="cx"> public:
</span><span class="cx">     virtual ~CompiledContentExtension();
</span><span class="cx"> 
</span><del>-    virtual const DFABytecode* filtersWithoutDomainsBytecode() const = 0;
-    virtual unsigned filtersWithoutDomainsBytecodeLength() const = 0;
-    virtual const DFABytecode* filtersWithDomainsBytecode() const = 0;
-    virtual unsigned filtersWithDomainsBytecodeLength() const = 0;
-    virtual const DFABytecode* domainFiltersBytecode() const = 0;
-    virtual unsigned domainFiltersBytecodeLength() const = 0;
</del><ins>+    virtual const DFABytecode* filtersWithoutConditionsBytecode() const = 0;
+    virtual unsigned filtersWithoutConditionsBytecodeLength() const = 0;
+    virtual const DFABytecode* filtersWithConditionsBytecode() const = 0;
+    virtual unsigned filtersWithConditionsBytecodeLength() const = 0;
+    virtual const DFABytecode* conditionedFiltersBytecode() const = 0;
+    virtual unsigned conditionedFiltersBytecodeLength() const = 0;
</ins><span class="cx">     virtual const SerializedActionByte* actions() const = 0;
</span><span class="cx">     virtual unsigned actionsLength() const = 0;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorecontentextensionsContentExtensioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/contentextensions/ContentExtension.cpp (213532 => 213533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/contentextensions/ContentExtension.cpp        2017-03-07 20:36:29 UTC (rev 213532)
+++ trunk/Source/WebCore/contentextensions/ContentExtension.cpp        2017-03-07 20:54:09 UTC (rev 213533)
</span><span class="lines">@@ -45,20 +45,20 @@
</span><span class="cx">     : m_identifier(identifier)
</span><span class="cx">     , m_compiledExtension(WTFMove(compiledExtension))
</span><span class="cx"> {
</span><del>-    DFABytecodeInterpreter withoutDomains(m_compiledExtension-&gt;filtersWithoutDomainsBytecode(), m_compiledExtension-&gt;filtersWithoutDomainsBytecodeLength());
-    DFABytecodeInterpreter withDomains(m_compiledExtension-&gt;filtersWithDomainsBytecode(), m_compiledExtension-&gt;filtersWithDomainsBytecodeLength());
-    for (uint64_t action : withoutDomains.actionsMatchingEverything()) {
</del><ins>+    DFABytecodeInterpreter withoutConditions(m_compiledExtension-&gt;filtersWithoutConditionsBytecode(), m_compiledExtension-&gt;filtersWithoutConditionsBytecodeLength());
+    DFABytecodeInterpreter withConditions(m_compiledExtension-&gt;filtersWithConditionsBytecode(), m_compiledExtension-&gt;filtersWithConditionsBytecodeLength());
+    for (uint64_t action : withoutConditions.actionsMatchingEverything()) {
</ins><span class="cx">         ASSERT(static_cast&lt;uint32_t&gt;(action) == action);
</span><del>-        m_universalActionsWithoutDomains.append(static_cast&lt;uint32_t&gt;(action));
</del><ins>+        m_universalActionsWithoutConditions.append(static_cast&lt;uint32_t&gt;(action));
</ins><span class="cx">     }
</span><del>-    for (uint64_t action : withDomains.actionsMatchingEverything()) {
-        ASSERT((action &amp; ~IfDomainFlag) == static_cast&lt;uint32_t&gt;(action));
-        m_universalActionsWithDomains.append(action);
</del><ins>+    for (uint64_t action : withConditions.actionsMatchingEverything()) {
+        ASSERT((action &amp; ~IfConditionFlag) == static_cast&lt;uint32_t&gt;(action));
+        m_universalActionsWithConditions.append(action);
</ins><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     compileGlobalDisplayNoneStyleSheet();
</span><del>-    m_universalActionsWithoutDomains.shrinkToFit();
-    m_universalActionsWithDomains.shrinkToFit();
</del><ins>+    m_universalActionsWithoutConditions.shrinkToFit();
+    m_universalActionsWithConditions.shrinkToFit();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> uint32_t ContentExtension::findFirstIgnorePreviousRules() const
</span><span class="lines">@@ -92,7 +92,7 @@
</span><span class="cx">     };
</span><span class="cx">     
</span><span class="cx">     StringBuilder css;
</span><del>-    for (uint32_t universalActionLocation : m_universalActionsWithoutDomains) {
</del><ins>+    for (uint32_t universalActionLocation : m_universalActionsWithoutConditions) {
</ins><span class="cx">         if (inGlobalDisplayNoneStyleSheet(universalActionLocation)) {
</span><span class="cx">             if (!css.isEmpty())
</span><span class="cx">                 css.append(',');
</span><span class="lines">@@ -113,41 +113,42 @@
</span><span class="cx">         m_globalDisplayNoneStyleSheet = nullptr;
</span><span class="cx"> 
</span><span class="cx">     // These actions don't need to be applied individually any more. They will all be applied to every page as a precompiled style sheet.
</span><del>-    m_universalActionsWithoutDomains.removeAllMatching(inGlobalDisplayNoneStyleSheet);
</del><ins>+    m_universalActionsWithoutConditions.removeAllMatching(inGlobalDisplayNoneStyleSheet);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void ContentExtension::populateDomainCacheIfNeeded(const String&amp; domain)
</del><ins>+void ContentExtension::populateConditionCacheIfNeeded(const URL&amp; topURL)
</ins><span class="cx"> {
</span><ins>+    String domain = topURL.host();
</ins><span class="cx">     if (m_cachedDomain != domain) {
</span><del>-        DFABytecodeInterpreter interpreter(m_compiledExtension-&gt;domainFiltersBytecode(), m_compiledExtension-&gt;domainFiltersBytecodeLength());
</del><ins>+        DFABytecodeInterpreter interpreter(m_compiledExtension-&gt;conditionedFiltersBytecode(), m_compiledExtension-&gt;conditionedFiltersBytecodeLength());
</ins><span class="cx">         const uint16_t allLoadTypesAndResourceTypes = LoadTypeMask | ResourceTypeMask;
</span><span class="cx">         auto domainActions = interpreter.interpret(domain.utf8(), allLoadTypesAndResourceTypes);
</span><span class="cx">         
</span><del>-        m_cachedDomainActions.clear();
</del><ins>+        m_cachedConditionedActions.clear();
</ins><span class="cx">         for (uint64_t action : domainActions)
</span><del>-            m_cachedDomainActions.add(action);
</del><ins>+            m_cachedConditionedActions.add(action);
</ins><span class="cx">         
</span><del>-        m_cachedUniversalDomainActions.clear();
-        for (uint64_t action : m_universalActionsWithDomains) {
-            ASSERT_WITH_MESSAGE((action &amp; ~IfDomainFlag) == static_cast&lt;uint32_t&gt;(action), &quot;Universal actions with domains should not have flags.&quot;);
-            if (!!(action &amp; IfDomainFlag) == m_cachedDomainActions.contains(action))
-                m_cachedUniversalDomainActions.append(static_cast&lt;uint32_t&gt;(action));
</del><ins>+        m_cachedUniversalConditionedActions.clear();
+        for (uint64_t action : m_universalActionsWithConditions) {
+        ASSERT_WITH_MESSAGE((action &amp; ~IfConditionFlag) == static_cast&lt;uint32_t&gt;(action), &quot;Universal actions with domains should not have flags.&quot;);
+            if (!!(action &amp; IfConditionFlag) == m_cachedConditionedActions.contains(action))
+                m_cachedUniversalConditionedActions.append(static_cast&lt;uint32_t&gt;(action));
</ins><span class="cx">         }
</span><del>-        m_cachedUniversalDomainActions.shrinkToFit();
</del><ins>+        m_cachedUniversalConditionedActions.shrinkToFit();
</ins><span class="cx">         m_cachedDomain = domain;
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-const DFABytecodeInterpreter::Actions&amp; ContentExtension::cachedDomainActions(const String&amp; domain)
</del><ins>+const DFABytecodeInterpreter::Actions&amp; ContentExtension::cachedConditionedActions(const URL&amp; topURL)
</ins><span class="cx"> {
</span><del>-    populateDomainCacheIfNeeded(domain);
-    return m_cachedDomainActions;
</del><ins>+    populateConditionCacheIfNeeded(topURL);
+    return m_cachedConditionedActions;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-const Vector&lt;uint32_t&gt;&amp; ContentExtension::universalActionsWithDomains(const String&amp; domain)
</del><ins>+const Vector&lt;uint32_t&gt;&amp; ContentExtension::universalActionsWithConditions(const URL&amp; topURL)
</ins><span class="cx"> {
</span><del>-    populateDomainCacheIfNeeded(domain);
-    return m_cachedUniversalDomainActions;
</del><ins>+    populateConditionCacheIfNeeded(topURL);
+    return m_cachedUniversalConditionedActions;
</ins><span class="cx"> }
</span><span class="cx">     
</span><span class="cx"> } // namespace ContentExtensions
</span></span></pre></div>
<a id="trunkSourceWebCorecontentextensionsContentExtensionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/contentextensions/ContentExtension.h (213532 => 213533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/contentextensions/ContentExtension.h        2017-03-07 20:36:29 UTC (rev 213532)
+++ trunk/Source/WebCore/contentextensions/ContentExtension.h        2017-03-07 20:54:09 UTC (rev 213533)
</span><span class="lines">@@ -46,9 +46,9 @@
</span><span class="cx">     const String&amp; identifier() const { return m_identifier; }
</span><span class="cx">     const CompiledContentExtension&amp; compiledExtension() const { return m_compiledExtension.get(); }
</span><span class="cx">     StyleSheetContents* globalDisplayNoneStyleSheet();
</span><del>-    const DFABytecodeInterpreter::Actions&amp; cachedDomainActions(const String&amp; domain);
-    const Vector&lt;uint32_t&gt;&amp; universalActionsWithoutDomains() { return m_universalActionsWithoutDomains; }
-    const Vector&lt;uint32_t&gt;&amp; universalActionsWithDomains(const String&amp; domain);
</del><ins>+    const DFABytecodeInterpreter::Actions&amp; cachedConditionedActions(const URL&amp; topURL);
+    const Vector&lt;uint32_t&gt;&amp; universalActionsWithoutConditions() { return m_universalActionsWithoutConditions; }
+    const Vector&lt;uint32_t&gt;&amp; universalActionsWithConditions(const URL&amp; topURL);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     ContentExtension(const String&amp; identifier, Ref&lt;CompiledContentExtension&gt;&amp;&amp;);
</span><span class="lines">@@ -61,12 +61,12 @@
</span><span class="cx">     void compileGlobalDisplayNoneStyleSheet();
</span><span class="cx"> 
</span><span class="cx">     String m_cachedDomain;
</span><del>-    void populateDomainCacheIfNeeded(const String&amp; domain);
-    DFABytecodeInterpreter::Actions m_cachedDomainActions;
-    Vector&lt;uint32_t&gt; m_cachedUniversalDomainActions;
</del><ins>+    void populateConditionCacheIfNeeded(const URL&amp; topURL);
+    DFABytecodeInterpreter::Actions m_cachedConditionedActions;
+    Vector&lt;uint32_t&gt; m_cachedUniversalConditionedActions;
</ins><span class="cx"> 
</span><del>-    Vector&lt;uint32_t&gt; m_universalActionsWithoutDomains;
-    Vector&lt;uint64_t&gt; m_universalActionsWithDomains;
</del><ins>+    Vector&lt;uint32_t&gt; m_universalActionsWithoutConditions;
+    Vector&lt;uint64_t&gt; m_universalActionsWithConditions;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace ContentExtensions
</span></span></pre></div>
<a id="trunkSourceWebCorecontentextensionsContentExtensionCompilercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/contentextensions/ContentExtensionCompiler.cpp (213532 => 213533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/contentextensions/ContentExtensionCompiler.cpp        2017-03-07 20:36:29 UTC (rev 213532)
+++ trunk/Source/WebCore/contentextensions/ContentExtensionCompiler.cpp        2017-03-07 20:54:09 UTC (rev 213533)
</span><span class="lines">@@ -125,9 +125,9 @@
</span><span class="cx">         } else
</span><span class="cx">             ignorePreviousRuleActionsMap.clear();
</span><span class="cx"> 
</span><del>-        // Anything with domain is just pushed.
-        // We could try to merge domains but that case is not common in practice.
-        if (!rule.trigger().domains.isEmpty()) {
</del><ins>+        // Anything with condition is just pushed.
+        // We could try to merge conditions but that case is not common in practice.
+        if (!rule.trigger().conditions.isEmpty()) {
</ins><span class="cx">             actionLocations.append(actions.size());
</span><span class="cx"> 
</span><span class="cx">             if (actionType == ActionType::CSSDisplayNoneSelector)
</span><span class="lines">@@ -222,15 +222,15 @@
</span><span class="cx">     LOG_LARGE_STRUCTURES(actions, actions.capacity() * sizeof(SerializedActionByte));
</span><span class="cx">     actions.clear();
</span><span class="cx"> 
</span><del>-    UniversalActionSet universalActionsWithoutDomains;
-    UniversalActionSet universalActionsWithDomains;
</del><ins>+    UniversalActionSet universalActionsWithoutConditions;
+    UniversalActionSet universalActionsWithConditions;
</ins><span class="cx"> 
</span><span class="cx">     // FIXME: These don't all need to be in memory at the same time.
</span><del>-    CombinedURLFilters filtersWithoutDomains;
-    CombinedURLFilters filtersWithDomains;
-    CombinedURLFilters domainFilters;
-    URLFilterParser filtersWithoutDomainParser(filtersWithoutDomains);
-    URLFilterParser filtersWithDomainParser(filtersWithDomains);
</del><ins>+    CombinedURLFilters filtersWithoutConditions;
+    CombinedURLFilters filtersWithConditions;
+    CombinedURLFilters conditionFilters;
+    URLFilterParser filtersWithoutConditionParser(filtersWithoutConditions);
+    URLFilterParser filtersWithConditionParser(filtersWithConditions);
</ins><span class="cx">     
</span><span class="cx">     for (unsigned ruleIndex = 0; ruleIndex &lt; parsedRuleList.size(); ++ruleIndex) {
</span><span class="cx">         const ContentExtensionRule&amp; contentExtensionRule = parsedRuleList[ruleIndex];
</span><span class="lines">@@ -242,11 +242,11 @@
</span><span class="cx">         ASSERT(!(~ActionFlagMask &amp; (static_cast&lt;uint64_t&gt;(trigger.flags) &lt;&lt; 32)));
</span><span class="cx">         uint64_t actionLocationAndFlags = (static_cast&lt;uint64_t&gt;(trigger.flags) &lt;&lt; 32) | static_cast&lt;uint64_t&gt;(actionLocations[ruleIndex]);
</span><span class="cx">         URLFilterParser::ParseStatus status = URLFilterParser::Ok;
</span><del>-        if (trigger.domains.isEmpty()) {
-            ASSERT(trigger.domainCondition == Trigger::DomainCondition::None);
-            status = filtersWithoutDomainParser.addPattern(trigger.urlFilter, trigger.urlFilterIsCaseSensitive, actionLocationAndFlags);
</del><ins>+        if (trigger.conditions.isEmpty()) {
+            ASSERT(trigger.conditionType == Trigger::ConditionType::None);
+            status = filtersWithoutConditionParser.addPattern(trigger.urlFilter, trigger.urlFilterIsCaseSensitive, actionLocationAndFlags);
</ins><span class="cx">             if (status == URLFilterParser::MatchesEverything) {
</span><del>-                universalActionsWithoutDomains.add(actionLocationAndFlags);
</del><ins>+                universalActionsWithoutConditions.add(actionLocationAndFlags);
</ins><span class="cx">                 status = URLFilterParser::Ok;
</span><span class="cx">             }
</span><span class="cx">             if (status != URLFilterParser::Ok) {
</span><span class="lines">@@ -254,16 +254,19 @@
</span><span class="cx">                 return ContentExtensionError::JSONInvalidRegex;
</span><span class="cx">             }
</span><span class="cx">         } else {
</span><del>-            if (trigger.domainCondition == Trigger::DomainCondition::IfDomain)
-                actionLocationAndFlags |= IfDomainFlag;
-            else {
-                ASSERT(trigger.domainCondition == Trigger::DomainCondition::UnlessDomain);
-                ASSERT(!(actionLocationAndFlags &amp; IfDomainFlag));
</del><ins>+            switch (trigger.conditionType) {
+            case Trigger::ConditionType::IfDomain:
+                actionLocationAndFlags |= IfConditionFlag;
+                break;
+            case Trigger::ConditionType::None:
+            case Trigger::ConditionType::UnlessDomain:
+                ASSERT(!(actionLocationAndFlags &amp; IfConditionFlag));
+                break;
</ins><span class="cx">             }
</span><span class="cx">             
</span><del>-            status = filtersWithDomainParser.addPattern(trigger.urlFilter, trigger.urlFilterIsCaseSensitive, actionLocationAndFlags);
</del><ins>+            status = filtersWithConditionParser.addPattern(trigger.urlFilter, trigger.urlFilterIsCaseSensitive, actionLocationAndFlags);
</ins><span class="cx">             if (status == URLFilterParser::MatchesEverything) {
</span><del>-                universalActionsWithDomains.add(actionLocationAndFlags);
</del><ins>+                universalActionsWithConditions.add(actionLocationAndFlags);
</ins><span class="cx">                 status = URLFilterParser::Ok;
</span><span class="cx">             }
</span><span class="cx">             if (status != URLFilterParser::Ok) {
</span><span class="lines">@@ -270,8 +273,8 @@
</span><span class="cx">                 dataLogF(&quot;Error while parsing %s: %s\n&quot;, trigger.urlFilter.utf8().data(), URLFilterParser::statusString(status).utf8().data());
</span><span class="cx">                 return ContentExtensionError::JSONInvalidRegex;
</span><span class="cx">             }
</span><del>-            for (const String&amp; domain : trigger.domains)
-                domainFilters.addDomain(actionLocationAndFlags, domain);
</del><ins>+            for (const String&amp; condition : trigger.conditions)
+                conditionFilters.addDomain(actionLocationAndFlags, condition);
</ins><span class="cx">         }
</span><span class="cx">         ASSERT(status == URLFilterParser::Ok);
</span><span class="cx">     }
</span><span class="lines">@@ -285,15 +288,15 @@
</span><span class="cx">     dataLogF(&quot;    Time spent partitioning the rules into groups: %f\n&quot;, (patternPartitioningEnd - patternPartitioningStart));
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    LOG_LARGE_STRUCTURES(filtersWithoutDomains, filtersWithoutDomains.memoryUsed());
-    LOG_LARGE_STRUCTURES(filtersWithDomains, filtersWithDomains.memoryUsed());
-    LOG_LARGE_STRUCTURES(domainFilters, domainFilters.memoryUsed());
</del><ins>+    LOG_LARGE_STRUCTURES(filtersWithoutConditions, filtersWithoutConditions.memoryUsed());
+    LOG_LARGE_STRUCTURES(filtersWithConditions, filtersWithConditions.memoryUsed());
+    LOG_LARGE_STRUCTURES(conditionFilters, conditionFilters.memoryUsed());
</ins><span class="cx"> 
</span><span class="cx"> #if CONTENT_EXTENSIONS_PERFORMANCE_REPORTING
</span><del>-    unsigned machinesWithoutDomainsCount = 0;
-    unsigned totalBytecodeSizeForMachinesWithoutDomains = 0;
-    unsigned machinesWithDomainsCount = 0;
-    unsigned totalBytecodeSizeForMachinesWithDomains = 0;
</del><ins>+    unsigned machinesWithoutConditionsCount = 0;
+    unsigned totalBytecodeSizeForMachinesWithoutConditions = 0;
+    unsigned machinesWithConditionsCount = 0;
+    unsigned totalBytecodeSizeForMachinesWithConditions = 0;
</ins><span class="cx">     double totalNFAToByteCodeBuildTimeStart = monotonicallyIncreasingTime();
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -301,19 +304,19 @@
</span><span class="cx">     // larger maxNFASizes use too much memory when compiling.
</span><span class="cx">     const unsigned maxNFASize = 75000;
</span><span class="cx">     
</span><del>-    bool firstNFAWithoutDomainsSeen = false;
</del><ins>+    bool firstNFAWithoutConditionsSeen = false;
</ins><span class="cx"> 
</span><del>-    auto lowerFiltersWithoutDomainsDFAToBytecode = [&amp;](DFA&amp;&amp; dfa)
</del><ins>+    auto lowerFiltersWithoutConditionsDFAToBytecode = [&amp;](DFA&amp;&amp; dfa)
</ins><span class="cx">     {
</span><span class="cx"> #if CONTENT_EXTENSIONS_STATE_MACHINE_DEBUGGING
</span><del>-        dataLogF(&quot;filtersWithoutDomains DFA\n&quot;);
</del><ins>+        dataLogF(&quot;filtersWithoutConditions DFA\n&quot;);
</ins><span class="cx">         dfa.debugPrintDot();
</span><span class="cx"> #endif
</span><span class="cx">         ASSERT_WITH_MESSAGE(!dfa.nodes[dfa.root].hasActions(), &quot;All actions on the DFA root should come from regular expressions that match everything.&quot;);
</span><span class="cx"> 
</span><del>-        if (!firstNFAWithoutDomainsSeen) {
</del><ins>+        if (!firstNFAWithoutConditionsSeen) {
</ins><span class="cx">             // Put all the universal actions on the first DFA.
</span><del>-            addUniversalActionsToDFA(dfa, universalActionsWithoutDomains);
</del><ins>+            addUniversalActionsToDFA(dfa, universalActionsWithoutConditions);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         Vector&lt;DFABytecode&gt; bytecode;
</span><span class="lines">@@ -321,19 +324,19 @@
</span><span class="cx">         compiler.compile();
</span><span class="cx">         LOG_LARGE_STRUCTURES(bytecode, bytecode.capacity() * sizeof(uint8_t));
</span><span class="cx"> #if CONTENT_EXTENSIONS_PERFORMANCE_REPORTING
</span><del>-        ++machinesWithoutDomainsCount;
-        totalBytecodeSizeForMachinesWithoutDomains += bytecode.size();
</del><ins>+        ++machinesWithoutConditionsCount;
+        totalBytecodeSizeForMachinesWithoutConditions += bytecode.size();
</ins><span class="cx"> #endif
</span><del>-        client.writeFiltersWithoutDomainsBytecode(WTFMove(bytecode));
</del><ins>+        client.writeFiltersWithoutConditionsBytecode(WTFMove(bytecode));
</ins><span class="cx"> 
</span><del>-        firstNFAWithoutDomainsSeen = true;
</del><ins>+        firstNFAWithoutConditionsSeen = true;
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     const unsigned smallDFASize = 100;
</span><del>-    DFACombiner smallFiltersWithoutDomainsDFACombiner;
-    filtersWithoutDomains.processNFAs(maxNFASize, [&amp;](NFA&amp;&amp; nfa) {
</del><ins>+    DFACombiner smallFiltersWithoutConditionsDFACombiner;
+    filtersWithoutConditions.processNFAs(maxNFASize, [&amp;](NFA&amp;&amp; nfa) {
</ins><span class="cx"> #if CONTENT_EXTENSIONS_STATE_MACHINE_DEBUGGING
</span><del>-        dataLogF(&quot;filtersWithoutDomains NFA\n&quot;);
</del><ins>+        dataLogF(&quot;filtersWithoutConditions NFA\n&quot;);
</ins><span class="cx">         nfa.debugPrintDot();
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -342,43 +345,43 @@
</span><span class="cx">         LOG_LARGE_STRUCTURES(dfa, dfa.memoryUsed());
</span><span class="cx"> 
</span><span class="cx">         if (dfa.graphSize() &lt; smallDFASize)
</span><del>-            smallFiltersWithoutDomainsDFACombiner.addDFA(WTFMove(dfa));
</del><ins>+            smallFiltersWithoutConditionsDFACombiner.addDFA(WTFMove(dfa));
</ins><span class="cx">         else {
</span><span class="cx">             dfa.minimize();
</span><del>-            lowerFiltersWithoutDomainsDFAToBytecode(WTFMove(dfa));
</del><ins>+            lowerFiltersWithoutConditionsDFAToBytecode(WTFMove(dfa));
</ins><span class="cx">         }
</span><span class="cx">     });
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-    smallFiltersWithoutDomainsDFACombiner.combineDFAs(smallDFASize, [&amp;](DFA&amp;&amp; dfa) {
</del><ins>+    smallFiltersWithoutConditionsDFACombiner.combineDFAs(smallDFASize, [&amp;](DFA&amp;&amp; dfa) {
</ins><span class="cx">         LOG_LARGE_STRUCTURES(dfa, dfa.memoryUsed());
</span><del>-        lowerFiltersWithoutDomainsDFAToBytecode(WTFMove(dfa));
</del><ins>+        lowerFiltersWithoutConditionsDFAToBytecode(WTFMove(dfa));
</ins><span class="cx">     });
</span><span class="cx"> 
</span><del>-    ASSERT(filtersWithoutDomains.isEmpty());
</del><ins>+    ASSERT(filtersWithoutConditions.isEmpty());
</ins><span class="cx"> 
</span><del>-    if (!firstNFAWithoutDomainsSeen) {
</del><ins>+    if (!firstNFAWithoutConditionsSeen) {
</ins><span class="cx">         // Our bytecode interpreter expects to have at least one DFA, so if we haven't seen any
</span><span class="cx">         // create a dummy one and add any universal actions.
</span><span class="cx"> 
</span><span class="cx">         DFA dummyDFA = DFA::empty();
</span><del>-        addUniversalActionsToDFA(dummyDFA, universalActionsWithoutDomains);
</del><ins>+        addUniversalActionsToDFA(dummyDFA, universalActionsWithoutConditions);
</ins><span class="cx"> 
</span><span class="cx">         Vector&lt;DFABytecode&gt; bytecode;
</span><span class="cx">         DFABytecodeCompiler compiler(dummyDFA, bytecode);
</span><span class="cx">         compiler.compile();
</span><span class="cx">         LOG_LARGE_STRUCTURES(bytecode, bytecode.capacity() * sizeof(uint8_t));
</span><del>-        client.writeFiltersWithoutDomainsBytecode(WTFMove(bytecode));
</del><ins>+        client.writeFiltersWithoutConditionsBytecode(WTFMove(bytecode));
</ins><span class="cx">     }
</span><del>-    LOG_LARGE_STRUCTURES(universalActionsWithoutDomains, universalActionsWithoutDomains.capacity() * sizeof(unsigned));
-    universalActionsWithoutDomains.clear();
</del><ins>+    LOG_LARGE_STRUCTURES(universalActionsWithoutConditions, universalActionsWithoutConditions.capacity() * sizeof(unsigned));
+    universalActionsWithoutConditions.clear();
</ins><span class="cx">     
</span><del>-    bool firstNFAWithDomainsSeen = false;
-    auto lowerFiltersWithDomainsDFAToBytecode = [&amp;](DFA&amp;&amp; dfa)
</del><ins>+    bool firstNFAWithConditionsSeen = false;
+    auto lowerFiltersWithConditionsDFAToBytecode = [&amp;](DFA&amp;&amp; dfa)
</ins><span class="cx">     {
</span><del>-        if (!firstNFAWithDomainsSeen) {
</del><ins>+        if (!firstNFAWithConditionsSeen) {
</ins><span class="cx">             // Put all the universal actions on the first DFA.
</span><del>-            addUniversalActionsToDFA(dfa, universalActionsWithDomains);
</del><ins>+            addUniversalActionsToDFA(dfa, universalActionsWithConditions);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         Vector&lt;DFABytecode&gt; bytecode;
</span><span class="lines">@@ -386,89 +389,89 @@
</span><span class="cx">         compiler.compile();
</span><span class="cx">         LOG_LARGE_STRUCTURES(bytecode, bytecode.capacity() * sizeof(uint8_t));
</span><span class="cx"> #if CONTENT_EXTENSIONS_PERFORMANCE_REPORTING
</span><del>-        ++machinesWithDomainsCount;
-        totalBytecodeSizeForMachinesWithDomains += bytecode.size();
</del><ins>+        ++machinesWithConditionsCount;
+        totalBytecodeSizeForMachinesWithConditions += bytecode.size();
</ins><span class="cx"> #endif
</span><del>-        client.writeFiltersWithDomainsBytecode(WTFMove(bytecode));
</del><ins>+        client.writeFiltersWithConditionsBytecode(WTFMove(bytecode));
</ins><span class="cx"> 
</span><del>-        firstNFAWithDomainsSeen = true;
</del><ins>+        firstNFAWithConditionsSeen = true;
</ins><span class="cx">     };
</span><span class="cx"> 
</span><del>-    DFACombiner smallFiltersWithDomainsDFACombiner;
-    filtersWithDomains.processNFAs(maxNFASize, [&amp;](NFA&amp;&amp; nfa) {
</del><ins>+    DFACombiner smallFiltersWithConditionsDFACombiner;
+    filtersWithConditions.processNFAs(maxNFASize, [&amp;](NFA&amp;&amp; nfa) {
</ins><span class="cx"> #if CONTENT_EXTENSIONS_STATE_MACHINE_DEBUGGING
</span><del>-        dataLogF(&quot;filtersWithDomains NFA\n&quot;);
</del><ins>+        dataLogF(&quot;filtersWithConditions NFA\n&quot;);
</ins><span class="cx">         nfa.debugPrintDot();
</span><span class="cx"> #endif
</span><span class="cx">         LOG_LARGE_STRUCTURES(nfa, nfa.memoryUsed());
</span><span class="cx">         DFA dfa = NFAToDFA::convert(nfa);
</span><span class="cx"> #if CONTENT_EXTENSIONS_STATE_MACHINE_DEBUGGING
</span><del>-        dataLogF(&quot;filtersWithDomains PRE MINIMIZING DFA\n&quot;);
</del><ins>+        dataLogF(&quot;filtersWithConditions PRE MINIMIZING DFA\n&quot;);
</ins><span class="cx">         dfa.debugPrintDot();
</span><span class="cx"> #endif
</span><span class="cx">         LOG_LARGE_STRUCTURES(dfa, dfa.memoryUsed());
</span><span class="cx"> 
</span><del>-        ASSERT_WITH_MESSAGE(!dfa.nodes[dfa.root].hasActions(), &quot;Filters with domains that match everything are not allowed right now.&quot;);
</del><ins>+        ASSERT_WITH_MESSAGE(!dfa.nodes[dfa.root].hasActions(), &quot;Filters with Conditions that match everything are not allowed right now.&quot;);
</ins><span class="cx"> 
</span><span class="cx">         if (dfa.graphSize() &lt; smallDFASize)
</span><del>-            smallFiltersWithDomainsDFACombiner.addDFA(WTFMove(dfa));
</del><ins>+            smallFiltersWithConditionsDFACombiner.addDFA(WTFMove(dfa));
</ins><span class="cx">         else {
</span><span class="cx">             dfa.minimize();
</span><del>-            lowerFiltersWithDomainsDFAToBytecode(WTFMove(dfa));
</del><ins>+            lowerFiltersWithConditionsDFAToBytecode(WTFMove(dfa));
</ins><span class="cx">         }
</span><span class="cx">     });
</span><del>-    smallFiltersWithDomainsDFACombiner.combineDFAs(smallDFASize, [&amp;](DFA&amp;&amp; dfa) {
</del><ins>+    smallFiltersWithConditionsDFACombiner.combineDFAs(smallDFASize, [&amp;](DFA&amp;&amp; dfa) {
</ins><span class="cx">         LOG_LARGE_STRUCTURES(dfa, dfa.memoryUsed());
</span><del>-        lowerFiltersWithDomainsDFAToBytecode(WTFMove(dfa));
</del><ins>+        lowerFiltersWithConditionsDFAToBytecode(WTFMove(dfa));
</ins><span class="cx">     });
</span><del>-    ASSERT(filtersWithDomains.isEmpty());
</del><ins>+    ASSERT(filtersWithConditions.isEmpty());
</ins><span class="cx">     
</span><del>-    if (!firstNFAWithDomainsSeen) {
</del><ins>+    if (!firstNFAWithConditionsSeen) {
</ins><span class="cx">         // Our bytecode interpreter expects to have at least one DFA, so if we haven't seen any
</span><span class="cx">         // create a dummy one and add any universal actions.
</span><span class="cx"> 
</span><span class="cx">         DFA dummyDFA = DFA::empty();
</span><del>-        addUniversalActionsToDFA(dummyDFA, universalActionsWithDomains);
</del><ins>+        addUniversalActionsToDFA(dummyDFA, universalActionsWithConditions);
</ins><span class="cx">         
</span><span class="cx">         Vector&lt;DFABytecode&gt; bytecode;
</span><span class="cx">         DFABytecodeCompiler compiler(dummyDFA, bytecode);
</span><span class="cx">         compiler.compile();
</span><span class="cx">         LOG_LARGE_STRUCTURES(bytecode, bytecode.capacity() * sizeof(uint8_t));
</span><del>-        client.writeFiltersWithDomainsBytecode(WTFMove(bytecode));
</del><ins>+        client.writeFiltersWithConditionsBytecode(WTFMove(bytecode));
</ins><span class="cx">     }
</span><del>-    LOG_LARGE_STRUCTURES(universalActionsWithDomains, universalActionsWithDomains.capacity() * sizeof(unsigned));
-    universalActionsWithDomains.clear();
</del><ins>+    LOG_LARGE_STRUCTURES(universalActionsWithConditions, universalActionsWithConditions.capacity() * sizeof(unsigned));
+    universalActionsWithConditions.clear();
</ins><span class="cx"> 
</span><del>-    domainFilters.processNFAs(maxNFASize, [&amp;](NFA&amp;&amp; nfa) {
</del><ins>+    conditionFilters.processNFAs(maxNFASize, [&amp;](NFA&amp;&amp; nfa) {
</ins><span class="cx"> #if CONTENT_EXTENSIONS_STATE_MACHINE_DEBUGGING
</span><del>-        dataLogF(&quot;domainFilters NFA\n&quot;);
</del><ins>+        dataLogF(&quot;conditionFilters NFA\n&quot;);
</ins><span class="cx">         nfa.debugPrintDot();
</span><span class="cx"> #endif
</span><span class="cx">         LOG_LARGE_STRUCTURES(nfa, nfa.memoryUsed());
</span><span class="cx">         DFA dfa = NFAToDFA::convert(nfa);
</span><span class="cx"> #if CONTENT_EXTENSIONS_STATE_MACHINE_DEBUGGING
</span><del>-        dataLogF(&quot;domainFilters DFA\n&quot;);
</del><ins>+        dataLogF(&quot;conditionFilters DFA\n&quot;);
</ins><span class="cx">         dfa.debugPrintDot();
</span><span class="cx"> #endif
</span><span class="cx">         LOG_LARGE_STRUCTURES(dfa, dfa.memoryUsed());
</span><span class="cx">         // Minimizing this DFA would not be effective because all actions are unique
</span><span class="cx">         // and because of the tree-like structure of this DFA.
</span><del>-        ASSERT_WITH_MESSAGE(!dfa.nodes[dfa.root].hasActions(), &quot;There should not be any domains that match everything.&quot;);
</del><ins>+        ASSERT_WITH_MESSAGE(!dfa.nodes[dfa.root].hasActions(), &quot;There should not be any conditions that match everything.&quot;);
</ins><span class="cx"> 
</span><span class="cx">         Vector&lt;DFABytecode&gt; bytecode;
</span><span class="cx">         DFABytecodeCompiler compiler(dfa, bytecode);
</span><span class="cx">         compiler.compile();
</span><span class="cx">         LOG_LARGE_STRUCTURES(bytecode, bytecode.capacity() * sizeof(uint8_t));
</span><del>-        client.writeDomainFiltersBytecode(WTFMove(bytecode));
</del><ins>+        client.writeConditionedFiltersBytecode(WTFMove(bytecode));
</ins><span class="cx">     });
</span><del>-    ASSERT(domainFilters.isEmpty());    
</del><ins>+    ASSERT(conditionFilters.isEmpty());
</ins><span class="cx">     
</span><span class="cx"> #if CONTENT_EXTENSIONS_PERFORMANCE_REPORTING
</span><span class="cx">     double totalNFAToByteCodeBuildTimeEnd = monotonicallyIncreasingTime();
</span><span class="cx">     dataLogF(&quot;    Time spent building and compiling the DFAs: %f\n&quot;, (totalNFAToByteCodeBuildTimeEnd - totalNFAToByteCodeBuildTimeStart));
</span><span class="cx"> 
</span><del>-    dataLogF(&quot;    Number of machines without domain filters: %d (total bytecode size = %d)\n&quot;, machinesWithoutDomainsCount, totalBytecodeSizeForMachinesWithoutDomains);
-    dataLogF(&quot;    Number of machines with domain filters: %d (total bytecode size = %d)\n&quot;, machinesWithDomainsCount, totalBytecodeSizeForMachinesWithDomains);
</del><ins>+    dataLogF(&quot;    Number of machines without condition filters: %d (total bytecode size = %d)\n&quot;, machinesWithoutConditionsCount, totalBytecodeSizeForMachinesWithoutConditions);
+    dataLogF(&quot;    Number of machines with condition filters: %d (total bytecode size = %d)\n&quot;, machinesWithConditionsCount, totalBytecodeSizeForMachinesWithConditions);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     client.finalize();
</span></span></pre></div>
<a id="trunkSourceWebCorecontentextensionsContentExtensionCompilerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/contentextensions/ContentExtensionCompiler.h (213532 => 213533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/contentextensions/ContentExtensionCompiler.h        2017-03-07 20:36:29 UTC (rev 213532)
+++ trunk/Source/WebCore/contentextensions/ContentExtensionCompiler.h        2017-03-07 20:54:09 UTC (rev 213533)
</span><span class="lines">@@ -41,9 +41,9 @@
</span><span class="cx">     
</span><span class="cx">     // Functions should be called in this order. All except writeActions and finalize can be called multiple times, though.
</span><span class="cx">     virtual void writeActions(Vector&lt;SerializedActionByte&gt;&amp;&amp;) = 0;
</span><del>-    virtual void writeFiltersWithoutDomainsBytecode(Vector&lt;DFABytecode&gt;&amp;&amp;) = 0;
-    virtual void writeFiltersWithDomainsBytecode(Vector&lt;DFABytecode&gt;&amp;&amp;) = 0;
-    virtual void writeDomainFiltersBytecode(Vector&lt;DFABytecode&gt;&amp;&amp;) = 0;
</del><ins>+    virtual void writeFiltersWithoutConditionsBytecode(Vector&lt;DFABytecode&gt;&amp;&amp;) = 0;
+    virtual void writeFiltersWithConditionsBytecode(Vector&lt;DFABytecode&gt;&amp;&amp;) = 0;
+    virtual void writeConditionedFiltersBytecode(Vector&lt;DFABytecode&gt;&amp;&amp;) = 0;
</ins><span class="cx">     virtual void finalize() = 0;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecontentextensionsContentExtensionErrorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/contentextensions/ContentExtensionError.cpp (213532 => 213533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/contentextensions/ContentExtensionError.cpp        2017-03-07 20:36:29 UTC (rev 213532)
+++ trunk/Source/WebCore/contentextensions/ContentExtensionError.cpp        2017-03-07 20:54:09 UTC (rev 213533)
</span><span class="lines">@@ -77,14 +77,14 @@
</span><span class="cx">                 return &quot;Invalid css-display-none action type. Requires a selector.&quot;;
</span><span class="cx">             case ContentExtensionError::JSONInvalidRegex:
</span><span class="cx">                 return &quot;Invalid or unsupported regular expression.&quot;;
</span><del>-            case ContentExtensionError::JSONInvalidDomainList:
-                return &quot;Invalid domain list.&quot;;
</del><ins>+            case ContentExtensionError::JSONInvalidConditionList:
+                return &quot;Invalid list of if-domain or unless-domain conditions.&quot;;
</ins><span class="cx">             case ContentExtensionError::JSONTooManyRules:
</span><span class="cx">                 return &quot;Too many rules in JSON array.&quot;;
</span><span class="cx">             case ContentExtensionError::JSONDomainNotLowerCaseASCII:
</span><span class="cx">                 return &quot;Domains must be lower case ASCII. Use punycode to encode non-ASCII characters.&quot;;
</span><del>-            case ContentExtensionError::JSONUnlessAndIfDomain:
-                return &quot;A trigger cannot have both unless- and if-domain.&quot;;
</del><ins>+            case ContentExtensionError::JSONMultipleConditions:
+                return &quot;A trigger cannot have more than one condition (if-domain or unless-domain)&quot;;
</ins><span class="cx">             }
</span><span class="cx"> 
</span><span class="cx">             return std::string();
</span></span></pre></div>
<a id="trunkSourceWebCorecontentextensionsContentExtensionErrorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/contentextensions/ContentExtensionError.h (213532 => 213533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/contentextensions/ContentExtensionError.h        2017-03-07 20:36:29 UTC (rev 213532)
+++ trunk/Source/WebCore/contentextensions/ContentExtensionError.h        2017-03-07 20:54:09 UTC (rev 213533)
</span><span class="lines">@@ -49,9 +49,9 @@
</span><span class="cx">     JSONInvalidTriggerFlagsArray,
</span><span class="cx">     JSONInvalidObjectInTriggerFlagsArray,
</span><span class="cx">     JSONInvalidStringInTriggerFlagsArray,
</span><del>-    JSONInvalidDomainList,
</del><ins>+    JSONInvalidConditionList,
</ins><span class="cx">     JSONDomainNotLowerCaseASCII,
</span><del>-    JSONUnlessAndIfDomain,
</del><ins>+    JSONMultipleConditions,
</ins><span class="cx">     JSONTooManyRules,
</span><span class="cx">     
</span><span class="cx">     JSONInvalidAction,
</span></span></pre></div>
<a id="trunkSourceWebCorecontentextensionsContentExtensionParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/contentextensions/ContentExtensionParser.cpp (213532 => 213533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/contentextensions/ContentExtensionParser.cpp        2017-03-07 20:36:29 UTC (rev 213532)
+++ trunk/Source/WebCore/contentextensions/ContentExtensionParser.cpp        2017-03-07 20:54:09 UTC (rev 213533)
</span><span class="lines">@@ -59,8 +59,9 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx">     
</span><del>-static Expected&lt;Vector&lt;String&gt;, std::error_code&gt; getStringList(ExecState&amp; exec, const JSObject* arrayObject, ContentExtensionError error)
</del><ins>+static Expected&lt;Vector&lt;String&gt;, std::error_code&gt; getStringList(ExecState&amp; exec, const JSObject* arrayObject)
</ins><span class="cx"> {
</span><ins>+    static const ContentExtensionError error = ContentExtensionError::JSONInvalidConditionList;
</ins><span class="cx">     VM&amp; vm = exec.vm();
</span><span class="cx">     auto scope = DECLARE_THROW_SCOPE(vm);
</span><span class="cx"> 
</span><span class="lines">@@ -68,7 +69,7 @@
</span><span class="cx">         return makeUnexpected(error);
</span><span class="cx">     const JSArray* array = jsCast&lt;const JSArray*&gt;(arrayObject);
</span><span class="cx">     
</span><del>-    Vector&lt;String&gt; domains;
</del><ins>+    Vector&lt;String&gt; strings;
</ins><span class="cx">     unsigned length = array-&gt;length();
</span><span class="cx">     for (unsigned i = 0; i &lt; length; ++i) {
</span><span class="cx">         const JSValue value = array-&gt;getIndex(&amp;exec, i);
</span><span class="lines">@@ -75,17 +76,17 @@
</span><span class="cx">         if (scope.exception() || !value.isString())
</span><span class="cx">             return makeUnexpected(error);
</span><span class="cx">         
</span><del>-        const String&amp; domain = asString(value)-&gt;value(&amp;exec);
-        if (domain.isEmpty())
</del><ins>+        const String&amp; string = asString(value)-&gt;value(&amp;exec);
+        if (string.isEmpty())
</ins><span class="cx">             return makeUnexpected(error);
</span><del>-        domains.append(domain);
</del><ins>+        strings.append(string);
</ins><span class="cx">     }
</span><del>-    return WTFMove(domains);
</del><ins>+    return WTFMove(strings);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static Expected&lt;Vector&lt;String&gt;, std::error_code&gt; getDomainList(ExecState&amp; exec, const JSObject* arrayObject)
</span><span class="cx"> {
</span><del>-    auto strings = getStringList(exec, arrayObject, ContentExtensionError::JSONInvalidDomainList);
</del><ins>+    auto strings = getStringList(exec, arrayObject);
</ins><span class="cx">     if (!strings.hasValue())
</span><span class="cx">         return strings;
</span><span class="cx">     for (auto&amp; domain : strings.value()) {
</span><span class="lines">@@ -173,27 +174,27 @@
</span><span class="cx">         auto ifDomain = getDomainList(exec, asObject(ifDomainValue));
</span><span class="cx">         if (!ifDomain.hasValue())
</span><span class="cx">             return makeUnexpected(ifDomain.error());
</span><del>-        trigger.domains = WTFMove(ifDomain.value());
-        if (trigger.domains.isEmpty())
-            return makeUnexpected(ContentExtensionError::JSONInvalidDomainList);
-        ASSERT(trigger.domainCondition == Trigger::DomainCondition::None);
-        trigger.domainCondition = Trigger::DomainCondition::IfDomain;
</del><ins>+        trigger.conditions = WTFMove(ifDomain.value());
+        if (trigger.conditions.isEmpty())
+            return makeUnexpected(ContentExtensionError::JSONInvalidConditionList);
+        ASSERT(trigger.conditionType == Trigger::ConditionType::None);
+        trigger.conditionType = Trigger::ConditionType::IfDomain;
</ins><span class="cx">     } else if (!ifDomainValue.isUndefined())
</span><del>-        return makeUnexpected(ContentExtensionError::JSONInvalidDomainList);
-    
</del><ins>+        return makeUnexpected(ContentExtensionError::JSONInvalidConditionList);
+
</ins><span class="cx">     const JSValue unlessDomainValue = triggerObject.get(&amp;exec, Identifier::fromString(&amp;exec, &quot;unless-domain&quot;));
</span><span class="cx">     if (!scope.exception() &amp;&amp; unlessDomainValue.isObject()) {
</span><del>-        if (trigger.domainCondition != Trigger::DomainCondition::None)
-            return makeUnexpected(ContentExtensionError::JSONUnlessAndIfDomain);
</del><ins>+        if (trigger.conditionType != Trigger::ConditionType::None)
+            return makeUnexpected(ContentExtensionError::JSONMultipleConditions);
</ins><span class="cx">         auto unlessDomain = getDomainList(exec, asObject(unlessDomainValue));
</span><span class="cx">         if (!unlessDomain.hasValue())
</span><span class="cx">             return makeUnexpected(unlessDomain.error());
</span><del>-        trigger.domains = WTFMove(unlessDomain.value());
-        if (trigger.domains.isEmpty())
-            return makeUnexpected(ContentExtensionError::JSONInvalidDomainList);
-        trigger.domainCondition = Trigger::DomainCondition::UnlessDomain;
</del><ins>+        trigger.conditions = WTFMove(unlessDomain.value());
+        if (trigger.conditions.isEmpty())
+            return makeUnexpected(ContentExtensionError::JSONInvalidConditionList);
+        trigger.conditionType = Trigger::ConditionType::UnlessDomain;
</ins><span class="cx">     } else if (!unlessDomainValue.isUndefined())
</span><del>-        return makeUnexpected(ContentExtensionError::JSONInvalidDomainList);
</del><ins>+        return makeUnexpected(ContentExtensionError::JSONInvalidConditionList);
</ins><span class="cx"> 
</span><span class="cx">     return WTFMove(trigger);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorecontentextensionsContentExtensionRuleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/contentextensions/ContentExtensionRule.h (213532 => 213533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/contentextensions/ContentExtensionRule.h        2017-03-07 20:36:29 UTC (rev 213532)
+++ trunk/Source/WebCore/contentextensions/ContentExtensionRule.h        2017-03-07 20:54:09 UTC (rev 213533)
</span><span class="lines">@@ -44,16 +44,16 @@
</span><span class="cx">     String urlFilter;
</span><span class="cx">     bool urlFilterIsCaseSensitive { false };
</span><span class="cx">     ResourceFlags flags { 0 };
</span><del>-    Vector&lt;String&gt; domains;
-    enum class DomainCondition {
</del><ins>+    Vector&lt;String&gt; conditions;
+    enum class ConditionType {
</ins><span class="cx">         None,
</span><span class="cx">         IfDomain,
</span><span class="cx">         UnlessDomain,
</span><del>-    } domainCondition { DomainCondition::None };
</del><ins>+    } conditionType { ConditionType::None };
</ins><span class="cx"> 
</span><span class="cx">     ~Trigger()
</span><span class="cx">     {
</span><del>-        ASSERT(domains.isEmpty() == (domainCondition == DomainCondition::None));
</del><ins>+        ASSERT(conditions.isEmpty() == (conditionType == ConditionType::None));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     bool isEmpty() const
</span><span class="lines">@@ -61,8 +61,8 @@
</span><span class="cx">         return urlFilter.isEmpty()
</span><span class="cx">             &amp;&amp; !urlFilterIsCaseSensitive
</span><span class="cx">             &amp;&amp; !flags
</span><del>-            &amp;&amp; domains.isEmpty()
-            &amp;&amp; domainCondition == DomainCondition::None;
</del><ins>+            &amp;&amp; conditions.isEmpty()
+            &amp;&amp; conditionType == ConditionType::None;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     bool operator==(const Trigger&amp; other) const
</span><span class="lines">@@ -70,8 +70,8 @@
</span><span class="cx">         return urlFilter == other.urlFilter
</span><span class="cx">             &amp;&amp; urlFilterIsCaseSensitive == other.urlFilterIsCaseSensitive
</span><span class="cx">             &amp;&amp; flags == other.flags
</span><del>-            &amp;&amp; domains == other.domains
-            &amp;&amp; domainCondition == other.domainCondition;
</del><ins>+            &amp;&amp; conditions == other.conditions
+            &amp;&amp; conditionType == other.conditionType;
</ins><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="lines">@@ -83,13 +83,10 @@
</span><span class="cx">             hash ^= StringHash::hash(trigger.urlFilter);
</span><span class="cx">         hash = WTF::pairIntHash(hash, DefaultHash&lt;ResourceFlags&gt;::Hash::hash(trigger.flags));
</span><span class="cx"> 
</span><del>-        for (const String&amp; domain : trigger.domains)
-            hash ^= StringHash::hash(domain);
</del><ins>+        for (const String&amp; condition : trigger.conditions)
+            hash ^= StringHash::hash(condition);
</ins><span class="cx"> 
</span><del>-        if (trigger.domainCondition == Trigger::DomainCondition::IfDomain)
-            hash |= 1 &lt;&lt; 16;
-        else if (trigger.domainCondition == Trigger::DomainCondition::IfDomain)
-            hash |= 1 &lt;&lt; 31;
</del><ins>+        hash ^= 1 &lt;&lt; static_cast&lt;unsigned&gt;(trigger.conditionType);
</ins><span class="cx">         return hash;
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecontentextensionsContentExtensionsBackendcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/contentextensions/ContentExtensionsBackend.cpp (213532 => 213533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/contentextensions/ContentExtensionsBackend.cpp        2017-03-07 20:36:29 UTC (rev 213532)
+++ trunk/Source/WebCore/contentextensions/ContentExtensionsBackend.cpp        2017-03-07 20:54:09 UTC (rev 213533)
</span><span class="lines">@@ -91,29 +91,29 @@
</span><span class="cx">         RELEASE_ASSERT(contentExtension);
</span><span class="cx">         const CompiledContentExtension&amp; compiledExtension = contentExtension-&gt;compiledExtension();
</span><span class="cx">         
</span><del>-        DFABytecodeInterpreter withoutDomainsInterpreter(compiledExtension.filtersWithoutDomainsBytecode(), compiledExtension.filtersWithoutDomainsBytecodeLength());
-        DFABytecodeInterpreter::Actions withoutDomainsActions = withoutDomainsInterpreter.interpret(urlCString, flags);
</del><ins>+        DFABytecodeInterpreter withoutConditionsInterpreter(compiledExtension.filtersWithoutConditionsBytecode(), compiledExtension.filtersWithoutConditionsBytecodeLength());
+        DFABytecodeInterpreter::Actions withoutConditionsActions = withoutConditionsInterpreter.interpret(urlCString, flags);
</ins><span class="cx">         
</span><del>-        String domain = resourceLoadInfo.mainDocumentURL.host();
-        DFABytecodeInterpreter withDomainsInterpreter(compiledExtension.filtersWithDomainsBytecode(), compiledExtension.filtersWithDomainsBytecodeLength());
-        DFABytecodeInterpreter::Actions withDomainsActions = withDomainsInterpreter.interpretWithDomains(urlCString, flags, contentExtension-&gt;cachedDomainActions(domain));
</del><ins>+        URL topURL = resourceLoadInfo.mainDocumentURL;
+        DFABytecodeInterpreter withConditionsInterpreter(compiledExtension.filtersWithConditionsBytecode(), compiledExtension.filtersWithConditionsBytecodeLength());
+        DFABytecodeInterpreter::Actions withConditionsActions = withConditionsInterpreter.interpretWithConditions(urlCString, flags, contentExtension-&gt;cachedConditionedActions(topURL));
</ins><span class="cx">         
</span><span class="cx">         const SerializedActionByte* actions = compiledExtension.actions();
</span><span class="cx">         const unsigned actionsLength = compiledExtension.actionsLength();
</span><span class="cx">         
</span><span class="cx">         bool sawIgnorePreviousRules = false;
</span><del>-        const Vector&lt;uint32_t&gt;&amp; universalWithDomains = contentExtension-&gt;universalActionsWithDomains(domain);
-        const Vector&lt;uint32_t&gt;&amp; universalWithoutDomains = contentExtension-&gt;universalActionsWithoutDomains();
-        if (!withoutDomainsActions.isEmpty() || !withDomainsActions.isEmpty() || !universalWithDomains.isEmpty() || !universalWithoutDomains.isEmpty()) {
</del><ins>+        const Vector&lt;uint32_t&gt;&amp; universalWithConditions = contentExtension-&gt;universalActionsWithConditions(topURL);
+        const Vector&lt;uint32_t&gt;&amp; universalWithoutConditions = contentExtension-&gt;universalActionsWithoutConditions();
+        if (!withoutConditionsActions.isEmpty() || !withConditionsActions.isEmpty() || !universalWithConditions.isEmpty() || !universalWithoutConditions.isEmpty()) {
</ins><span class="cx">             Vector&lt;uint32_t&gt; actionLocations;
</span><del>-            actionLocations.reserveInitialCapacity(withoutDomainsActions.size() + withDomainsActions.size() + universalWithoutDomains.size() + universalWithDomains.size());
-            for (uint64_t actionLocation : withoutDomainsActions)
</del><ins>+            actionLocations.reserveInitialCapacity(withoutConditionsActions.size() + withConditionsActions.size() + universalWithoutConditions.size() + universalWithConditions.size());
+            for (uint64_t actionLocation : withoutConditionsActions)
</ins><span class="cx">                 actionLocations.uncheckedAppend(static_cast&lt;uint32_t&gt;(actionLocation));
</span><del>-            for (uint64_t actionLocation : withDomainsActions)
</del><ins>+            for (uint64_t actionLocation : withConditionsActions)
</ins><span class="cx">                 actionLocations.uncheckedAppend(static_cast&lt;uint32_t&gt;(actionLocation));
</span><del>-            for (uint32_t actionLocation : universalWithoutDomains)
</del><ins>+            for (uint32_t actionLocation : universalWithoutConditions)
</ins><span class="cx">                 actionLocations.uncheckedAppend(actionLocation);
</span><del>-            for (uint32_t actionLocation : universalWithDomains)
</del><ins>+            for (uint32_t actionLocation : universalWithConditions)
</ins><span class="cx">                 actionLocations.uncheckedAppend(actionLocation);
</span><span class="cx">             std::sort(actionLocations.begin(), actionLocations.end());
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecontentextensionsDFABytecodeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/contentextensions/DFABytecode.h (213532 => 213533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/contentextensions/DFABytecode.h        2017-03-07 20:36:29 UTC (rev 213532)
+++ trunk/Source/WebCore/contentextensions/DFABytecode.h        2017-03-07 20:54:09 UTC (rev 213533)
</span><span class="lines">@@ -62,13 +62,13 @@
</span><span class="cx">     // AppendAction has one argument:
</span><span class="cx">     // The action to append (4 bytes).
</span><span class="cx">     AppendAction = 0x6,
</span><del>-    AppendActionWithIfDomain = 0x7,
</del><ins>+    AppendActionWithIfCondition = 0x7,
</ins><span class="cx">     
</span><span class="cx">     // TestFlagsAndAppendAction has two arguments:
</span><span class="cx">     // The flags to check before appending (2 bytes).
</span><span class="cx">     // The action to append (4 bytes).
</span><span class="cx">     TestFlagsAndAppendAction = 0x8,
</span><del>-    TestFlagsAndAppendActionWithIfDomain = 0x9,
</del><ins>+    TestFlagsAndAppendActionWithIfCondition = 0x9,
</ins><span class="cx"> 
</span><span class="cx">     // Terminate has no arguments.
</span><span class="cx">     Terminate = 0xA,
</span><span class="lines">@@ -118,10 +118,10 @@
</span><span class="cx">     case DFABytecodeInstruction::Jump:
</span><span class="cx">         RELEASE_ASSERT_NOT_REACHED(); // Variable instruction size.
</span><span class="cx">     case DFABytecodeInstruction::AppendAction:
</span><del>-    case DFABytecodeInstruction::AppendActionWithIfDomain:
</del><ins>+    case DFABytecodeInstruction::AppendActionWithIfCondition:
</ins><span class="cx">         return sizeof(DFABytecodeInstruction) + sizeof(uint32_t);
</span><span class="cx">     case DFABytecodeInstruction::TestFlagsAndAppendAction:
</span><del>-    case DFABytecodeInstruction::TestFlagsAndAppendActionWithIfDomain:
</del><ins>+    case DFABytecodeInstruction::TestFlagsAndAppendActionWithIfCondition:
</ins><span class="cx">         return sizeof(DFABytecodeInstruction) + sizeof(uint16_t) + sizeof(uint32_t);
</span><span class="cx">     case DFABytecodeInstruction::Terminate:
</span><span class="cx">         return sizeof(DFABytecodeInstruction);
</span></span></pre></div>
<a id="trunkSourceWebCorecontentextensionsDFABytecodeCompilercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/contentextensions/DFABytecodeCompiler.cpp (213532 => 213533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/contentextensions/DFABytecodeCompiler.cpp        2017-03-07 20:36:29 UTC (rev 213532)
+++ trunk/Source/WebCore/contentextensions/DFABytecodeCompiler.cpp        2017-03-07 20:54:09 UTC (rev 213533)
</span><span class="lines">@@ -81,15 +81,15 @@
</span><span class="cx"> {
</span><span class="cx">     // High bits are used to store flags. See compileRuleList.
</span><span class="cx">     if (action &amp; ActionFlagMask) {
</span><del>-        if (action &amp; IfDomainFlag)
-            append&lt;DFABytecodeInstruction&gt;(m_bytecode, DFABytecodeInstruction::TestFlagsAndAppendActionWithIfDomain);
</del><ins>+        if (action &amp; IfConditionFlag)
+            append&lt;DFABytecodeInstruction&gt;(m_bytecode, DFABytecodeInstruction::TestFlagsAndAppendActionWithIfCondition);
</ins><span class="cx">         else
</span><span class="cx">             append&lt;DFABytecodeInstruction&gt;(m_bytecode, DFABytecodeInstruction::TestFlagsAndAppendAction);
</span><span class="cx">         append&lt;uint16_t&gt;(m_bytecode, static_cast&lt;uint16_t&gt;(action &gt;&gt; 32));
</span><span class="cx">         append&lt;uint32_t&gt;(m_bytecode, static_cast&lt;uint32_t&gt;(action));
</span><span class="cx">     } else {
</span><del>-        if (action &amp; IfDomainFlag)
-            append&lt;DFABytecodeInstruction&gt;(m_bytecode, DFABytecodeInstruction::AppendActionWithIfDomain);
</del><ins>+        if (action &amp; IfConditionFlag)
+            append&lt;DFABytecodeInstruction&gt;(m_bytecode, DFABytecodeInstruction::AppendActionWithIfCondition);
</ins><span class="cx">         else
</span><span class="cx">             append&lt;DFABytecodeInstruction&gt;(m_bytecode, DFABytecodeInstruction::AppendAction);
</span><span class="cx">         append&lt;uint32_t&gt;(m_bytecode, static_cast&lt;uint32_t&gt;(action));
</span></span></pre></div>
<a id="trunkSourceWebCorecontentextensionsDFABytecodeInterpretercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/contentextensions/DFABytecodeInterpreter.cpp (213532 => 213533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/contentextensions/DFABytecodeInterpreter.cpp        2017-03-07 20:36:29 UTC (rev 213532)
+++ trunk/Source/WebCore/contentextensions/DFABytecodeInterpreter.cpp        2017-03-07 20:54:09 UTC (rev 213533)
</span><span class="lines">@@ -86,29 +86,29 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static inline bool matchesDomain(uint64_t actionAndFlags, const DFABytecodeInterpreter::Actions&amp; domainActions)
</del><ins>+static inline bool matchesCondition(uint64_t actionAndFlags, const DFABytecodeInterpreter::Actions&amp; conditionActions)
</ins><span class="cx"> {
</span><del>-    bool ifDomain = actionAndFlags &amp; IfDomainFlag;
-    bool domain = domainActions.contains(actionAndFlags);
-    return ifDomain == domain;
</del><ins>+    bool ifCondition = actionAndFlags &amp; IfConditionFlag;
+    bool condition = conditionActions.contains(actionAndFlags);
+    return ifCondition == condition;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void DFABytecodeInterpreter::interpretAppendAction(uint32_t&amp; programCounter, Actions&amp; actions, bool ifDomain)
</del><ins>+void DFABytecodeInterpreter::interpretAppendAction(uint32_t&amp; programCounter, Actions&amp; actions, bool ifCondition)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(getInstruction(m_bytecode, m_bytecodeLength, programCounter) == DFABytecodeInstruction::AppendAction
</span><del>-        || getInstruction(m_bytecode, m_bytecodeLength, programCounter) == DFABytecodeInstruction::AppendActionWithIfDomain);
-    uint64_t action = (ifDomain ? IfDomainFlag : 0) | static_cast&lt;uint64_t&gt;(getBits&lt;uint32_t&gt;(m_bytecode, m_bytecodeLength, programCounter + sizeof(DFABytecodeInstruction)));
-    if (!m_domainActions || matchesDomain(action, *m_domainActions))
</del><ins>+        || getInstruction(m_bytecode, m_bytecodeLength, programCounter) == DFABytecodeInstruction::AppendActionWithIfCondition);
+    uint64_t action = (ifCondition ? IfConditionFlag : 0) | static_cast&lt;uint64_t&gt;(getBits&lt;uint32_t&gt;(m_bytecode, m_bytecodeLength, programCounter + sizeof(DFABytecodeInstruction)));
+    if (!m_conditionActions || matchesCondition(action, *m_conditionActions))
</ins><span class="cx">         actions.add(action);
</span><span class="cx">     
</span><span class="cx">     programCounter += instructionSizeWithArguments(DFABytecodeInstruction::AppendAction);
</span><del>-    ASSERT(instructionSizeWithArguments(DFABytecodeInstruction::AppendAction) == instructionSizeWithArguments(DFABytecodeInstruction::AppendActionWithIfDomain));
</del><ins>+    ASSERT(instructionSizeWithArguments(DFABytecodeInstruction::AppendAction) == instructionSizeWithArguments(DFABytecodeInstruction::AppendActionWithIfCondition));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void DFABytecodeInterpreter::interpretTestFlagsAndAppendAction(uint32_t&amp; programCounter, uint16_t flags, Actions&amp; actions, bool ifDomain)
</del><ins>+void DFABytecodeInterpreter::interpretTestFlagsAndAppendAction(uint32_t&amp; programCounter, uint16_t flags, Actions&amp; actions, bool ifCondition)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(getInstruction(m_bytecode, m_bytecodeLength, programCounter) == DFABytecodeInstruction::TestFlagsAndAppendAction
</span><del>-        || getInstruction(m_bytecode, m_bytecodeLength, programCounter) == DFABytecodeInstruction::TestFlagsAndAppendActionWithIfDomain);
</del><ins>+        || getInstruction(m_bytecode, m_bytecodeLength, programCounter) == DFABytecodeInstruction::TestFlagsAndAppendActionWithIfCondition);
</ins><span class="cx">     uint16_t flagsToCheck = getBits&lt;uint16_t&gt;(m_bytecode, m_bytecodeLength, programCounter + sizeof(DFABytecodeInstruction));
</span><span class="cx"> 
</span><span class="cx">     uint16_t loadTypeFlags = flagsToCheck &amp; LoadTypeMask;
</span><span class="lines">@@ -118,12 +118,12 @@
</span><span class="cx">     bool resourceTypeMatches = resourceTypeFlags ? (resourceTypeFlags &amp; flags) : true;
</span><span class="cx">     
</span><span class="cx">     if (loadTypeMatches &amp;&amp; resourceTypeMatches) {
</span><del>-        uint64_t actionAndFlags = (ifDomain ? IfDomainFlag : 0) | (static_cast&lt;uint64_t&gt;(flagsToCheck) &lt;&lt; 32) | static_cast&lt;uint64_t&gt;(getBits&lt;uint32_t&gt;(m_bytecode, m_bytecodeLength, programCounter + sizeof(DFABytecodeInstruction) + sizeof(uint16_t)));
-        if (!m_domainActions || matchesDomain(actionAndFlags, *m_domainActions))
</del><ins>+        uint64_t actionAndFlags = (ifCondition ? IfConditionFlag : 0) | (static_cast&lt;uint64_t&gt;(flagsToCheck) &lt;&lt; 32) | static_cast&lt;uint64_t&gt;(getBits&lt;uint32_t&gt;(m_bytecode, m_bytecodeLength, programCounter + sizeof(DFABytecodeInstruction) + sizeof(uint16_t)));
+        if (!m_conditionActions || matchesCondition(actionAndFlags, *m_conditionActions))
</ins><span class="cx">             actions.add(actionAndFlags);
</span><span class="cx">     }
</span><span class="cx">     programCounter += instructionSizeWithArguments(DFABytecodeInstruction::TestFlagsAndAppendAction);
</span><del>-    ASSERT(instructionSizeWithArguments(DFABytecodeInstruction::TestFlagsAndAppendAction) == instructionSizeWithArguments(DFABytecodeInstruction::TestFlagsAndAppendActionWithIfDomain));
</del><ins>+    ASSERT(instructionSizeWithArguments(DFABytecodeInstruction::TestFlagsAndAppendAction) == instructionSizeWithArguments(DFABytecodeInstruction::TestFlagsAndAppendActionWithIfCondition));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template&lt;bool caseSensitive&gt;
</span><span class="lines">@@ -157,12 +157,12 @@
</span><span class="cx">         DFABytecodeInstruction instruction = getInstruction(m_bytecode, m_bytecodeLength, programCounter);
</span><span class="cx">         if (instruction == DFABytecodeInstruction::AppendAction)
</span><span class="cx">             interpretAppendAction(programCounter, actions, false);
</span><del>-        else if (instruction == DFABytecodeInstruction::AppendActionWithIfDomain)
</del><ins>+        else if (instruction == DFABytecodeInstruction::AppendActionWithIfCondition)
</ins><span class="cx">             interpretAppendAction(programCounter, actions, true);
</span><span class="cx">         else if (instruction == DFABytecodeInstruction::TestFlagsAndAppendAction)
</span><span class="cx">             programCounter += instructionSizeWithArguments(DFABytecodeInstruction::TestFlagsAndAppendAction);
</span><del>-        else if (instruction == DFABytecodeInstruction::TestFlagsAndAppendActionWithIfDomain)
-            programCounter += instructionSizeWithArguments(DFABytecodeInstruction::TestFlagsAndAppendActionWithIfDomain);
</del><ins>+        else if (instruction == DFABytecodeInstruction::TestFlagsAndAppendActionWithIfCondition)
+            programCounter += instructionSizeWithArguments(DFABytecodeInstruction::TestFlagsAndAppendActionWithIfCondition);
</ins><span class="cx">         else
</span><span class="cx">             break;
</span><span class="cx">     }
</span><span class="lines">@@ -169,12 +169,12 @@
</span><span class="cx">     return actions;
</span><span class="cx"> }
</span><span class="cx">     
</span><del>-DFABytecodeInterpreter::Actions DFABytecodeInterpreter::interpretWithDomains(const CString&amp; urlCString, uint16_t flags, const DFABytecodeInterpreter::Actions&amp; domainActions)
</del><ins>+DFABytecodeInterpreter::Actions DFABytecodeInterpreter::interpretWithConditions(const CString&amp; urlCString, uint16_t flags, const DFABytecodeInterpreter::Actions&amp; conditionActions)
</ins><span class="cx"> {
</span><del>-    ASSERT(!m_domainActions);
-    m_domainActions = &amp;domainActions;
</del><ins>+    ASSERT(!m_conditionActions);
+    m_conditionActions = &amp;conditionActions;
</ins><span class="cx">     DFABytecodeInterpreter::Actions actions = interpret(urlCString, flags);
</span><del>-    m_domainActions = nullptr;
</del><ins>+    m_conditionActions = nullptr;
</ins><span class="cx">     return actions;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -199,11 +199,11 @@
</span><span class="cx">                 DFABytecodeInstruction instruction = getInstruction(m_bytecode, m_bytecodeLength, programCounter);
</span><span class="cx">                 if (instruction == DFABytecodeInstruction::AppendAction)
</span><span class="cx">                     programCounter += instructionSizeWithArguments(DFABytecodeInstruction::AppendAction);
</span><del>-                else if (instruction == DFABytecodeInstruction::AppendActionWithIfDomain)
-                    programCounter += instructionSizeWithArguments(DFABytecodeInstruction::AppendActionWithIfDomain);
</del><ins>+                else if (instruction == DFABytecodeInstruction::AppendActionWithIfCondition)
+                    programCounter += instructionSizeWithArguments(DFABytecodeInstruction::AppendActionWithIfCondition);
</ins><span class="cx">                 else if (instruction == DFABytecodeInstruction::TestFlagsAndAppendAction)
</span><span class="cx">                     interpretTestFlagsAndAppendAction(programCounter, flags, actions, false);
</span><del>-                else if (instruction == DFABytecodeInstruction::TestFlagsAndAppendActionWithIfDomain)
</del><ins>+                else if (instruction == DFABytecodeInstruction::TestFlagsAndAppendActionWithIfCondition)
</ins><span class="cx">                     interpretTestFlagsAndAppendAction(programCounter, flags, actions, true);
</span><span class="cx">                 else
</span><span class="cx">                     break;
</span><span class="lines">@@ -212,9 +212,9 @@
</span><span class="cx">                 return actions;
</span><span class="cx">         } else {
</span><span class="cx">             ASSERT_WITH_MESSAGE(getInstruction(m_bytecode, m_bytecodeLength, programCounter) != DFABytecodeInstruction::AppendAction
</span><del>-                &amp;&amp; getInstruction(m_bytecode, m_bytecodeLength, programCounter) != DFABytecodeInstruction::AppendActionWithIfDomain
</del><ins>+                &amp;&amp; getInstruction(m_bytecode, m_bytecodeLength, programCounter) != DFABytecodeInstruction::AppendActionWithIfCondition
</ins><span class="cx">                 &amp;&amp; getInstruction(m_bytecode, m_bytecodeLength, programCounter) != DFABytecodeInstruction::TestFlagsAndAppendAction
</span><del>-                &amp;&amp; getInstruction(m_bytecode, m_bytecodeLength, programCounter) != DFABytecodeInstruction::TestFlagsAndAppendActionWithIfDomain,
</del><ins>+                &amp;&amp; getInstruction(m_bytecode, m_bytecodeLength, programCounter) != DFABytecodeInstruction::TestFlagsAndAppendActionWithIfCondition,
</ins><span class="cx">                 &quot;Triggers that match everything should only be in the first DFA.&quot;);
</span><span class="cx">         }
</span><span class="cx">         
</span><span class="lines">@@ -329,7 +329,7 @@
</span><span class="cx">                 interpretAppendAction(programCounter, actions, false);
</span><span class="cx">                 break;
</span><span class="cx">                     
</span><del>-            case DFABytecodeInstruction::AppendActionWithIfDomain:
</del><ins>+            case DFABytecodeInstruction::AppendActionWithIfCondition:
</ins><span class="cx">                 interpretAppendAction(programCounter, actions, true);
</span><span class="cx">                 break;
</span><span class="cx">                     
</span><span class="lines">@@ -337,7 +337,7 @@
</span><span class="cx">                 interpretTestFlagsAndAppendAction(programCounter, flags, actions, false);
</span><span class="cx">                 break;
</span><span class="cx">             
</span><del>-            case DFABytecodeInstruction::TestFlagsAndAppendActionWithIfDomain:
</del><ins>+            case DFABytecodeInstruction::TestFlagsAndAppendActionWithIfCondition:
</ins><span class="cx">                 interpretTestFlagsAndAppendAction(programCounter, flags, actions, true);
</span><span class="cx">                 break;
</span><span class="cx">                     
</span></span></pre></div>
<a id="trunkSourceWebCorecontentextensionsDFABytecodeInterpreterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/contentextensions/DFABytecodeInterpreter.h (213532 => 213533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/contentextensions/DFABytecodeInterpreter.h        2017-03-07 20:36:29 UTC (rev 213532)
+++ trunk/Source/WebCore/contentextensions/DFABytecodeInterpreter.h        2017-03-07 20:54:09 UTC (rev 213533)
</span><span class="lines">@@ -48,12 +48,12 @@
</span><span class="cx">     typedef HashSet&lt;uint64_t, DefaultHash&lt;uint64_t&gt;::Hash, WTF::UnsignedWithZeroKeyHashTraits&lt;uint64_t&gt;&gt; Actions;
</span><span class="cx">     
</span><span class="cx">     Actions interpret(const CString&amp;, uint16_t flags);
</span><del>-    Actions interpretWithDomains(const CString&amp;, uint16_t flags, const DFABytecodeInterpreter::Actions&amp; domainActions);
</del><ins>+    Actions interpretWithConditions(const CString&amp;, uint16_t flags, const DFABytecodeInterpreter::Actions&amp; conditionActions);
</ins><span class="cx">     Actions actionsMatchingEverything();
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    void interpretAppendAction(unsigned&amp; programCounter, Actions&amp;, bool ifDomain);
-    void interpretTestFlagsAndAppendAction(unsigned&amp; programCounter, uint16_t flags, Actions&amp;, bool ifDomain);
</del><ins>+    void interpretAppendAction(unsigned&amp; programCounter, Actions&amp;, bool ifCondition);
+    void interpretTestFlagsAndAppendAction(unsigned&amp; programCounter, uint16_t flags, Actions&amp;, bool ifCondition);
</ins><span class="cx"> 
</span><span class="cx">     template&lt;bool caseSensitive&gt;
</span><span class="cx">     void interpetJumpTable(const char* url, uint32_t&amp; urlIndex, uint32_t&amp; programCounter, bool&amp; urlIndexIsAfterEndOfString);
</span><span class="lines">@@ -60,7 +60,7 @@
</span><span class="cx"> 
</span><span class="cx">     const DFABytecode* m_bytecode;
</span><span class="cx">     const unsigned m_bytecodeLength;
</span><del>-    const DFABytecodeInterpreter::Actions* m_domainActions { nullptr };
</del><ins>+    const DFABytecodeInterpreter::Actions* m_conditionActions { nullptr };
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace ContentExtensions    
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderResourceLoadInfoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/ResourceLoadInfo.h (213532 => 213533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/ResourceLoadInfo.h        2017-03-07 20:36:29 UTC (rev 213532)
+++ trunk/Source/WebCore/loader/ResourceLoadInfo.h        2017-03-07 20:54:09 UTC (rev 213533)
</span><span class="lines">@@ -56,11 +56,13 @@
</span><span class="cx"> 
</span><span class="cx"> // The first 32 bits of a uint64_t action are used for the action location.
</span><span class="cx"> // The next 16 bits are used for the flags (ResourceType and LoadType).
</span><del>-// The next bit is used to mark actions that are from a rule with an if-domain condition.
-// The next bit is used to mark actions that in the default stylesheet.
</del><ins>+// The next bit is used to mark actions that are from a rule with an if-domain.
+//     Actions from rules with unless-domain conditions are distinguished from
+//     rules with if-domain conditions by not having this bit set.
+//     Actions from rules with no conditions are put in the DFA without conditions.
</ins><span class="cx"> // The values -1 and -2 are used for removed and empty values in HashTables.
</span><span class="cx"> const uint64_t ActionFlagMask = 0x0000FFFF00000000;
</span><del>-const uint64_t IfDomainFlag = 0x0001000000000000;
</del><ins>+const uint64_t IfConditionFlag = 0x0001000000000000;
</ins><span class="cx"> 
</span><span class="cx"> ResourceType toResourceType(CachedResource::Type);
</span><span class="cx"> uint16_t readResourceType(const String&amp;);
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (213532 => 213533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2017-03-07 20:36:29 UTC (rev 213532)
+++ trunk/Source/WebKit2/ChangeLog        2017-03-07 20:54:09 UTC (rev 213533)
</span><span class="lines">@@ -1,3 +1,40 @@
</span><ins>+2017-03-07  Alex Christensen  &lt;achristensen@webkit.org&gt;
+
+        [Content Extensions] Rename &quot;Domain&quot; to &quot;Condition&quot; where appropriate
+        https://bugs.webkit.org/show_bug.cgi?id=169297
+
+        Reviewed by Brady Eidson.
+
+        * Shared/WebCompiledContentExtension.cpp:
+        (WebKit::WebCompiledContentExtension::filtersWithoutConditionsBytecode):
+        (WebKit::WebCompiledContentExtension::filtersWithoutConditionsBytecodeLength):
+        (WebKit::WebCompiledContentExtension::filtersWithConditionsBytecode):
+        (WebKit::WebCompiledContentExtension::filtersWithConditionsBytecodeLength):
+        (WebKit::WebCompiledContentExtension::conditionedFiltersBytecode):
+        (WebKit::WebCompiledContentExtension::conditionedFiltersBytecodeLength):
+        (WebKit::WebCompiledContentExtension::filtersWithoutDomainsBytecode): Deleted.
+        (WebKit::WebCompiledContentExtension::filtersWithoutDomainsBytecodeLength): Deleted.
+        (WebKit::WebCompiledContentExtension::filtersWithDomainsBytecode): Deleted.
+        (WebKit::WebCompiledContentExtension::filtersWithDomainsBytecodeLength): Deleted.
+        (WebKit::WebCompiledContentExtension::domainFiltersBytecode): Deleted.
+        (WebKit::WebCompiledContentExtension::domainFiltersBytecodeLength): Deleted.
+        * Shared/WebCompiledContentExtension.h:
+        * Shared/WebCompiledContentExtensionData.cpp:
+        (WebKit::WebCompiledContentExtensionData::encode):
+        (WebKit::WebCompiledContentExtensionData::decode):
+        * Shared/WebCompiledContentExtensionData.h:
+        (WebKit::WebCompiledContentExtensionData::WebCompiledContentExtensionData):
+        * UIProcess/API/APIUserContentExtensionStore.cpp:
+        (API::ContentExtensionMetaData::fileSize):
+        (API::encodeContentExtensionMetaData):
+        (API::decodeContentExtensionMetaData):
+        (API::compiledToFile):
+        (API::createExtension):
+        (API::UserContentExtensionStore::lookupContentExtension):
+        (API::UserContentExtensionStore::compileContentExtension):
+        (API::UserContentExtensionStore::removeContentExtension):
+        * UIProcess/API/APIUserContentExtensionStore.h:
+
</ins><span class="cx"> 2017-03-07  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Mac][WK2] Expand sandbox to support access to audio component registrar
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebCompiledContentExtensioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebCompiledContentExtension.cpp (213532 => 213533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebCompiledContentExtension.cpp        2017-03-07 20:36:29 UTC (rev 213532)
+++ trunk/Source/WebKit2/Shared/WebCompiledContentExtension.cpp        2017-03-07 20:54:09 UTC (rev 213533)
</span><span class="lines">@@ -44,34 +44,34 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-const WebCore::ContentExtensions::DFABytecode* WebCompiledContentExtension::filtersWithoutDomainsBytecode() const
</del><ins>+const WebCore::ContentExtensions::DFABytecode* WebCompiledContentExtension::filtersWithoutConditionsBytecode() const
</ins><span class="cx"> {
</span><del>-    return static_cast&lt;const WebCore::ContentExtensions::DFABytecode*&gt;(m_data.data-&gt;data()) + m_data.filtersWithoutDomainsBytecodeOffset;
</del><ins>+    return static_cast&lt;const WebCore::ContentExtensions::DFABytecode*&gt;(m_data.data-&gt;data()) + m_data.filtersWithoutConditionsBytecodeOffset;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-unsigned WebCompiledContentExtension::filtersWithoutDomainsBytecodeLength() const
</del><ins>+unsigned WebCompiledContentExtension::filtersWithoutConditionsBytecodeLength() const
</ins><span class="cx"> {
</span><del>-    return m_data.filtersWithoutDomainsBytecodeSize;
</del><ins>+    return m_data.filtersWithoutConditionsBytecodeSize;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-const WebCore::ContentExtensions::DFABytecode* WebCompiledContentExtension::filtersWithDomainsBytecode() const
</del><ins>+const WebCore::ContentExtensions::DFABytecode* WebCompiledContentExtension::filtersWithConditionsBytecode() const
</ins><span class="cx"> {
</span><del>-    return static_cast&lt;const WebCore::ContentExtensions::DFABytecode*&gt;(m_data.data-&gt;data()) + m_data.filtersWithDomainsBytecodeOffset;
</del><ins>+    return static_cast&lt;const WebCore::ContentExtensions::DFABytecode*&gt;(m_data.data-&gt;data()) + m_data.filtersWithConditionsBytecodeOffset;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-unsigned WebCompiledContentExtension::filtersWithDomainsBytecodeLength() const
</del><ins>+unsigned WebCompiledContentExtension::filtersWithConditionsBytecodeLength() const
</ins><span class="cx"> {
</span><del>-    return m_data.filtersWithDomainsBytecodeSize;
</del><ins>+    return m_data.filtersWithConditionsBytecodeSize;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-const WebCore::ContentExtensions::DFABytecode* WebCompiledContentExtension::domainFiltersBytecode() const
</del><ins>+const WebCore::ContentExtensions::DFABytecode* WebCompiledContentExtension::conditionedFiltersBytecode() const
</ins><span class="cx"> {
</span><del>-    return static_cast&lt;const WebCore::ContentExtensions::DFABytecode*&gt;(m_data.data-&gt;data()) + m_data.domainFiltersBytecodeOffset;
</del><ins>+    return static_cast&lt;const WebCore::ContentExtensions::DFABytecode*&gt;(m_data.data-&gt;data()) + m_data.conditionedFiltersBytecodeOffset;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-unsigned WebCompiledContentExtension::domainFiltersBytecodeLength() const
</del><ins>+unsigned WebCompiledContentExtension::conditionedFiltersBytecodeLength() const
</ins><span class="cx"> {
</span><del>-    return m_data.domainFiltersBytecodeSize;
</del><ins>+    return m_data.conditionedFiltersBytecodeSize;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> const WebCore::ContentExtensions::SerializedActionByte* WebCompiledContentExtension::actions() const
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebCompiledContentExtensionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebCompiledContentExtension.h (213532 => 213533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebCompiledContentExtension.h        2017-03-07 20:36:29 UTC (rev 213532)
+++ trunk/Source/WebKit2/Shared/WebCompiledContentExtension.h        2017-03-07 20:54:09 UTC (rev 213533)
</span><span class="lines">@@ -23,8 +23,7 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#ifndef WebCompiledContentExtension_h
-#define WebCompiledContentExtension_h
</del><ins>+#pragma once
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(CONTENT_EXTENSIONS)
</span><span class="cx"> 
</span><span class="lines">@@ -44,15 +43,15 @@
</span><span class="cx"> private:
</span><span class="cx">     WebCompiledContentExtension(WebCompiledContentExtensionData&amp;&amp;);
</span><span class="cx"> 
</span><del>-    const WebCore::ContentExtensions::DFABytecode* filtersWithoutDomainsBytecode() const override;
-    unsigned filtersWithoutDomainsBytecodeLength() const override;
-    const WebCore::ContentExtensions::DFABytecode* filtersWithDomainsBytecode() const override;
-    unsigned filtersWithDomainsBytecodeLength() const override;
-    const WebCore::ContentExtensions::DFABytecode* domainFiltersBytecode() const override;
-    unsigned domainFiltersBytecodeLength() const override;
</del><ins>+    const WebCore::ContentExtensions::DFABytecode* filtersWithoutConditionsBytecode() const final;
+    unsigned filtersWithoutConditionsBytecodeLength() const final;
+    const WebCore::ContentExtensions::DFABytecode* filtersWithConditionsBytecode() const final;
+    unsigned filtersWithConditionsBytecodeLength() const final;
+    const WebCore::ContentExtensions::DFABytecode* conditionedFiltersBytecode() const final;
+    unsigned conditionedFiltersBytecodeLength() const final;
</ins><span class="cx">     
</span><del>-    const WebCore::ContentExtensions::SerializedActionByte* actions() const override;
-    unsigned actionsLength() const override;
</del><ins>+    const WebCore::ContentExtensions::SerializedActionByte* actions() const final;
+    unsigned actionsLength() const final;
</ins><span class="cx">     
</span><span class="cx">     WebCompiledContentExtensionData m_data;
</span><span class="cx"> };
</span><span class="lines">@@ -60,4 +59,3 @@
</span><span class="cx"> } // namespace WebKit
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(CONTENT_EXTENSIONS)
</span><del>-#endif // WebCompiledContentExtension_h
</del></span></pre></div>
<a id="trunkSourceWebKit2SharedWebCompiledContentExtensionDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebCompiledContentExtensionData.cpp (213532 => 213533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebCompiledContentExtensionData.cpp        2017-03-07 20:36:29 UTC (rev 213532)
+++ trunk/Source/WebKit2/Shared/WebCompiledContentExtensionData.cpp        2017-03-07 20:54:09 UTC (rev 213533)
</span><span class="lines">@@ -40,12 +40,12 @@
</span><span class="cx"> 
</span><span class="cx">     encoder &lt;&lt; actionsOffset;
</span><span class="cx">     encoder &lt;&lt; actionsSize;
</span><del>-    encoder &lt;&lt; filtersWithoutDomainsBytecodeOffset;
-    encoder &lt;&lt; filtersWithoutDomainsBytecodeSize;
-    encoder &lt;&lt; filtersWithDomainsBytecodeOffset;
-    encoder &lt;&lt; filtersWithDomainsBytecodeSize;
-    encoder &lt;&lt; domainFiltersBytecodeOffset;
-    encoder &lt;&lt; domainFiltersBytecodeSize;
</del><ins>+    encoder &lt;&lt; filtersWithoutConditionsBytecodeOffset;
+    encoder &lt;&lt; filtersWithoutConditionsBytecodeSize;
+    encoder &lt;&lt; filtersWithConditionsBytecodeOffset;
+    encoder &lt;&lt; filtersWithConditionsBytecodeSize;
+    encoder &lt;&lt; conditionedFiltersBytecodeOffset;
+    encoder &lt;&lt; conditionedFiltersBytecodeSize;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool WebCompiledContentExtensionData::decode(IPC::Decoder&amp; decoder, WebCompiledContentExtensionData&amp; compiledContentExtensionData)
</span><span class="lines">@@ -59,17 +59,17 @@
</span><span class="cx">         return false;
</span><span class="cx">     if (!decoder.decode(compiledContentExtensionData.actionsSize))
</span><span class="cx">         return false;
</span><del>-    if (!decoder.decode(compiledContentExtensionData.filtersWithoutDomainsBytecodeOffset))
</del><ins>+    if (!decoder.decode(compiledContentExtensionData.filtersWithoutConditionsBytecodeOffset))
</ins><span class="cx">         return false;
</span><del>-    if (!decoder.decode(compiledContentExtensionData.filtersWithoutDomainsBytecodeSize))
</del><ins>+    if (!decoder.decode(compiledContentExtensionData.filtersWithoutConditionsBytecodeSize))
</ins><span class="cx">         return false;
</span><del>-    if (!decoder.decode(compiledContentExtensionData.filtersWithDomainsBytecodeOffset))
</del><ins>+    if (!decoder.decode(compiledContentExtensionData.filtersWithConditionsBytecodeOffset))
</ins><span class="cx">         return false;
</span><del>-    if (!decoder.decode(compiledContentExtensionData.filtersWithDomainsBytecodeSize))
</del><ins>+    if (!decoder.decode(compiledContentExtensionData.filtersWithConditionsBytecodeSize))
</ins><span class="cx">         return false;
</span><del>-    if (!decoder.decode(compiledContentExtensionData.domainFiltersBytecodeOffset))
</del><ins>+    if (!decoder.decode(compiledContentExtensionData.conditionedFiltersBytecodeOffset))
</ins><span class="cx">         return false;
</span><del>-    if (!decoder.decode(compiledContentExtensionData.domainFiltersBytecodeSize))
</del><ins>+    if (!decoder.decode(compiledContentExtensionData.conditionedFiltersBytecodeSize))
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     return true;
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebCompiledContentExtensionDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebCompiledContentExtensionData.h (213532 => 213533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebCompiledContentExtensionData.h        2017-03-07 20:36:29 UTC (rev 213532)
+++ trunk/Source/WebKit2/Shared/WebCompiledContentExtensionData.h        2017-03-07 20:54:09 UTC (rev 213533)
</span><span class="lines">@@ -23,8 +23,7 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#ifndef WebCompiledContentExtensionData_h
-#define WebCompiledContentExtensionData_h
</del><ins>+#pragma once
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(CONTENT_EXTENSIONS)
</span><span class="cx"> 
</span><span class="lines">@@ -41,21 +40,19 @@
</span><span class="cx"> 
</span><span class="cx"> class WebCompiledContentExtensionData {
</span><span class="cx"> public:
</span><del>-    WebCompiledContentExtensionData()
-    {
-    }
-    
-    WebCompiledContentExtensionData(RefPtr&lt;SharedMemory&gt;&amp;&amp; data, NetworkCache::Data fileData, unsigned actionsOffset, unsigned actionsSize, unsigned filtersWithoutDomainsBytecodeOffset, unsigned filtersWithoutDomainsBytecodeSize, unsigned filtersWithDomainsBytecodeOffset, unsigned filtersWithDomainsBytecodeSize, unsigned domainFiltersBytecodeOffset, unsigned domainFiltersBytecodeSize)
</del><ins>+    WebCompiledContentExtensionData() = default;
+
+    WebCompiledContentExtensionData(RefPtr&lt;SharedMemory&gt;&amp;&amp; data, NetworkCache::Data fileData, unsigned actionsOffset, unsigned actionsSize, unsigned filtersWithoutConditionsBytecodeOffset, unsigned filtersWithoutConditionsBytecodeSize, unsigned filtersWithConditionsBytecodeOffset, unsigned filtersWithConditionsBytecodeSize, unsigned conditionedFiltersBytecodeOffset, unsigned conditionedFiltersBytecodeSize)
</ins><span class="cx">         : data(WTFMove(data))
</span><span class="cx">         , fileData(fileData)
</span><span class="cx">         , actionsOffset(actionsOffset)
</span><span class="cx">         , actionsSize(actionsSize)
</span><del>-        , filtersWithoutDomainsBytecodeOffset(filtersWithoutDomainsBytecodeOffset)
-        , filtersWithoutDomainsBytecodeSize(filtersWithoutDomainsBytecodeSize)
-        , filtersWithDomainsBytecodeOffset(filtersWithDomainsBytecodeOffset)
-        , filtersWithDomainsBytecodeSize(filtersWithDomainsBytecodeSize)
-        , domainFiltersBytecodeOffset(domainFiltersBytecodeOffset)
-        , domainFiltersBytecodeSize(domainFiltersBytecodeSize)
</del><ins>+        , filtersWithoutConditionsBytecodeOffset(filtersWithoutConditionsBytecodeOffset)
+        , filtersWithoutConditionsBytecodeSize(filtersWithoutConditionsBytecodeSize)
+        , filtersWithConditionsBytecodeOffset(filtersWithConditionsBytecodeOffset)
+        , filtersWithConditionsBytecodeSize(filtersWithConditionsBytecodeSize)
+        , conditionedFiltersBytecodeOffset(conditionedFiltersBytecodeOffset)
+        , conditionedFiltersBytecodeSize(conditionedFiltersBytecodeSize)
</ins><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -66,15 +63,14 @@
</span><span class="cx">     NetworkCache::Data fileData;
</span><span class="cx">     unsigned actionsOffset { 0 };
</span><span class="cx">     unsigned actionsSize { 0 };
</span><del>-    unsigned filtersWithoutDomainsBytecodeOffset { 0 };
-    unsigned filtersWithoutDomainsBytecodeSize { 0 };
-    unsigned filtersWithDomainsBytecodeOffset { 0 };
-    unsigned filtersWithDomainsBytecodeSize { 0 };
-    unsigned domainFiltersBytecodeOffset { 0 };
-    unsigned domainFiltersBytecodeSize { 0 };
</del><ins>+    unsigned filtersWithoutConditionsBytecodeOffset { 0 };
+    unsigned filtersWithoutConditionsBytecodeSize { 0 };
+    unsigned filtersWithConditionsBytecodeOffset { 0 };
+    unsigned filtersWithConditionsBytecodeSize { 0 };
+    unsigned conditionedFiltersBytecodeOffset { 0 };
+    unsigned conditionedFiltersBytecodeSize { 0 };
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(CONTENT_EXTENSIONS)
</span><del>-#endif // WebCompiledContentExtensionData_h
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPIUserContentExtensionStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/APIUserContentExtensionStore.cpp (213532 => 213533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APIUserContentExtensionStore.cpp        2017-03-07 20:36:29 UTC (rev 213532)
+++ trunk/Source/WebKit2/UIProcess/API/APIUserContentExtensionStore.cpp        2017-03-07 20:54:09 UTC (rev 213533)
</span><span class="lines">@@ -83,17 +83,17 @@
</span><span class="cx"> struct ContentExtensionMetaData {
</span><span class="cx">     uint32_t version { UserContentExtensionStore::CurrentContentExtensionFileVersion };
</span><span class="cx">     uint64_t actionsSize { 0 };
</span><del>-    uint64_t filtersWithoutDomainsBytecodeSize { 0 };
-    uint64_t filtersWithDomainBytecodeSize { 0 };
-    uint64_t domainFiltersBytecodeSize { 0 };
</del><ins>+    uint64_t filtersWithoutConditionsBytecodeSize { 0 };
+    uint64_t filtersWithConditionsBytecodeSize { 0 };
+    uint64_t conditionedFiltersBytecodeSize { 0 };
</ins><span class="cx">     
</span><span class="cx">     size_t fileSize() const
</span><span class="cx">     {
</span><span class="cx">         return ContentExtensionFileHeaderSize
</span><span class="cx">             + actionsSize
</span><del>-            + filtersWithoutDomainsBytecodeSize
-            + filtersWithDomainBytecodeSize
-            + domainFiltersBytecodeSize;
</del><ins>+            + filtersWithoutConditionsBytecodeSize
+            + filtersWithConditionsBytecodeSize
+            + conditionedFiltersBytecodeSize;
</ins><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="lines">@@ -103,9 +103,9 @@
</span><span class="cx"> 
</span><span class="cx">     encoder &lt;&lt; metaData.version;
</span><span class="cx">     encoder &lt;&lt; metaData.actionsSize;
</span><del>-    encoder &lt;&lt; metaData.filtersWithoutDomainsBytecodeSize;
-    encoder &lt;&lt; metaData.filtersWithDomainBytecodeSize;
-    encoder &lt;&lt; metaData.domainFiltersBytecodeSize;
</del><ins>+    encoder &lt;&lt; metaData.filtersWithoutConditionsBytecodeSize;
+    encoder &lt;&lt; metaData.filtersWithConditionsBytecodeSize;
+    encoder &lt;&lt; metaData.conditionedFiltersBytecodeSize;
</ins><span class="cx"> 
</span><span class="cx">     ASSERT(encoder.bufferSize() == ContentExtensionFileHeaderSize);
</span><span class="cx">     return Data(encoder.buffer(), encoder.bufferSize());
</span><span class="lines">@@ -125,11 +125,11 @@
</span><span class="cx">             return false;
</span><span class="cx">         if (!decoder.decode(metaData.actionsSize))
</span><span class="cx">             return false;
</span><del>-        if (!decoder.decode(metaData.filtersWithoutDomainsBytecodeSize))
</del><ins>+        if (!decoder.decode(metaData.filtersWithoutConditionsBytecodeSize))
</ins><span class="cx">             return false;
</span><del>-        if (!decoder.decode(metaData.filtersWithDomainBytecodeSize))
</del><ins>+        if (!decoder.decode(metaData.filtersWithConditionsBytecodeSize))
</ins><span class="cx">             return false;
</span><del>-        if (!decoder.decode(metaData.domainFiltersBytecodeSize))
</del><ins>+        if (!decoder.decode(metaData.conditionedFiltersBytecodeSize))
</ins><span class="cx">             return false;
</span><span class="cx">         success = true;
</span><span class="cx">         return false;
</span><span class="lines">@@ -174,37 +174,37 @@
</span><span class="cx">             , m_metaData(metaData)
</span><span class="cx">         {
</span><span class="cx">             ASSERT(!metaData.actionsSize);
</span><del>-            ASSERT(!metaData.filtersWithoutDomainsBytecodeSize);
-            ASSERT(!metaData.filtersWithDomainBytecodeSize);
-            ASSERT(!metaData.domainFiltersBytecodeSize);
</del><ins>+            ASSERT(!metaData.filtersWithoutConditionsBytecodeSize);
+            ASSERT(!metaData.filtersWithConditionsBytecodeSize);
+            ASSERT(!metaData.conditionedFiltersBytecodeSize);
</ins><span class="cx">         }
</span><span class="cx">         
</span><del>-        void writeFiltersWithoutDomainsBytecode(Vector&lt;DFABytecode&gt;&amp;&amp; bytecode) override
</del><ins>+        void writeFiltersWithoutConditionsBytecode(Vector&lt;DFABytecode&gt;&amp;&amp; bytecode) override
</ins><span class="cx">         {
</span><del>-            ASSERT(!m_filtersWithDomainBytecodeWritten);
-            ASSERT(!m_domainFiltersBytecodeWritten);
-            m_filtersWithoutDomainsBytecodeWritten += bytecode.size();
</del><ins>+            ASSERT(!m_filtersWithConditionBytecodeWritten);
+            ASSERT(!m_conditionFiltersBytecodeWritten);
+            m_filtersWithoutConditionsBytecodeWritten += bytecode.size();
</ins><span class="cx">             writeToFile(Data(bytecode.data(), bytecode.size()));
</span><span class="cx">         }
</span><span class="cx">         
</span><del>-        void writeFiltersWithDomainsBytecode(Vector&lt;DFABytecode&gt;&amp;&amp; bytecode) override
</del><ins>+        void writeFiltersWithConditionsBytecode(Vector&lt;DFABytecode&gt;&amp;&amp; bytecode) override
</ins><span class="cx">         {
</span><del>-            ASSERT(!m_domainFiltersBytecodeWritten);
-            m_filtersWithDomainBytecodeWritten += bytecode.size();
</del><ins>+            ASSERT(!m_conditionFiltersBytecodeWritten);
+            m_filtersWithConditionBytecodeWritten += bytecode.size();
</ins><span class="cx">             writeToFile(Data(bytecode.data(), bytecode.size()));
</span><span class="cx">         }
</span><span class="cx">         
</span><del>-        void writeDomainFiltersBytecode(Vector&lt;DFABytecode&gt;&amp;&amp; bytecode) override
</del><ins>+        void writeConditionedFiltersBytecode(Vector&lt;DFABytecode&gt;&amp;&amp; bytecode) override
</ins><span class="cx">         {
</span><del>-            m_domainFiltersBytecodeWritten += bytecode.size();
</del><ins>+            m_conditionFiltersBytecodeWritten += bytecode.size();
</ins><span class="cx">             writeToFile(Data(bytecode.data(), bytecode.size()));
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         void writeActions(Vector&lt;SerializedActionByte&gt;&amp;&amp; actions) override
</span><span class="cx">         {
</span><del>-            ASSERT(!m_filtersWithoutDomainsBytecodeWritten);
-            ASSERT(!m_filtersWithDomainBytecodeWritten);
-            ASSERT(!m_domainFiltersBytecodeWritten);
</del><ins>+            ASSERT(!m_filtersWithoutConditionsBytecodeWritten);
+            ASSERT(!m_filtersWithConditionBytecodeWritten);
+            ASSERT(!m_conditionFiltersBytecodeWritten);
</ins><span class="cx">             ASSERT(!m_actionsWritten);
</span><span class="cx">             m_actionsWritten += actions.size();
</span><span class="cx">             writeToFile(Data(actions.data(), actions.size()));
</span><span class="lines">@@ -213,9 +213,9 @@
</span><span class="cx">         void finalize() override
</span><span class="cx">         {
</span><span class="cx">             m_metaData.actionsSize = m_actionsWritten;
</span><del>-            m_metaData.filtersWithoutDomainsBytecodeSize = m_filtersWithoutDomainsBytecodeWritten;
-            m_metaData.filtersWithDomainBytecodeSize = m_filtersWithDomainBytecodeWritten;
-            m_metaData.domainFiltersBytecodeSize = m_domainFiltersBytecodeWritten;
</del><ins>+            m_metaData.filtersWithoutConditionsBytecodeSize = m_filtersWithoutConditionsBytecodeWritten;
+            m_metaData.filtersWithConditionsBytecodeSize = m_filtersWithConditionBytecodeWritten;
+            m_metaData.conditionedFiltersBytecodeSize = m_conditionFiltersBytecodeWritten;
</ins><span class="cx">             
</span><span class="cx">             Data header = encodeContentExtensionMetaData(m_metaData);
</span><span class="cx">             if (!m_fileError &amp;&amp; WebCore::seekFile(m_fileHandle, 0ll, WebCore::FileSeekOrigin::SeekFromBeginning) == -1) {
</span><span class="lines">@@ -238,9 +238,9 @@
</span><span class="cx">         
</span><span class="cx">         WebCore::PlatformFileHandle m_fileHandle;
</span><span class="cx">         ContentExtensionMetaData&amp; m_metaData;
</span><del>-        size_t m_filtersWithoutDomainsBytecodeWritten { 0 };
-        size_t m_filtersWithDomainBytecodeWritten { 0 };
-        size_t m_domainFiltersBytecodeWritten { 0 };
</del><ins>+        size_t m_filtersWithoutConditionsBytecodeWritten { 0 };
+        size_t m_filtersWithConditionBytecodeWritten { 0 };
+        size_t m_conditionFiltersBytecodeWritten { 0 };
</ins><span class="cx">         size_t m_actionsWritten { 0 };
</span><span class="cx">         bool m_fileError { false };
</span><span class="cx">     };
</span><span class="lines">@@ -289,22 +289,22 @@
</span><span class="cx">         metaData.actionsSize,
</span><span class="cx">         ContentExtensionFileHeaderSize
</span><span class="cx">             + metaData.actionsSize,
</span><del>-        metaData.filtersWithoutDomainsBytecodeSize,
</del><ins>+        metaData.filtersWithoutConditionsBytecodeSize,
</ins><span class="cx">         ContentExtensionFileHeaderSize
</span><span class="cx">             + metaData.actionsSize
</span><del>-            + metaData.filtersWithoutDomainsBytecodeSize,
-        metaData.filtersWithDomainBytecodeSize,
</del><ins>+            + metaData.filtersWithoutConditionsBytecodeSize,
+        metaData.filtersWithConditionsBytecodeSize,
</ins><span class="cx">         ContentExtensionFileHeaderSize
</span><span class="cx">             + metaData.actionsSize
</span><del>-            + metaData.filtersWithoutDomainsBytecodeSize
-            + metaData.filtersWithDomainBytecodeSize,
-        metaData.domainFiltersBytecodeSize
</del><ins>+            + metaData.filtersWithoutConditionsBytecodeSize
+            + metaData.filtersWithConditionsBytecodeSize,
+        metaData.conditionedFiltersBytecodeSize
</ins><span class="cx">     );
</span><span class="cx">     auto compiledContentExtension = WebKit::WebCompiledContentExtension::create(WTFMove(compiledContentExtensionData));
</span><span class="cx">     return API::UserContentExtension::create(identifier, WTFMove(compiledContentExtension));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void UserContentExtensionStore::lookupContentExtension(const WTF::String&amp; identifier, std::function&lt;void(RefPtr&lt;API::UserContentExtension&gt;, std::error_code)&gt; completionHandler)
</del><ins>+void UserContentExtensionStore::lookupContentExtension(const WTF::String&amp; identifier, Function&lt;void(RefPtr&lt;API::UserContentExtension&gt;, std::error_code)&gt; completionHandler)
</ins><span class="cx"> {
</span><span class="cx">     m_readQueue-&gt;dispatch([protectedThis = makeRef(*this), identifier = identifier.isolatedCopy(), storePath = m_storePath.isolatedCopy(), completionHandler = WTFMove(completionHandler)]() mutable {
</span><span class="cx">         auto path = constructedPath(storePath, identifier);
</span><span class="lines">@@ -332,7 +332,7 @@
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void UserContentExtensionStore::compileContentExtension(const WTF::String&amp; identifier, WTF::String&amp;&amp; json, std::function&lt;void(RefPtr&lt;API::UserContentExtension&gt;, std::error_code)&gt; completionHandler)
</del><ins>+void UserContentExtensionStore::compileContentExtension(const WTF::String&amp; identifier, WTF::String&amp;&amp; json, Function&lt;void(RefPtr&lt;API::UserContentExtension&gt;, std::error_code)&gt; completionHandler)
</ins><span class="cx"> {
</span><span class="cx">     m_compileQueue-&gt;dispatch([protectedThis = makeRef(*this), identifier = identifier.isolatedCopy(), json = json.isolatedCopy(), storePath = m_storePath.isolatedCopy(), completionHandler = WTFMove(completionHandler)] () mutable {
</span><span class="cx">         auto path = constructedPath(storePath, identifier);
</span><span class="lines">@@ -354,7 +354,7 @@
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void UserContentExtensionStore::removeContentExtension(const WTF::String&amp; identifier, std::function&lt;void(std::error_code)&gt; completionHandler)
</del><ins>+void UserContentExtensionStore::removeContentExtension(const WTF::String&amp; identifier, Function&lt;void(std::error_code)&gt; completionHandler)
</ins><span class="cx"> {
</span><span class="cx">     m_removeQueue-&gt;dispatch([protectedThis = makeRef(*this), identifier = identifier.isolatedCopy(), storePath = m_storePath.isolatedCopy(), completionHandler = WTFMove(completionHandler)]() mutable {
</span><span class="cx">         auto path = constructedPath(storePath, identifier);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPIUserContentExtensionStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/APIUserContentExtensionStore.h (213532 => 213533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APIUserContentExtensionStore.h        2017-03-07 20:36:29 UTC (rev 213532)
+++ trunk/Source/WebKit2/UIProcess/API/APIUserContentExtensionStore.h        2017-03-07 20:54:09 UTC (rev 213533)
</span><span class="lines">@@ -23,8 +23,7 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#ifndef APIUserContentExtensionStore_h
-#define APIUserContentExtensionStore_h
</del><ins>+#pragma once
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(CONTENT_EXTENSIONS)
</span><span class="cx"> 
</span><span class="lines">@@ -60,9 +59,9 @@
</span><span class="cx">     explicit UserContentExtensionStore(const WTF::String&amp; storePath);
</span><span class="cx">     virtual ~UserContentExtensionStore();
</span><span class="cx"> 
</span><del>-    void compileContentExtension(const WTF::String&amp; identifier, WTF::String&amp;&amp; json, std::function&lt;void(RefPtr&lt;API::UserContentExtension&gt;, std::error_code)&gt;);
-    void lookupContentExtension(const WTF::String&amp; identifier, std::function&lt;void(RefPtr&lt;API::UserContentExtension&gt;, std::error_code)&gt;);
-    void removeContentExtension(const WTF::String&amp; identifier, std::function&lt;void(std::error_code)&gt;);
</del><ins>+    void compileContentExtension(const WTF::String&amp; identifier, WTF::String&amp;&amp; json, Function&lt;void(RefPtr&lt;API::UserContentExtension&gt;, std::error_code)&gt;);
+    void lookupContentExtension(const WTF::String&amp; identifier, Function&lt;void(RefPtr&lt;API::UserContentExtension&gt;, std::error_code)&gt;);
+    void removeContentExtension(const WTF::String&amp; identifier, Function&lt;void(std::error_code)&gt;);
</ins><span class="cx"> 
</span><span class="cx">     // For testing only.
</span><span class="cx">     void synchronousRemoveAllContentExtensions();
</span><span class="lines">@@ -91,4 +90,3 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(CONTENT_EXTENSIONS)
</span><del>-#endif // APIUserContentExtensionStore_h
</del></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (213532 => 213533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2017-03-07 20:36:29 UTC (rev 213532)
+++ trunk/Tools/ChangeLog        2017-03-07 20:54:09 UTC (rev 213533)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2017-03-07  Alex Christensen  &lt;achristensen@webkit.org&gt;
+
+        [Content Extensions] Rename &quot;Domain&quot; to &quot;Condition&quot; where appropriate
+        https://bugs.webkit.org/show_bug.cgi?id=169297
+
+        Reviewed by Brady Eidson.
+
+        * TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
+        (TestWebKitAPI::InMemoryCompiledContentExtension::create):
+        (TestWebKitAPI::TEST_F):
+
</ins><span class="cx"> 2017-03-07  Jonathan Bedard  &lt;jbedard@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         webkitpy: Refactor setup_test_run for IOSPort and IOSSimulator
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebCoreContentExtensionscpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp (213532 => 213533)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp        2017-03-07 20:36:29 UTC (rev 213532)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp        2017-03-07 20:54:09 UTC (rev 213533)
</span><span class="lines">@@ -83,9 +83,9 @@
</span><span class="cx"> 
</span><span class="cx"> struct CompiledContentExtensionData {
</span><span class="cx">     Vector&lt;ContentExtensions::SerializedActionByte&gt; actions;
</span><del>-    Vector&lt;ContentExtensions::DFABytecode&gt; filtersWithoutDomains;
-    Vector&lt;ContentExtensions::DFABytecode&gt; filtersWithDomains;
-    Vector&lt;ContentExtensions::DFABytecode&gt; domainFilters;
</del><ins>+    Vector&lt;ContentExtensions::DFABytecode&gt; filtersWithoutConditions;
+    Vector&lt;ContentExtensions::DFABytecode&gt; filtersWithConditions;
+    Vector&lt;ContentExtensions::DFABytecode&gt; conditionedFilters;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> class InMemoryContentExtensionCompilationClient final : public ContentExtensions::ContentExtensionCompilationClient {
</span><span class="lines">@@ -94,43 +94,43 @@
</span><span class="cx">         : m_data(data)
</span><span class="cx">     {
</span><span class="cx">         EXPECT_EQ(data.actions.size(), 0ull);
</span><del>-        EXPECT_EQ(data.filtersWithoutDomains.size(), 0ull);
-        EXPECT_EQ(data.filtersWithDomains.size(), 0ull);
-        EXPECT_EQ(data.domainFilters.size(), 0ull);
</del><ins>+        EXPECT_EQ(data.filtersWithoutConditions.size(), 0ull);
+        EXPECT_EQ(data.filtersWithConditions.size(), 0ull);
+        EXPECT_EQ(data.conditionedFilters.size(), 0ull);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    void writeActions(Vector&lt;ContentExtensions::SerializedActionByte&gt;&amp;&amp; actions) override
</del><ins>+    void writeActions(Vector&lt;ContentExtensions::SerializedActionByte&gt;&amp;&amp; actions) final
</ins><span class="cx">     {
</span><span class="cx">         EXPECT_FALSE(finalized);
</span><span class="cx">         EXPECT_EQ(m_data.actions.size(), 0ull);
</span><del>-        EXPECT_EQ(m_data.filtersWithoutDomains.size(), 0ull);
-        EXPECT_EQ(m_data.filtersWithDomains.size(), 0ull);
-        EXPECT_EQ(m_data.domainFilters.size(), 0ull);
</del><ins>+        EXPECT_EQ(m_data.filtersWithoutConditions.size(), 0ull);
+        EXPECT_EQ(m_data.filtersWithConditions.size(), 0ull);
+        EXPECT_EQ(m_data.conditionedFilters.size(), 0ull);
</ins><span class="cx">         m_data.actions.appendVector(actions);
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-    void writeFiltersWithoutDomainsBytecode(Vector&lt;ContentExtensions::DFABytecode&gt;&amp;&amp; bytecode) override
</del><ins>+    void writeFiltersWithoutConditionsBytecode(Vector&lt;ContentExtensions::DFABytecode&gt;&amp;&amp; bytecode) final
</ins><span class="cx">     {
</span><span class="cx">         EXPECT_FALSE(finalized);
</span><del>-        EXPECT_EQ(m_data.filtersWithDomains.size(), 0ull);
-        EXPECT_EQ(m_data.domainFilters.size(), 0ull);
-        m_data.filtersWithoutDomains.appendVector(bytecode);
</del><ins>+        EXPECT_EQ(m_data.filtersWithConditions.size(), 0ull);
+        EXPECT_EQ(m_data.conditionedFilters.size(), 0ull);
+        m_data.filtersWithoutConditions.appendVector(bytecode);
</ins><span class="cx">     }
</span><span class="cx">     
</span><del>-    void writeFiltersWithDomainsBytecode(Vector&lt;ContentExtensions::DFABytecode&gt;&amp;&amp; bytecode) override
</del><ins>+    void writeFiltersWithConditionsBytecode(Vector&lt;ContentExtensions::DFABytecode&gt;&amp;&amp; bytecode) final
</ins><span class="cx">     {
</span><span class="cx">         EXPECT_FALSE(finalized);
</span><del>-        EXPECT_EQ(m_data.domainFilters.size(), 0ull);
-        m_data.filtersWithDomains.appendVector(bytecode);
</del><ins>+        EXPECT_EQ(m_data.conditionedFilters.size(), 0ull);
+        m_data.filtersWithConditions.appendVector(bytecode);
</ins><span class="cx">     }
</span><span class="cx">     
</span><del>-    void writeDomainFiltersBytecode(Vector&lt;ContentExtensions::DFABytecode&gt;&amp;&amp; bytecode) override
</del><ins>+    void writeConditionedFiltersBytecode(Vector&lt;ContentExtensions::DFABytecode&gt;&amp;&amp; bytecode) final
</ins><span class="cx">     {
</span><span class="cx">         EXPECT_FALSE(finalized);
</span><del>-        m_data.domainFilters.appendVector(bytecode);
</del><ins>+        m_data.conditionedFilters.appendVector(bytecode);
</ins><span class="cx">     }
</span><span class="cx">     
</span><del>-    void finalize() override
</del><ins>+    void finalize() final
</ins><span class="cx">     {
</span><span class="cx">         finalized = true;
</span><span class="cx">     }
</span><span class="lines">@@ -156,9 +156,9 @@
</span><span class="cx">         return InMemoryCompiledContentExtension::create(WTFMove(extensionData));
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    static RefPtr&lt;InMemoryCompiledContentExtension&gt; create(CompiledContentExtensionData&amp;&amp; data)
</del><ins>+    static Ref&lt;InMemoryCompiledContentExtension&gt; create(CompiledContentExtensionData&amp;&amp; data)
</ins><span class="cx">     {
</span><del>-        return adoptRef(new InMemoryCompiledContentExtension(WTFMove(data)));
</del><ins>+        return adoptRef(*new InMemoryCompiledContentExtension(WTFMove(data)));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     virtual ~InMemoryCompiledContentExtension()
</span><span class="lines">@@ -165,14 +165,14 @@
</span><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    const ContentExtensions::SerializedActionByte* actions() const override { return m_data.actions.data(); }
-    unsigned actionsLength() const override { return m_data.actions.size(); }
-    const ContentExtensions::DFABytecode* filtersWithoutDomainsBytecode() const override { return m_data.filtersWithoutDomains.data(); }
-    unsigned filtersWithoutDomainsBytecodeLength() const override { return m_data.filtersWithoutDomains.size(); }
-    const ContentExtensions::DFABytecode* filtersWithDomainsBytecode() const override { return m_data.filtersWithDomains.data(); }
-    unsigned filtersWithDomainsBytecodeLength() const override { return m_data.filtersWithDomains.size(); }
-    const ContentExtensions::DFABytecode* domainFiltersBytecode() const override { return m_data.domainFilters.data(); }
-    unsigned domainFiltersBytecodeLength() const override { return m_data.domainFilters.size(); }
</del><ins>+    const ContentExtensions::SerializedActionByte* actions() const final { return m_data.actions.data(); }
+    unsigned actionsLength() const final { return m_data.actions.size(); }
+    const ContentExtensions::DFABytecode* filtersWithoutConditionsBytecode() const final { return m_data.filtersWithoutConditions.data(); }
+    unsigned filtersWithoutConditionsBytecodeLength() const final { return m_data.filtersWithoutConditions.size(); }
+    const ContentExtensions::DFABytecode* filtersWithConditionsBytecode() const final { return m_data.filtersWithConditions.data(); }
+    unsigned filtersWithConditionsBytecodeLength() const final { return m_data.filtersWithConditions.size(); }
+    const ContentExtensions::DFABytecode* conditionedFiltersBytecode() const final { return m_data.conditionedFilters.data(); }
+    unsigned conditionedFiltersBytecodeLength() const final { return m_data.conditionedFilters.size(); }
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     InMemoryCompiledContentExtension(CompiledContentExtensionData&amp;&amp; data)
</span><span class="lines">@@ -1326,35 +1326,31 @@
</span><span class="cx">     checkCompilerError(rules50000.utf8().data(), { });
</span><span class="cx">     checkCompilerError(rules50001.utf8().data(), ContentExtensions::ContentExtensionError::JSONTooManyRules);
</span><span class="cx">     
</span><del>-    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;if-domain\&quot;:{}}}]&quot;, ContentExtensions::ContentExtensionError::JSONInvalidDomainList);
-    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;if-domain\&quot;:[5]}}]&quot;, ContentExtensions::ContentExtensionError::JSONInvalidDomainList);
</del><ins>+    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;if-domain\&quot;:{}}}]&quot;, ContentExtensions::ContentExtensionError::JSONInvalidConditionList);
+    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;if-domain\&quot;:[5]}}]&quot;, ContentExtensions::ContentExtensionError::JSONInvalidConditionList);
</ins><span class="cx">     checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;if-domain\&quot;:[\&quot;a\&quot;]}}]&quot;, { });
</span><del>-    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;if-domain\&quot;:\&quot;a\&quot;}}]&quot;, ContentExtensions::ContentExtensionError::JSONInvalidDomainList);
-    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;if-domain\&quot;:false}}]&quot;, ContentExtensions::ContentExtensionError::JSONInvalidDomainList);
-    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;if-domain\&quot;:null}}]&quot;, ContentExtensions::ContentExtensionError::JSONInvalidDomainList);
-    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;unless-domain\&quot;:{}}}]&quot;, ContentExtensions::ContentExtensionError::JSONInvalidDomainList);
-    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;unless-domain\&quot;:[5]}}]&quot;, ContentExtensions::ContentExtensionError::JSONInvalidDomainList);
-    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;unless-domain\&quot;:[\&quot;\&quot;]}}]&quot;, ContentExtensions::ContentExtensionError::JSONInvalidDomainList);
-    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;unless-domain\&quot;:\&quot;a\&quot;}}]&quot;, ContentExtensions::ContentExtensionError::JSONInvalidDomainList);
-    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;unless-domain\&quot;:null}}]&quot;, ContentExtensions::ContentExtensionError::JSONInvalidDomainList);
-    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;unless-domain\&quot;:false}}]&quot;, ContentExtensions::ContentExtensionError::JSONInvalidDomainList);
</del><ins>+    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;if-domain\&quot;:\&quot;a\&quot;}}]&quot;, ContentExtensions::ContentExtensionError::JSONInvalidConditionList);
+    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;if-domain\&quot;:false}}]&quot;, ContentExtensions::ContentExtensionError::JSONInvalidConditionList);
+    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;if-domain\&quot;:null}}]&quot;, ContentExtensions::ContentExtensionError::JSONInvalidConditionList);
+    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;unless-domain\&quot;:{}}}]&quot;, ContentExtensions::ContentExtensionError::JSONInvalidConditionList);
+    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;unless-domain\&quot;:[5]}}]&quot;, ContentExtensions::ContentExtensionError::JSONInvalidConditionList);
+    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;unless-domain\&quot;:[\&quot;\&quot;]}}]&quot;, ContentExtensions::ContentExtensionError::JSONInvalidConditionList);
+    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;unless-domain\&quot;:\&quot;a\&quot;}}]&quot;, ContentExtensions::ContentExtensionError::JSONInvalidConditionList);
+    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;unless-domain\&quot;:null}}]&quot;, ContentExtensions::ContentExtensionError::JSONInvalidConditionList);
+    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;unless-domain\&quot;:false}}]&quot;, ContentExtensions::ContentExtensionError::JSONInvalidConditionList);
</ins><span class="cx">     checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;unless-domain\&quot;:[\&quot;A\&quot;]}}]&quot;, ContentExtensions::ContentExtensionError::JSONDomainNotLowerCaseASCII);
</span><span class="cx">     checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;unless-domain\&quot;:[\&quot;\\u00DC\&quot;]}}]&quot;, ContentExtensions::ContentExtensionError::JSONDomainNotLowerCaseASCII);
</span><span class="cx">     checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;unless-domain\&quot;:[\&quot;0\&quot;]}}]&quot;, { });
</span><span class="cx">     checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;unless-domain\&quot;:[\&quot;a\&quot;]}}]&quot;, { });
</span><span class="cx"> 
</span><del>-    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;if-domain\&quot;:[],\&quot;unless-domain\&quot;:[\&quot;a\&quot;]}}]&quot;, ContentExtensions::ContentExtensionError::JSONInvalidDomainList);
-    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;unless-domain\&quot;:[]}}]&quot;, ContentExtensions::ContentExtensionError::JSONInvalidDomainList);
-    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;if-domain\&quot;:5}}]&quot;, ContentExtensions::ContentExtensionError::JSONInvalidDomainList);
-    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;unless-domain\&quot;:5}}]&quot;, ContentExtensions::ContentExtensionError::JSONInvalidDomainList);
-    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;if-domain\&quot;:5,\&quot;unless-domain\&quot;:5}}]&quot;, ContentExtensions::ContentExtensionError::JSONInvalidDomainList);
-    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;if-domain\&quot;:[]}}]&quot;, ContentExtensions::ContentExtensionError::JSONInvalidDomainList);
-    
-    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;if-domain\&quot;:[\&quot;a\&quot;],\&quot;unless-domain\&quot;:[]}}]&quot;, ContentExtensions::ContentExtensionError::JSONUnlessAndIfDomain);
-    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;if-domain\&quot;:[\&quot;a\&quot;],\&quot;unless-domain\&quot;:[\&quot;a\&quot;]}}]&quot;, ContentExtensions::ContentExtensionError::JSONUnlessAndIfDomain);
</del><ins>+    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;if-domain\&quot;:[],\&quot;unless-domain\&quot;:[\&quot;a\&quot;]}}]&quot;, ContentExtensions::ContentExtensionError::JSONInvalidConditionList);
+    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;unless-domain\&quot;:[]}}]&quot;, ContentExtensions::ContentExtensionError::JSONInvalidConditionList);
+    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;if-domain\&quot;:5}}]&quot;, ContentExtensions::ContentExtensionError::JSONInvalidConditionList);
+    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;unless-domain\&quot;:5}}]&quot;, ContentExtensions::ContentExtensionError::JSONInvalidConditionList);
+    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;if-domain\&quot;:5,\&quot;unless-domain\&quot;:5}}]&quot;, ContentExtensions::ContentExtensionError::JSONInvalidConditionList);
+    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;if-domain\&quot;:[]}}]&quot;, ContentExtensions::ContentExtensionError::JSONInvalidConditionList);
+    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;,\&quot;if-domain\&quot;:[\&quot;a\&quot;],\&quot;unless-domain\&quot;:[]}}]&quot;, ContentExtensions::ContentExtensionError::JSONMultipleConditions);
</ins><span class="cx"> 
</span><del>-    checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;block\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;, \&quot;unexpected-identifier-should-be-ignored\&quot;:5}}]&quot;, { });
-
</del><span class="cx">     checkCompilerError(&quot;[{\&quot;action\&quot;:5,\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;}}]&quot;,
</span><span class="cx">         ContentExtensions::ContentExtensionError::JSONInvalidAction);
</span><span class="cx">     checkCompilerError(&quot;[{\&quot;action\&quot;:{\&quot;type\&quot;:\&quot;invalid\&quot;},\&quot;trigger\&quot;:{\&quot;url-filter\&quot;:\&quot;webkit.org\&quot;}}]&quot;,
</span></span></pre>
</div>
</div>

</body>
</html>