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

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

Issue 337753005: Make iterator for Element's attributes more lightweight (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Proper rebase Created 6 years, 6 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 | « Source/core/css/SelectorChecker.h ('k') | Source/core/dom/DatasetDOMStringMap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/SelectorChecker.cpp
diff --git a/Source/core/css/SelectorChecker.cpp b/Source/core/css/SelectorChecker.cpp
index 339598720ed3a329f9be3994a3242b79e71aa153..e7c45376513705b0193fa2276b5c57b308b6d3a1 100644
--- a/Source/core/css/SelectorChecker.cpp
+++ b/Source/core/css/SelectorChecker.cpp
@@ -499,10 +499,10 @@ static bool anyAttributeMatches(Element& element, CSSSelector::Match match, cons
const AtomicString& selectorValue = selector.value();
- AttributeIteratorAccessor attributes = element.attributesIterator();
- AttributeConstIterator end = attributes.end();
- for (AttributeConstIterator it = attributes.begin(); it != end; ++it) {
- const Attribute& attributeItem = **it;
+ AttributeCollection attributes = element.attributes();
+ AttributeCollection::const_iterator end = attributes.end();
+ for (AttributeCollection::const_iterator it = attributes.begin(); it != end; ++it) {
+ const Attribute& attributeItem = *it;
if (!attributeItem.matches(selectorAttr))
continue;
« no previous file with comments | « Source/core/css/SelectorChecker.h ('k') | Source/core/dom/DatasetDOMStringMap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698