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

Unified Diff: Source/core/dom/DatasetDOMStringMap.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.cpp ('k') | Source/core/dom/Element.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/DatasetDOMStringMap.cpp
diff --git a/Source/core/dom/DatasetDOMStringMap.cpp b/Source/core/dom/DatasetDOMStringMap.cpp
index 3ce3d85b57982dd82480c2cc90563499cb2e2b72..7db1bf2b2c40b973c38e5fb46d9c6e5e25550ab0 100644
--- a/Source/core/dom/DatasetDOMStringMap.cpp
+++ b/Source/core/dom/DatasetDOMStringMap.cpp
@@ -157,9 +157,9 @@ void DatasetDOMStringMap::getNames(Vector<String>& names)
if (!m_element->hasAttributes())
return;
- AttributeIteratorAccessor attributes = m_element->attributesIterator();
- AttributeConstIterator end = attributes.end();
- for (AttributeConstIterator it = attributes.begin(); it != end; ++it) {
+ AttributeCollection attributes = m_element->attributes();
+ AttributeCollection::const_iterator end = attributes.end();
+ for (AttributeCollection::const_iterator it = attributes.begin(); it != end; ++it) {
if (isValidAttributeName(it->localName()))
names.append(convertAttributeNameToPropertyName(it->localName()));
}
@@ -170,9 +170,9 @@ String DatasetDOMStringMap::item(const String& name)
if (!m_element->hasAttributes())
return String();
- AttributeIteratorAccessor attributes = m_element->attributesIterator();
- AttributeConstIterator end = attributes.end();
- for (AttributeConstIterator it = attributes.begin(); it != end; ++it) {
+ AttributeCollection attributes = m_element->attributes();
+ AttributeCollection::const_iterator end = attributes.end();
+ for (AttributeCollection::const_iterator it = attributes.begin(); it != end; ++it) {
if (propertyNameMatchesAttributeName(name, it->localName()))
return it->value();
}
@@ -185,9 +185,9 @@ bool DatasetDOMStringMap::contains(const String& name)
if (!m_element->hasAttributes())
return false;
- AttributeIteratorAccessor attributes = m_element->attributesIterator();
- AttributeConstIterator end = attributes.end();
- for (AttributeConstIterator it = attributes.begin(); it != end; ++it) {
+ AttributeCollection attributes = m_element->attributes();
+ AttributeCollection::const_iterator end = attributes.end();
+ for (AttributeCollection::const_iterator it = attributes.begin(); it != end; ++it) {
if (propertyNameMatchesAttributeName(name, it->localName()))
return true;
}
« no previous file with comments | « Source/core/css/SelectorChecker.cpp ('k') | Source/core/dom/Element.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698