summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
diff options
context:
space:
mode:
authortkent@chromium.org <tkent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-22 00:11:03 +0000
committertkent@chromium.org <tkent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-22 00:11:03 +0000
commita11728e89e8292d22c2d1d601e5e25d29c0cd3c3 (patch)
treec80affa1f9cd3d732e880ed44f223f9dc83b2284 /chrome/renderer
parent6673317aabd12e4575027ed300d006f9e2bc3824 (diff)
downloadchromium_src-a11728e89e8292d22c2d1d601e5e25d29c0cd3c3.zip
chromium_src-a11728e89e8292d22c2d1d601e5e25d29c0cd3c3.tar.gz
chromium_src-a11728e89e8292d22c2d1d601e5e25d29c0cd3c3.tar.bz2
Stop using WebInputElement::inputType().
WebInputElement::inputType is deprecated because HTMLInputElement::inputType is deprecated. We should stop using it and use is<Type>() functions. BUG=webkit.org/b/45872 TEST=none; no functional changes. Review URL: http://codereview.chromium.org/3421023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60132 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r--chrome/renderer/autofill_helper.cc4
-rw-r--r--chrome/renderer/password_autocomplete_manager.cc5
2 files changed, 5 insertions, 4 deletions
diff --git a/chrome/renderer/autofill_helper.cc b/chrome/renderer/autofill_helper.cc
index 273a7c8..bc4c330 100644
--- a/chrome/renderer/autofill_helper.cc
+++ b/chrome/renderer/autofill_helper.cc
@@ -229,8 +229,8 @@ void AutoFillHelper::ShowSuggestions(
// We need to call non-const methods.
WebInputElement element(const_element);
if (!element.isEnabledFormControl() ||
- element.inputType() != WebInputElement::Text ||
- element.inputType() == WebInputElement::Password ||
+ !element.isText() ||
+ element.isPasswordField() ||
!element.autoComplete() || element.isReadOnly()) {
return;
}
diff --git a/chrome/renderer/password_autocomplete_manager.cc b/chrome/renderer/password_autocomplete_manager.cc
index 3e49a6d..83a037e 100644
--- a/chrome/renderer/password_autocomplete_manager.cc
+++ b/chrome/renderer/password_autocomplete_manager.cc
@@ -131,10 +131,11 @@ bool FillForm(FormElements* fe, const webkit_glue::FormData& data) {
WebKit::WebInputElement& element = it->second;
if (!element.value().isEmpty()) // Don't overwrite pre-filled values.
continue;
- if (element.inputType() == WebKit::WebInputElement::Password &&
+ if (element.isPasswordField() &&
(!element.isEnabledFormControl() || element.hasAttribute("readonly"))) {
continue; // Don't fill uneditable password fields.
}
+ // TODO(tkent): Check maxlength and pattern.
element.setValue(data_map[it->first]);
element.setAutofilled(true);
element.dispatchFormControlChangeEvent();
@@ -266,7 +267,7 @@ bool PasswordAutocompleteManager::TextDidChangeInTextField(
return false;
if (!element.isEnabledFormControl() ||
- element.inputType() != WebKit::WebInputElement::Text ||
+ !element.isText() ||
!element.autoComplete() || element.isReadOnly()) {
return false;
}