Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(508)

Unified Diff: Source/core/css/RuleFeature.cpp

Issue 172993002: Removed O(n!) traversal of selectors for selectorList. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/RuleFeature.cpp
diff --git a/Source/core/css/RuleFeature.cpp b/Source/core/css/RuleFeature.cpp
index 1395acf0e6f59aca9dfcef749802b97bc3626a39..6d627baacf30c338159d4e2e5fc689f0ba902d00 100644
--- a/Source/core/css/RuleFeature.cpp
+++ b/Source/core/css/RuleFeature.cpp
@@ -211,10 +211,8 @@ void RuleFeatureSet::collectFeaturesFromSelectorList(const CSSSelectorList* sele
if (!selectorList)
return;
- for (const CSSSelector* selector = selectorList->first(); selector; selector = CSSSelectorList::next(*selector)) {
- for (const CSSSelector* subSelector = selector; subSelector; subSelector = subSelector->tagHistory())
- collectFeaturesFromSelector(*subSelector, metadata, collectionMode);
- }
+ for (const CSSSelector* selector = selectorList->first(); selector; selector = CSSSelectorList::next(*selector))
+ collectFeaturesFromSelector(*selector, metadata, collectionMode);
}
void RuleFeatureSet::FeatureMetadata::add(const FeatureMetadata& other)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698