Title: [182265] trunk/Source/WebCore
- Revision
- 182265
- Author
- achristen...@apple.com
- Date
- 2015-04-01 17:16:36 -0700 (Wed, 01 Apr 2015)
Log Message
[Content Extensions] Only add unique universal action locations.
https://bugs.webkit.org/show_bug.cgi?id=143325
Reviewed by Benjamin Poulain.
* contentextensions/ContentExtensionCompiler.cpp:
(WebCore::ContentExtensions::compileRuleList):
Use a HashSet instead of a Vector for the universal action locations to remove duplicates.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (182264 => 182265)
--- trunk/Source/WebCore/ChangeLog 2015-04-01 23:59:09 UTC (rev 182264)
+++ trunk/Source/WebCore/ChangeLog 2015-04-02 00:16:36 UTC (rev 182265)
@@ -1,3 +1,14 @@
+2015-04-01 Alex Christensen <achristen...@webkit.org>
+
+ [Content Extensions] Only add unique universal action locations.
+ https://bugs.webkit.org/show_bug.cgi?id=143325
+
+ Reviewed by Benjamin Poulain.
+
+ * contentextensions/ContentExtensionCompiler.cpp:
+ (WebCore::ContentExtensions::compileRuleList):
+ Use a HashSet instead of a Vector for the universal action locations to remove duplicates.
+
2015-04-01 Roger Fong <roger_f...@apple.com>
Fixes to material of inline media controls on OSX.
Modified: trunk/Source/WebCore/contentextensions/ContentExtensionCompiler.cpp (182264 => 182265)
--- trunk/Source/WebCore/contentextensions/ContentExtensionCompiler.cpp 2015-04-01 23:59:09 UTC (rev 182264)
+++ trunk/Source/WebCore/contentextensions/ContentExtensionCompiler.cpp 2015-04-02 00:16:36 UTC (rev 182265)
@@ -133,7 +133,7 @@
Vector<SerializedActionByte> actions;
Vector<unsigned> actionLocations = serializeActions(parsedRuleList, actions);
- Vector<uint64_t> universalActionLocations;
+ HashSet<uint64_t> universalActionLocations;
CombinedURLFilters combinedURLFilters;
URLFilterParser urlFilterParser(combinedURLFilters);
@@ -148,10 +148,9 @@
URLFilterParser::ParseStatus status = urlFilterParser.addPattern(trigger.urlFilter, trigger.urlFilterIsCaseSensitive, actionLocationAndFlags);
if (status == URLFilterParser::MatchesEverything) {
-
if (ignorePreviousRulesSeen)
return ContentExtensionError::RegexMatchesEverythingAfterIgnorePreviousRules;
- universalActionLocations.append(actionLocationAndFlags);
+ universalActionLocations.add(actionLocationAndFlags);
}
if (status != URLFilterParser::Ok && status != URLFilterParser::MatchesEverything) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes