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

Unified Diff: Source/core/html/RadioNodeList.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/HTMLInputElement.cpp ('k') | Source/core/html/forms/CheckboxInputType.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/RadioNodeList.cpp
diff --git a/Source/core/html/RadioNodeList.cpp b/Source/core/html/RadioNodeList.cpp
index 644026d4dce7f1f5ffc8dbf71382d8c3fecd1eef..478de82f9b6488a39656040fa12a07ab77ef5d36 100644
--- a/Source/core/html/RadioNodeList.cpp
+++ b/Source/core/html/RadioNodeList.cpp
@@ -27,6 +27,7 @@
#include "core/html/RadioNodeList.h"
#include "core/HTMLNames.h"
+#include "core/InputTypeNames.h"
#include "core/dom/Element.h"
#include "core/dom/NodeRareData.h"
#include "core/html/HTMLFormElement.h"
@@ -56,7 +57,7 @@ static inline HTMLInputElement* toRadioButtonInputElement(Element& element)
if (!isHTMLInputElement(element))
return 0;
HTMLInputElement& inputElement = toHTMLInputElement(element);
- if (!inputElement.isRadioButton() || inputElement.value().isEmpty())
+ if (inputElement.type() != InputTypeNames::radio || inputElement.value().isEmpty())
return 0;
return &inputElement;
}
@@ -122,7 +123,7 @@ bool RadioNodeList::elementMatches(const Element& element) const
if (!isHTMLObjectElement(element) && !element.isFormControlElement())
return false;
- if (isHTMLInputElement(element) && toHTMLInputElement(element).isImageButton())
+ if (isHTMLInputElement(element) && toHTMLInputElement(element).type() == InputTypeNames::image)
return false;
return checkElementMatchesRadioNodeListFilter(element);
« no previous file with comments | « Source/core/html/HTMLInputElement.cpp ('k') | Source/core/html/forms/CheckboxInputType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698