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

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2657443005: Migrate WTF::HashSet::add() to ::insert() [part 1 of N] (Closed)
Patch Set: Created 3 years, 11 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
Index: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 230d3c9b6189a61b6fb0ae4ca0392faef892eaef..da5e6752a16732027fc1b61eefd3dd5003721fd2 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -541,7 +541,7 @@ Document::Document(const DocumentInit& initializer,
DCHECK(!parentDocument() || !parentDocument()->isContextSuspended());
#ifndef NDEBUG
- liveDocumentSet().add(this);
+ liveDocumentSet().insert(this);
#endif
}
@@ -2330,7 +2330,7 @@ void Document::setIsViewSource(bool isViewSource) {
}
void Document::scheduleUseShadowTreeUpdate(SVGUseElement& element) {
- m_useElementsNeedingUpdate.add(&element);
+ m_useElementsNeedingUpdate.insert(&element);
scheduleLayoutTreeUpdateIfNeeded();
}
@@ -4156,10 +4156,10 @@ static void liveNodeListBaseWriteBarrier(void* parent,
void Document::registerNodeList(const LiveNodeListBase* list) {
DCHECK(!m_nodeLists[list->invalidationType()].contains(list));
- m_nodeLists[list->invalidationType()].add(list);
+ m_nodeLists[list->invalidationType()].insert(list);
liveNodeListBaseWriteBarrier(this, list);
if (list->isRootedAtTreeScope())
- m_listsInvalidatedAtDocument.add(list);
+ m_listsInvalidatedAtDocument.insert(list);
}
void Document::unregisterNodeList(const LiveNodeListBase* list) {
@@ -4173,7 +4173,7 @@ void Document::unregisterNodeList(const LiveNodeListBase* list) {
void Document::registerNodeListWithIdNameCache(const LiveNodeListBase* list) {
DCHECK(!m_nodeLists[InvalidateOnIdNameAttrChange].contains(list));
- m_nodeLists[InvalidateOnIdNameAttrChange].add(list);
+ m_nodeLists[InvalidateOnIdNameAttrChange].insert(list);
liveNodeListBaseWriteBarrier(this, list);
}
@@ -4183,7 +4183,7 @@ void Document::unregisterNodeListWithIdNameCache(const LiveNodeListBase* list) {
}
void Document::attachNodeIterator(NodeIterator* ni) {
- m_nodeIterators.add(ni);
+ m_nodeIterators.insert(ni);
}
void Document::detachNodeIterator(NodeIterator* ni) {
@@ -4415,7 +4415,7 @@ void Document::runExecutionContextTask(
void Document::registerEventFactory(
std::unique_ptr<EventFactoryBase> eventFactory) {
DCHECK(!eventFactories().contains(eventFactory.get()));
- eventFactories().add(std::move(eventFactory));
+ eventFactories().insert(std::move(eventFactory));
}
Event* Document::createEvent(ExecutionContext* executionContext,
@@ -5622,7 +5622,7 @@ void Document::updateFocusAppearanceTimerFired(TimerBase*) {
void Document::attachRange(Range* range) {
DCHECK(!m_ranges.contains(range));
- m_ranges.add(range);
+ m_ranges.insert(range);
}
void Document::detachRange(Range* range) {
« no previous file with comments | « third_party/WebKit/Source/core/dom/CSSSelectorWatch.cpp ('k') | third_party/WebKit/Source/core/dom/DocumentParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698