| 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 8742f4e2487a03e695dc56e1602a3bb7fbcf1c8f..8a9167c7ae27c6485a4b7458a24f49504c3fb583 100644
|
| --- a/third_party/WebKit/Source/core/html/forms/RadioButtonGroupScope.cpp
|
| +++ b/third_party/WebKit/Source/core/html/forms/RadioButtonGroupScope.cpp
|
| @@ -232,10 +232,18 @@ void RadioButtonGroupScope::addButton(HTMLInputElement* element)
|
| if (!m_nameToGroupMap)
|
| m_nameToGroupMap = new NameToGroupMap;
|
|
|
| - Member<RadioButtonGroup>& group = m_nameToGroupMap->add(element->name(), nullptr).storedValue->value;
|
| - if (!group)
|
| - group = RadioButtonGroup::create();
|
| - group->add(element);
|
| + auto keyValue = m_nameToGroupMap->add(element->name(), nullptr).storedValue;
|
| + if (!keyValue->value) {
|
| + keyValue->value = RadioButtonGroup::create();
|
| + } else {
|
| + if (keyValue->key == element->name())
|
| + UseCounter::count(element->document(), UseCounter::RadioNameMatchingStrict);
|
| + else if (equalIgnoringASCIICase(keyValue->key, element->name()))
|
| + UseCounter::count(element->document(), UseCounter::RadioNameMatchingASCIICaseless);
|
| + else
|
| + UseCounter::count(element->document(), UseCounter::RadioNameMatchingCaseFolding);
|
| + }
|
| + keyValue->value->add(element);
|
| }
|
|
|
| void RadioButtonGroupScope::updateCheckedState(HTMLInputElement* element)
|
|
|