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

Unified Diff: third_party/WebKit/Source/core/html/forms/RadioButtonGroupScope.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/html/forms/RadioButtonGroupScope.cpp
diff --git a/third_party/WebKit/Source/core/html/forms/RadioButtonGroupScope.cpp b/third_party/WebKit/Source/core/html/forms/RadioButtonGroupScope.cpp
index 0bf469de62bb93cc897b7be8b7948fbf02887670..354bbf7dd781eb30b1e165ac9c1857365eab2930 100644
--- a/third_party/WebKit/Source/core/html/forms/RadioButtonGroupScope.cpp
+++ b/third_party/WebKit/Source/core/html/forms/RadioButtonGroupScope.cpp
@@ -95,7 +95,7 @@ void RadioButtonGroup::updateRequiredButton(MemberKeyValue& it,
void RadioButtonGroup::add(HTMLInputElement* button) {
DCHECK_EQ(button->type(), InputTypeNames::radio);
- auto addResult = m_members.add(button, false);
+ auto addResult = m_members.insert(button, false);
if (!addResult.isNewEntry)
return;
bool groupWasValid = isValid();
@@ -214,7 +214,8 @@ void RadioButtonGroupScope::addButton(HTMLInputElement* element) {
if (!m_nameToGroupMap)
m_nameToGroupMap = new NameToGroupMap;
- auto keyValue = m_nameToGroupMap->add(element->name(), nullptr).storedValue;
+ auto keyValue =
+ m_nameToGroupMap->insert(element->name(), nullptr).storedValue;
if (!keyValue->value)
keyValue->value = RadioButtonGroup::create();
keyValue->value->add(element);
« no previous file with comments | « third_party/WebKit/Source/core/html/forms/InputType.cpp ('k') | third_party/WebKit/Source/core/html/imports/HTMLImport.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698