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

Unified Diff: third_party/WebKit/Source/core/dom/AttributeCollection.h

Issue 1467143004: Remove AttributeCollection's findIndex(Attr*) by using QualifiedName (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | third_party/WebKit/Source/core/dom/Element.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/AttributeCollection.h
diff --git a/third_party/WebKit/Source/core/dom/AttributeCollection.h b/third_party/WebKit/Source/core/dom/AttributeCollection.h
index aa750bf5effe75ef750fd10816ae31568a35ac7c..7e5d7aa8a896d2eaf55864c2d929060023ffe005 100644
--- a/third_party/WebKit/Source/core/dom/AttributeCollection.h
+++ b/third_party/WebKit/Source/core/dom/AttributeCollection.h
@@ -33,7 +33,6 @@
#ifndef AttributeCollection_h
#define AttributeCollection_h
-#include "core/dom/Attr.h"
#include "core/dom/Attribute.h"
#include "wtf/Allocator.h"
#include "wtf/Vector.h"
@@ -68,7 +67,6 @@ public:
iterator find(const AtomicString& name, bool shouldIgnoreCase) const;
size_t findIndex(const QualifiedName&, bool shouldIgnoreCase = false) const;
size_t findIndex(const AtomicString& name, bool shouldIgnoreCase) const;
- size_t findIndex(Attr*) const;
protected:
size_t findSlowCase(const AtomicString& name, bool shouldIgnoreAttributeCase) const;
@@ -184,19 +182,6 @@ inline typename AttributeCollectionGeneric<Container, ContainerMemberType>::iter
}
template <typename Container, typename ContainerMemberType>
-size_t AttributeCollectionGeneric<Container, ContainerMemberType>::findIndex(Attr* attr) const
-{
- // This relies on the fact that Attr's QualifiedName == the Attribute's name.
- iterator end = this->end();
- unsigned index = 0;
- for (iterator it = begin(); it != end; ++it, ++index) {
- if (it->name() == attr->qualifiedName())
- return index;
- }
- return kNotFound;
-}
-
-template <typename Container, typename ContainerMemberType>
size_t AttributeCollectionGeneric<Container, ContainerMemberType>::findSlowCase(const AtomicString& name, bool shouldIgnoreAttributeCase) const
{
// Continue to checking case-insensitively and/or full namespaced names if necessary:
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698