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

Unified Diff: Source/core/html/forms/RadioButtonGroupScope.cpp

Issue 557613002: Remove a part of type checking predicates of HTMLInputElement. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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
« no previous file with comments | « Source/core/html/forms/PasswordInputType.cpp ('k') | Source/core/html/forms/RadioInputType.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/forms/RadioButtonGroupScope.cpp
diff --git a/Source/core/html/forms/RadioButtonGroupScope.cpp b/Source/core/html/forms/RadioButtonGroupScope.cpp
index 63e3a4a8e3aa609e936834c2c09eb12592720386..4da751288a3d7de03bcd544c46164616f42d5477 100644
--- a/Source/core/html/forms/RadioButtonGroupScope.cpp
+++ b/Source/core/html/forms/RadioButtonGroupScope.cpp
@@ -21,6 +21,7 @@
#include "config.h"
#include "core/html/forms/RadioButtonGroupScope.h"
+#include "core/InputTypeNames.h"
#include "core/html/HTMLInputElement.h"
#include "wtf/HashSet.h"
@@ -80,7 +81,7 @@ void RadioButtonGroup::setCheckedButton(HTMLInputElement* button)
void RadioButtonGroup::add(HTMLInputElement* button)
{
- ASSERT(button->isRadioButton());
+ ASSERT(button->type() == InputTypeNames::radio);
if (!m_members.add(button).isNewEntry)
return;
bool groupWasValid = isValid();
@@ -101,7 +102,7 @@ void RadioButtonGroup::add(HTMLInputElement* button)
void RadioButtonGroup::updateCheckedState(HTMLInputElement* button)
{
- ASSERT(button->isRadioButton());
+ ASSERT(button->type() == InputTypeNames::radio);
ASSERT(m_members.contains(button));
bool wasValid = isValid();
if (button->checked()) {
@@ -121,7 +122,7 @@ void RadioButtonGroup::updateCheckedState(HTMLInputElement* button)
void RadioButtonGroup::requiredAttributeChanged(HTMLInputElement* button)
{
- ASSERT(button->isRadioButton());
+ ASSERT(button->type() == InputTypeNames::radio);
ASSERT(m_members.contains(button));
bool wasValid = isValid();
if (button->isRequired()) {
@@ -136,7 +137,7 @@ void RadioButtonGroup::requiredAttributeChanged(HTMLInputElement* button)
void RadioButtonGroup::remove(HTMLInputElement* button)
{
- ASSERT(button->isRadioButton());
+ ASSERT(button->type() == InputTypeNames::radio);
WillBeHeapHashSet<RawPtrWillBeMember<HTMLInputElement> >::iterator it = m_members.find(button);
if (it == m_members.end())
return;
@@ -168,7 +169,7 @@ void RadioButtonGroup::setNeedsValidityCheckForAllButtons()
Iterator end = m_members.end();
for (Iterator it = m_members.begin(); it != end; ++it) {
HTMLInputElement* button = *it;
- ASSERT(button->isRadioButton());
+ ASSERT(button->type() == InputTypeNames::radio);
button->setNeedsValidityCheck();
}
}
@@ -201,7 +202,7 @@ RadioButtonGroupScope::~RadioButtonGroupScope()
void RadioButtonGroupScope::addButton(HTMLInputElement* element)
{
- ASSERT(element->isRadioButton());
+ ASSERT(element->type() == InputTypeNames::radio);
if (element->name().isEmpty())
return;
@@ -216,7 +217,7 @@ void RadioButtonGroupScope::addButton(HTMLInputElement* element)
void RadioButtonGroupScope::updateCheckedState(HTMLInputElement* element)
{
- ASSERT(element->isRadioButton());
+ ASSERT(element->type() == InputTypeNames::radio);
if (element->name().isEmpty())
return;
ASSERT(m_nameToGroupMap);
@@ -229,7 +230,7 @@ void RadioButtonGroupScope::updateCheckedState(HTMLInputElement* element)
void RadioButtonGroupScope::requiredAttributeChanged(HTMLInputElement* element)
{
- ASSERT(element->isRadioButton());
+ ASSERT(element->type() == InputTypeNames::radio);
if (element->name().isEmpty())
return;
ASSERT(m_nameToGroupMap);
@@ -250,7 +251,7 @@ HTMLInputElement* RadioButtonGroupScope::checkedButtonForGroup(const AtomicStrin
bool RadioButtonGroupScope::isInRequiredGroup(HTMLInputElement* element) const
{
- ASSERT(element->isRadioButton());
+ ASSERT(element->type() == InputTypeNames::radio);
if (element->name().isEmpty())
return false;
if (!m_nameToGroupMap)
@@ -261,7 +262,7 @@ bool RadioButtonGroupScope::isInRequiredGroup(HTMLInputElement* element) const
void RadioButtonGroupScope::removeButton(HTMLInputElement* element)
{
- ASSERT(element->isRadioButton());
+ ASSERT(element->type() == InputTypeNames::radio);
if (element->name().isEmpty())
return;
if (!m_nameToGroupMap)
« no previous file with comments | « Source/core/html/forms/PasswordInputType.cpp ('k') | Source/core/html/forms/RadioInputType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698