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

Unified Diff: Source/core/dom/Element.h

Issue 298253009: Add iterator object to iterate efficiently over an Element's attributes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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
Index: Source/core/dom/Element.h
diff --git a/Source/core/dom/Element.h b/Source/core/dom/Element.h
index d5625111a087ff83edb211f7b05286c36dbbc153..5929c1f1531823010e44c48f381541461259cbf4 100644
--- a/Source/core/dom/Element.h
+++ b/Source/core/dom/Element.h
@@ -169,6 +169,7 @@ public:
// Internal methods that assume the existence of attribute storage, one should use hasAttributes()
// before calling them. This is not a trivial getter and its return value should be cached for
// performance.
+ AttributeIteratorAccessor attributesIterator() const { return elementData()->attributesIterator(); }
size_t attributeCount() const;
const Attribute& attributeItem(unsigned index) const;
const Attribute* getAttributeItem(const QualifiedName&) const;

Powered by Google App Engine
This is Rietveld 408576698