Index: Source/core/css/SelectorChecker.cpp |
diff --git a/Source/core/css/SelectorChecker.cpp b/Source/core/css/SelectorChecker.cpp |
index 015bda730c7d0c8e77308efb4a7501bc624a78f0..8f8b1c845bc35570498fd1168b272a0016998921 100644 |
--- a/Source/core/css/SelectorChecker.cpp |
+++ b/Source/core/css/SelectorChecker.cpp |
@@ -500,9 +500,10 @@ static bool anyAttributeMatches(Element& element, CSSSelector::Match match, cons |
const AtomicString& selectorValue = selector.value(); |
- unsigned attributeCount = element.attributeCount(); |
- for (size_t i = 0; i < attributeCount; ++i) { |
- const Attribute& attributeItem = element.attributeItem(i); |
+ AttributeIteratorAccessor attributes = element.attributesIterator(); |
+ AttributeConstIterator end = attributes.end(); |
+ for (AttributeConstIterator it = attributes.begin(); it != end; ++it) { |
+ const Attribute& attributeItem = **it; |
if (!attributeItem.matches(selectorAttr)) |
continue; |