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

Unified Diff: Source/web/WebInputElement.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/ContextMenuClientImpl.cpp ('k') | Source/web/WebSearchableFormData.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebInputElement.cpp
diff --git a/Source/web/WebInputElement.cpp b/Source/web/WebInputElement.cpp
index c0f11a021908da1509bb0fb695608968d1ad8d76..b40a42901dc4a3ac0aaf2d9190377a364391121d 100644
--- a/Source/web/WebInputElement.cpp
+++ b/Source/web/WebInputElement.cpp
@@ -32,6 +32,7 @@
#include "public/web/WebInputElement.h"
#include "core/HTMLNames.h"
+#include "core/InputTypeNames.h"
#include "core/dom/shadow/ElementShadow.h"
#include "core/dom/shadow/ShadowRoot.h"
#include "core/html/HTMLDataListElement.h"
@@ -58,27 +59,27 @@ bool WebInputElement::isText() const
bool WebInputElement::isEmailField() const
{
- return constUnwrap<HTMLInputElement>()->isEmailField();
+ return constUnwrap<HTMLInputElement>()->type() == InputTypeNames::email;
}
bool WebInputElement::isPasswordField() const
{
- return constUnwrap<HTMLInputElement>()->isPasswordField();
+ return constUnwrap<HTMLInputElement>()->type() == InputTypeNames::password;
}
bool WebInputElement::isImageButton() const
{
- return constUnwrap<HTMLInputElement>()->isImageButton();
+ return constUnwrap<HTMLInputElement>()->type() == InputTypeNames::image;
}
bool WebInputElement::isRadioButton() const
{
- return constUnwrap<HTMLInputElement>()->isRadioButton();
+ return constUnwrap<HTMLInputElement>()->type() == InputTypeNames::radio;
}
bool WebInputElement::isCheckbox() const
{
- return constUnwrap<HTMLInputElement>()->isCheckbox();
+ return constUnwrap<HTMLInputElement>()->type() == InputTypeNames::checkbox;
}
int WebInputElement::maxLength() const
« no previous file with comments | « Source/web/ContextMenuClientImpl.cpp ('k') | Source/web/WebSearchableFormData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698