Chromium Code Reviews| Index: Source/core/dom/Element.h |
| diff --git a/Source/core/dom/Element.h b/Source/core/dom/Element.h |
| index 7b075ce8638b2e631f36a5c5516def6a933f2a61..dbc7db154358edfb55c018a52aa70a0c2a9cfce6 100644 |
| --- a/Source/core/dom/Element.h |
| +++ b/Source/core/dom/Element.h |
| @@ -87,7 +87,7 @@ public: |
| const Attribute* attributeItem(unsigned index) const; |
| const Attribute* getAttributeItem(const QualifiedName&) const; |
| - size_t getAttributeItemIndex(const QualifiedName&) const; |
| + size_t getAttributeItemIndex(const QualifiedName&, bool shouldIgnoreAttributeCase = false) const; |
| size_t getAttributeItemIndex(const AtomicString& name, bool shouldIgnoreAttributeCase) const; |
| size_t getAttrIndex(Attr*) const; |
| @@ -1037,12 +1037,12 @@ inline const Attribute* ElementData::attributeBase() const |
| return static_cast<const ShareableElementData*>(this)->m_attributeArray; |
| } |
| -inline size_t ElementData::getAttributeItemIndex(const QualifiedName& name) const |
| +inline size_t ElementData::getAttributeItemIndex(const QualifiedName& name, bool shouldIgnoreAttributeCase) const |
|
esprehn
2013/08/14 06:52:57
shouldIgnoreCase, you already know it's attribute
|
| { |
| const Attribute* begin = attributeBase(); |
| for (unsigned i = 0; i < length(); ++i) { |
| const Attribute& attribute = begin[i]; |
| - if (attribute.name().matches(name)) |
| + if (attribute.name().matchesIgnoringCaseForLocalName(name, shouldIgnoreAttributeCase)) |
|
esprehn
2013/08/14 06:52:57
The method name is weird since it doesn't really i
|
| return i; |
| } |
| return notFound; |