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

Unified Diff: Source/web/WebSearchableFormData.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/web/WebInputElement.cpp ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebSearchableFormData.cpp
diff --git a/Source/web/WebSearchableFormData.cpp b/Source/web/WebSearchableFormData.cpp
index 262a846c507302c2137346d738f57f7d6183a1e4..5d92bda91372d10e3b10fa39270b973b8f45f6d8 100644
--- a/Source/web/WebSearchableFormData.cpp
+++ b/Source/web/WebSearchableFormData.cpp
@@ -32,6 +32,7 @@
#include "public/web/WebSearchableFormData.h"
#include "core/HTMLNames.h"
+#include "core/InputTypeNames.h"
#include "core/dom/Document.h"
#include "core/html/FormDataList.h"
#include "core/html/HTMLFormControlElement.h"
@@ -139,7 +140,7 @@ bool IsInDefaultState(HTMLFormControlElement* formElement)
ASSERT(formElement);
if (isHTMLInputElement(*formElement)) {
const HTMLInputElement& inputElement = toHTMLInputElement(*formElement);
- if (inputElement.isCheckbox() || inputElement.isRadioButton())
+ if (inputElement.type() == InputTypeNames::checkbox || inputElement.type() == InputTypeNames::radio)
return inputElement.checked() == inputElement.hasAttribute(checkedAttr);
} else if (isHTMLSelectElement(*formElement)) {
return IsSelectInDefaultState(toHTMLSelectElement(formElement));
@@ -173,7 +174,7 @@ HTMLInputElement* findSuitableSearchInputElement(const HTMLFormElement* form)
const HTMLInputElement& input = toHTMLInputElement(*control);
// Return nothing if a file upload field or a password field are found.
- if (input.isFileUpload() || input.isPasswordField())
+ if (input.type() == InputTypeNames::file || input.type() == InputTypeNames::password)
return 0;
if (input.isTextField()) {
« no previous file with comments | « Source/web/WebInputElement.cpp ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698