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

Unified Diff: Source/core/dom/TreeScope.h

Issue 459203004: Have DocumentOrderedMap API deal with AtomicString type instead of StringImpl* (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 4 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 | « Source/core/dom/DocumentOrderedMap.cpp ('k') | Source/core/dom/TreeScope.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/TreeScope.h
diff --git a/Source/core/dom/TreeScope.h b/Source/core/dom/TreeScope.h
index f1714f6c7b161ffee677f864cb92c57cb4fa03b3..23dfcfb2c739b01d29e6814ff9f47c848383ed64 100644
--- a/Source/core/dom/TreeScope.h
+++ b/Source/core/dom/TreeScope.h
@@ -57,7 +57,7 @@ public:
Element* adjustedFocusedElement() const;
Element* getElementById(const AtomicString&) const;
const WillBeHeapVector<RawPtrWillBeMember<Element> >& getAllElementsById(const AtomicString&) const;
- bool hasElementWithId(StringImpl* id) const;
+ bool hasElementWithId(const AtomicString& id) const;
bool containsMultipleElementsWithId(const AtomicString& id) const;
void addElementById(const AtomicString& elementId, Element*);
void removeElementById(const AtomicString& elementId, Element*);
@@ -195,15 +195,15 @@ private:
mutable RefPtrWillBeMember<DOMSelection> m_selection;
};
-inline bool TreeScope::hasElementWithId(StringImpl* id) const
+inline bool TreeScope::hasElementWithId(const AtomicString& id) const
{
- ASSERT(id);
+ ASSERT(!id.isNull());
return m_elementsById && m_elementsById->contains(id);
}
inline bool TreeScope::containsMultipleElementsWithId(const AtomicString& id) const
{
- return m_elementsById && m_elementsById->containsMultiple(id.impl());
+ return m_elementsById && m_elementsById->containsMultiple(id);
}
DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(TreeScope)
« no previous file with comments | « Source/core/dom/DocumentOrderedMap.cpp ('k') | Source/core/dom/TreeScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698