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

Unified Diff: trunk/Source/core/dom/DocumentOrderedMap.h

Issue 18196004: Revert 153294 "Remove AtomicStringImpl." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 7 years, 6 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 | « trunk/Source/core/dom/CheckedRadioButtons.cpp ('k') | trunk/Source/core/dom/DocumentOrderedMap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « trunk/Source/core/dom/CheckedRadioButtons.cpp ('k') | trunk/Source/core/dom/DocumentOrderedMap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698