| 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 73b2271d731cebd4f833f4079b97ce72129d74fe..75a93886b5cfb3fd8908f71393e3ba5ee66e5687 100644
|
| --- a/third_party/WebKit/Source/core/html/forms/RadioButtonGroupScope.cpp
|
| +++ b/third_party/WebKit/Source/core/html/forms/RadioButtonGroupScope.cpp
|
| @@ -21,11 +21,30 @@
|
| #include "core/html/forms/RadioButtonGroupScope.h"
|
|
|
| #include "core/InputTypeNames.h"
|
| +#include "core/frame/Deprecation.h"
|
| +#include "core/frame/FrameConsole.h"
|
| +#include "core/frame/LocalFrame.h"
|
| #include "core/html/HTMLInputElement.h"
|
| +#include "core/inspector/ConsoleMessage.h"
|
| #include "wtf/HashMap.h"
|
|
|
| namespace blink {
|
|
|
| +namespace {
|
| +
|
| +void addSingletonDeprecationMessage(const LocalFrame* frame,
|
| + UseCounter::Feature feature,
|
| + const AtomicString& name1,
|
| + const AtomicString& name2) {
|
| + if (!frame)
|
| + return;
|
| + frame->console().addSingletonMessage(ConsoleMessage::create(
|
| + DeprecationMessageSource, WarningMessageLevel,
|
| + Deprecation::deprecationMessage(feature) + " Comparing name=" + name1 +
|
| + " and name=" + name2));
|
| +}
|
| +}
|
| +
|
| class RadioButtonGroup : public GarbageCollected<RadioButtonGroup> {
|
| public:
|
| static RadioButtonGroup* create();
|
| @@ -218,15 +237,18 @@ void RadioButtonGroupScope::addButton(HTMLInputElement* element) {
|
| if (!keyValue->value) {
|
| keyValue->value = RadioButtonGroup::create();
|
| } else {
|
| - if (keyValue->key == element->name())
|
| + 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);
|
| + } else if (equalIgnoringASCIICase(keyValue->key, element->name())) {
|
| + addSingletonDeprecationMessage(element->document().frame(),
|
| + UseCounter::RadioNameMatchingASCIICaseless,
|
| + keyValue->key, element->name());
|
| + } else {
|
| + addSingletonDeprecationMessage(element->document().frame(),
|
| + UseCounter::RadioNameMatchingCaseFolding,
|
| + keyValue->key, element->name());
|
| + }
|
| }
|
| keyValue->value->add(element);
|
| }
|
|
|