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

Unified Diff: third_party/WebKit/Source/core/events/EventPath.cpp

Issue 2671933002: Migrate WTF::HashMap::add() to ::insert() (Closed)
Patch Set: rebase, add TODOs Created 3 years, 10 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/events/EventPath.cpp
diff --git a/third_party/WebKit/Source/core/events/EventPath.cpp b/third_party/WebKit/Source/core/events/EventPath.cpp
index b07a95bb5435913248f2b91aadb12a470f5d634b..1d6dd0e5c4d80c779ec9d808be85eb6464fb29c5 100644
--- a/third_party/WebKit/Source/core/events/EventPath.cpp
+++ b/third_party/WebKit/Source/core/events/EventPath.cpp
@@ -174,8 +174,8 @@ void EventPath::calculateTreeOrderAndSetNearestAncestorClosedTree() {
HeapHashMap<Member<const TreeScope>, Member<TreeScopeEventContext>>
treeScopeEventContextMap;
for (const auto& treeScopeEventContext : m_treeScopeEventContexts)
- treeScopeEventContextMap.add(&treeScopeEventContext->treeScope(),
- treeScopeEventContext.get());
+ treeScopeEventContextMap.insert(&treeScopeEventContext->treeScope(),
+ treeScopeEventContext.get());
TreeScopeEventContext* rootTree = nullptr;
for (const auto& treeScopeEventContext : m_treeScopeEventContexts) {
// Use olderShadowRootOrParentTreeScope here for parent-child relationships.
@@ -208,7 +208,7 @@ TreeScopeEventContext* EventPath::ensureTreeScopeEventContext(
bool isNewEntry;
{
TreeScopeEventContextMap::AddResult addResult =
- treeScopeEventContextMap.add(treeScope, nullptr);
+ treeScopeEventContextMap.insert(treeScope, nullptr);
isNewEntry = addResult.isNewEntry;
if (isNewEntry)
addResult.storedValue->value = TreeScopeEventContext::create(*treeScope);
@@ -260,8 +260,8 @@ void EventPath::buildRelatedNodeMap(const Node& relatedNode,
new EventPath(const_cast<Node&>(relatedNode));
for (const auto& treeScopeEventContext :
relatedTargetEventPath->m_treeScopeEventContexts) {
- relatedTargetMap.add(&treeScopeEventContext->treeScope(),
- treeScopeEventContext->target());
+ relatedTargetMap.insert(&treeScopeEventContext->treeScope(),
+ treeScopeEventContext->target());
}
// Oilpan: It is important to explicitly clear the vectors to reuse
// the memory in subsequent event dispatchings.
@@ -283,7 +283,7 @@ EventTarget* EventPath::findRelatedNode(TreeScope& scope,
}
DCHECK(relatedNode);
for (const auto& entry : parentTreeScopes)
- relatedTargetMap.add(entry, relatedNode);
+ relatedTargetMap.insert(entry, relatedNode);
return relatedNode;
}

Powered by Google App Engine
This is Rietveld 408576698