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

Unified Diff: Source/web/WebViewImpl.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/WebSearchableFormData.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index d75a53f820a1818d8b1cfdbae79634a2664b04a4..0e2de37b9bb12cb297abc63e53ec573e77d0b3c0 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -33,6 +33,7 @@
#include "core/CSSValueKeywords.h"
#include "core/HTMLNames.h"
+#include "core/InputTypeNames.h"
#include "core/accessibility/AXObjectCache.h"
#include "core/clipboard/DataObject.h"
#include "core/dom/Document.h"
@@ -2240,33 +2241,34 @@ WebTextInputType WebViewImpl::textInputType()
if (isHTMLInputElement(*element)) {
HTMLInputElement& input = toHTMLInputElement(*element);
+ const AtomicString& type = input.type();
if (input.isDisabledOrReadOnly())
return WebTextInputTypeNone;
- if (input.isPasswordField())
+ if (type == InputTypeNames::password)
return WebTextInputTypePassword;
- if (input.isSearchField())
+ if (type == InputTypeNames::search)
return WebTextInputTypeSearch;
- if (input.isEmailField())
+ if (type == InputTypeNames::email)
return WebTextInputTypeEmail;
- if (input.isNumberField())
+ if (type == InputTypeNames::number)
return WebTextInputTypeNumber;
- if (input.isTelephoneField())
+ if (type == InputTypeNames::tel)
return WebTextInputTypeTelephone;
- if (input.isURLField())
+ if (type == InputTypeNames::url)
return WebTextInputTypeURL;
- if (input.isDateField())
+ if (type == InputTypeNames::date)
return WebTextInputTypeDate;
- if (input.isDateTimeLocalField())
+ if (type == InputTypeNames::datetime_local)
return WebTextInputTypeDateTimeLocal;
- if (input.isMonthField())
+ if (type == InputTypeNames::month)
return WebTextInputTypeMonth;
- if (input.isTimeField())
+ if (type == InputTypeNames::time)
return WebTextInputTypeTime;
- if (input.isWeekField())
+ if (type == InputTypeNames::week)
return WebTextInputTypeWeek;
- if (input.isTextField())
+ if (type == InputTypeNames::text)
return WebTextInputTypeText;
return WebTextInputTypeNone;
« no previous file with comments | « Source/web/WebSearchableFormData.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698