| Index: trunk/Source/core/dom/DocumentOrderedMap.h
|
| ===================================================================
|
| --- trunk/Source/core/dom/DocumentOrderedMap.h (revision 153372)
|
| +++ trunk/Source/core/dom/DocumentOrderedMap.h (working copy)
|
| @@ -31,9 +31,9 @@
|
| #ifndef DocumentOrderedMap_h
|
| #define DocumentOrderedMap_h
|
|
|
| -#include "wtf/HashCountedSet.h"
|
| -#include "wtf/HashMap.h"
|
| -#include "wtf/text/StringImpl.h"
|
| +#include <wtf/HashCountedSet.h>
|
| +#include <wtf/HashMap.h>
|
| +#include <wtf/text/AtomicStringImpl.h>
|
|
|
| namespace WebCore {
|
|
|
| @@ -42,40 +42,40 @@
|
|
|
| class DocumentOrderedMap {
|
| public:
|
| - void add(StringImpl*, Element*);
|
| - void remove(StringImpl*, Element*);
|
| + void add(AtomicStringImpl*, Element*);
|
| + void remove(AtomicStringImpl*, Element*);
|
| void clear();
|
|
|
| - bool contains(StringImpl*) const;
|
| - bool containsMultiple(StringImpl*) const;
|
| + bool contains(AtomicStringImpl*) const;
|
| + bool containsMultiple(AtomicStringImpl*) const;
|
| // concrete instantiations of the get<>() method template
|
| - Element* getElementById(StringImpl*, const TreeScope*) const;
|
| - Element* getElementByMapName(StringImpl*, const TreeScope*) const;
|
| - Element* getElementByLowercasedMapName(StringImpl*, const TreeScope*) const;
|
| - Element* getElementByLabelForAttribute(StringImpl*, const TreeScope*) const;
|
| + Element* getElementById(AtomicStringImpl*, const TreeScope*) const;
|
| + Element* getElementByMapName(AtomicStringImpl*, const TreeScope*) const;
|
| + Element* getElementByLowercasedMapName(AtomicStringImpl*, const TreeScope*) const;
|
| + Element* getElementByLabelForAttribute(AtomicStringImpl*, const TreeScope*) const;
|
|
|
| void checkConsistency() const;
|
|
|
| void reportMemoryUsage(MemoryObjectInfo*) const;
|
|
|
| private:
|
| - template<bool keyMatches(StringImpl*, Element*)> Element* get(StringImpl*, const TreeScope*) const;
|
| + template<bool keyMatches(AtomicStringImpl*, Element*)> Element* get(AtomicStringImpl*, const TreeScope*) const;
|
|
|
| - typedef HashMap<StringImpl*, Element*> Map;
|
| + typedef HashMap<AtomicStringImpl*, Element*> Map;
|
|
|
| // We maintain the invariant that m_duplicateCounts is the count of all elements with a given key
|
| // excluding the one referenced in m_map, if any. This means it one less than the total count
|
| // when the first node with a given key is cached, otherwise the same as the total count.
|
| mutable Map m_map;
|
| - mutable HashCountedSet<StringImpl*> m_duplicateCounts;
|
| + mutable HashCountedSet<AtomicStringImpl*> m_duplicateCounts;
|
| };
|
|
|
| -inline bool DocumentOrderedMap::contains(StringImpl* id) const
|
| +inline bool DocumentOrderedMap::contains(AtomicStringImpl* id) const
|
| {
|
| return m_map.contains(id) || m_duplicateCounts.contains(id);
|
| }
|
|
|
| -inline bool DocumentOrderedMap::containsMultiple(StringImpl* id) const
|
| +inline bool DocumentOrderedMap::containsMultiple(AtomicStringImpl* id) const
|
| {
|
| return m_duplicateCounts.contains(id);
|
| }
|
|
|
| Property changes on: trunk/Source/core/dom/DocumentOrderedMap.h
|
| ___________________________________________________________________
|
| Modified: svn:eol-style
|
| - LF
|
| + native
|
|
|
|
|