Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: compiled/Filter.cpp

Issue 29383799: Issue 4988 - [emscripten] Adjust API for Element Hiding Emulation filters (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore
Patch Set: Created March 14, 2017, 2:42 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: compiled/Filter.cpp
===================================================================
--- a/compiled/Filter.cpp
+++ b/compiled/Filter.cpp
@@ -2,17 +2,17 @@
#include "CommentFilter.h"
#include "InvalidFilter.h"
#include "RegExpFilter.h"
#include "BlockingFilter.h"
#include "WhitelistFilter.h"
#include "ElemHideBase.h"
#include "ElemHideFilter.h"
#include "ElemHideException.h"
-#include "CSSPropertyFilter.h"
+#include "ElemHideEmulationFilter.h"
#include "StringMap.h"
namespace
{
StringMap<Filter*> knownFilters(8192);
void NormalizeWhitespace(DependentString& text)
{
@@ -118,20 +118,20 @@ Filter* Filter::FromText(DependentString
filter = new WhitelistFilter(text, data.regexp);
break;
case Filter::Type::ELEMHIDE:
filter = new ElemHideFilter(text, data.elemhide);
break;
case Filter::Type::ELEMHIDEEXCEPTION:
filter = new ElemHideException(text, data.elemhide);
break;
- case Filter::Type::CSSPROPERTY:
- filter = new CSSPropertyFilter(text, data.elemhide);
- if (static_cast<CSSPropertyFilter*>(filter.get())->IsGeneric())
- filter = new InvalidFilter(text, u"filter_cssproperty_nodomain"_str);
+ case Filter::Type::ELEMHIDEEMULATION:
+ filter = new ElemHideEmulationFilter(text, data.elemhide);
+ if (static_cast<ElemHideEmulationFilter*>(filter.get())->IsGeneric())
+ filter = new InvalidFilter(text, u"filter_elemhideemulation_nodomain"_str);
break;
default:
// This should never happen but just in case
return nullptr;
}
// This is a hack: we looked up the entry using text but create it using
// filter->mText. This works because both are equal at this point. However,

Powered by Google App Engine
This is Rietveld