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

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

Issue 180723006: Have ElementData::attributeItem() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase 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 | « Source/core/dom/DatasetDOMStringMap.cpp ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Element.h
diff --git a/Source/core/dom/Element.h b/Source/core/dom/Element.h
index 781d8f1c2c902f0888f0b3f642e2f65c55f5da87..ae6a107791e2c3a5fede2f8374814286d68913f1 100644
--- a/Source/core/dom/Element.h
+++ b/Source/core/dom/Element.h
@@ -157,7 +157,7 @@ public:
// before calling them. This is not a trivial getter and its return value should be cached for
// performance.
size_t attributeCount() const;
- const Attribute* attributeItem(unsigned index) const;
+ const Attribute& attributeItem(unsigned index) const;
const Attribute* getAttributeItem(const QualifiedName&) const;
size_t getAttributeItemIndex(const QualifiedName& name) const { return elementData()->getAttributeItemIndex(name); }
size_t getAttributeItemIndex(const AtomicString& name, bool shouldIgnoreAttributeCase) const { return elementData()->getAttributeItemIndex(name, shouldIgnoreAttributeCase); }
@@ -767,7 +767,7 @@ inline size_t Element::attributeCount() const
return elementData()->length();
}
-inline const Attribute* Element::attributeItem(unsigned index) const
+inline const Attribute& Element::attributeItem(unsigned index) const
{
ASSERT(elementData());
return elementData()->attributeItem(index);
« no previous file with comments | « Source/core/dom/DatasetDOMStringMap.cpp ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698