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

Side by Side Diff: third_party/WebKit/Source/core/dom/UserActionElementSet.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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Neither the name of Google Inc. nor the names of its 10 * * Neither the name of Google Inc. nor the names of its
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 inline void UserActionElementSet::setFlags(Element* element, unsigned flags) { 92 inline void UserActionElementSet::setFlags(Element* element, unsigned flags) {
93 ElementFlagMap::iterator result = m_elements.find(element); 93 ElementFlagMap::iterator result = m_elements.find(element);
94 if (result != m_elements.end()) { 94 if (result != m_elements.end()) {
95 DCHECK(element->isUserActionElement()); 95 DCHECK(element->isUserActionElement());
96 result->value |= flags; 96 result->value |= flags;
97 return; 97 return;
98 } 98 }
99 99
100 element->setUserActionElement(true); 100 element->setUserActionElement(true);
101 m_elements.add(element, flags); 101 m_elements.insert(element, flags);
102 } 102 }
103 103
104 DEFINE_TRACE(UserActionElementSet) { 104 DEFINE_TRACE(UserActionElementSet) {
105 visitor->trace(m_elements); 105 visitor->trace(m_elements);
106 } 106 }
107 107
108 } // namespace blink 108 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698