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

Unified Diff: src/FilterEngine.cpp

Issue 23127017: Consider the frame structure in Matches() (Closed)
Patch Set: Created Oct. 29, 2013, 3:13 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: 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");
« no previous file with comments | « include/AdblockPlus/FilterEngine.h ('k') | test/FilterEngine.cpp » ('j') | test/FilterEngine.cpp » ('J')

Powered by Google App Engine
This is Rietveld