| Index: src/FilterEngine.cpp |
| =================================================================== |
| --- a/src/FilterEngine.cpp |
| +++ b/src/FilterEngine.cpp |
| @@ -227,6 +227,20 @@ |
| return FilterPtr(); |
| } |
| +AdblockPlus::FilterPtr FilterEngine::Matches(const std::string& url, |
| + const std::string& contentType, |
| + const std::vector<std::string>& documentUrls) const |
| +{ |
| + AdblockPlus::FilterPtr match; |
| + for (std::vector<std::string>::const_iterator it = documentUrls.begin(); |
| + it != documentUrls.end(); it++) { |
| + match = Matches(url, contentType, *it); |
| + if (!match || match->GetType() == AdblockPlus::Filter::TYPE_EXCEPTION) |
| + return match; |
| + } |
|
Wladimir Palant
2013/10/30 07:39:56
No, this approach is wrong - and it seems that we
Felix Dahlke
2013/11/03 03:51:15
I was actually wondering about this after seeing p
|
| + return match; |
| +} |
| + |
| std::vector<std::string> FilterEngine::GetElementHidingSelectors(const std::string& domain) const |
| { |
| JsValuePtr func = jsEngine->Evaluate("API.getElementHidingSelectors"); |