Index: Source/core/dom/DocumentOrderedMap.h |
diff --git a/Source/core/dom/DocumentOrderedMap.h b/Source/core/dom/DocumentOrderedMap.h |
index a0aa1b2533815e0cbd8706f86cc337207bfef07a..b843a2430641f2e89dba820545537120b3a86805 100644 |
--- a/Source/core/dom/DocumentOrderedMap.h |
+++ b/Source/core/dom/DocumentOrderedMap.h |
@@ -34,6 +34,7 @@ |
#include "platform/heap/Handle.h" |
#include "wtf/Forward.h" |
#include "wtf/HashMap.h" |
+#include "wtf/text/AtomicString.h" |
#include "wtf/text/StringImpl.h" |
namespace blink { |
@@ -44,22 +45,23 @@ class TreeScope; |
class DocumentOrderedMap : public NoBaseWillBeGarbageCollected<DocumentOrderedMap> { |
public: |
static PassOwnPtrWillBeRawPtr<DocumentOrderedMap> create(); |
- void add(StringImpl*, Element*); |
- void remove(StringImpl*, Element*); |
+ void add(const AtomicString&, Element*); |
+ void remove(const AtomicString&, Element*); |
- bool contains(StringImpl*) const; |
- bool containsMultiple(StringImpl*) const; |
+ bool contains(const AtomicString&) const; |
+ bool containsMultiple(const AtomicString&) const; |
// concrete instantiations of the get<>() method template |
- Element* getElementById(StringImpl*, const TreeScope*) const; |
- const WillBeHeapVector<RawPtrWillBeMember<Element> >& getAllElementsById(StringImpl*, const TreeScope*) const; |
- Element* getElementByMapName(StringImpl*, const TreeScope*) const; |
- Element* getElementByLowercasedMapName(StringImpl*, const TreeScope*) const; |
- Element* getElementByLabelForAttribute(StringImpl*, const TreeScope*) const; |
+ Element* getElementById(const AtomicString&, const TreeScope*) const; |
+ const WillBeHeapVector<RawPtrWillBeMember<Element> >& getAllElementsById(const AtomicString&, const TreeScope*) const; |
+ Element* getElementByMapName(const AtomicString&, const TreeScope*) const; |
+ Element* getElementByLowercasedMapName(const AtomicString&, const TreeScope*) const; |
+ Element* getElementByLabelForAttribute(const AtomicString&, const TreeScope*) const; |
void trace(Visitor*); |
private: |
- template<bool keyMatches(StringImpl*, Element&)> Element* get(StringImpl*, const TreeScope*) const; |
+ template<bool keyMatches(const AtomicString&, const Element&)> |
+ Element* get(const AtomicString&, const TreeScope*) const; |
class MapEntry : public NoBaseWillBeGarbageCollected<MapEntry> { |
public: |
@@ -81,14 +83,14 @@ private: |
mutable Map m_map; |
}; |
-inline bool DocumentOrderedMap::contains(StringImpl* id) const |
+inline bool DocumentOrderedMap::contains(const AtomicString& id) const |
{ |
- return m_map.contains(id); |
+ return m_map.contains(id.impl()); |
} |
-inline bool DocumentOrderedMap::containsMultiple(StringImpl* id) const |
+inline bool DocumentOrderedMap::containsMultiple(const AtomicString& id) const |
{ |
- Map::const_iterator it = m_map.find(id); |
+ Map::const_iterator it = m_map.find(id.impl()); |
return it != m_map.end() && it->value->count > 1; |
} |