diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-18 17:51:53 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-18 17:51:53 +0000 |
commit | fedaf2e8932a982d65490955a9d59bace9798b62 (patch) | |
tree | bc95b60f2aeadc4bac41dbe093802dcf02925703 /webkit/glue/editor_client_impl.cc | |
parent | 7777d9633bed51e5458ca2ec4b0df1f73d809bfb (diff) | |
download | chromium_src-fedaf2e8932a982d65490955a9d59bace9798b62.zip chromium_src-fedaf2e8932a982d65490955a9d59bace9798b62.tar.gz chromium_src-fedaf2e8932a982d65490955a9d59bace9798b62.tar.bz2 |
Autocomplete now uses the input field id when no name is available to perform autocomplete.
This matches FF behavior.
BUG=6310
TEST=See bug.
Review URL: http://codereview.chromium.org/48033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11987 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/editor_client_impl.cc')
-rw-r--r-- | webkit/glue/editor_client_impl.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/webkit/glue/editor_client_impl.cc b/webkit/glue/editor_client_impl.cc index a3b245c..b4ba417 100644 --- a/webkit/glue/editor_client_impl.cc +++ b/webkit/glue/editor_client_impl.cc @@ -31,6 +31,7 @@ MSVC_POP_WARNING(); #undef LOG #include "base/message_loop.h" #include "base/string_util.h" +#include "webkit/glue/autofill_form.h" #include "webkit/glue/editor_client_impl.h" #include "webkit/glue/glue_util.h" #include "webkit/glue/webkit_glue.h" @@ -688,7 +689,7 @@ void EditorClientImpl::Autofill(WebCore::HTMLInputElement* input_element, return; } - std::wstring name = webkit_glue::StringToStdWString(input_element->name()); + std::wstring name = AutofillForm::GetNameForInputElement(input_element); if (name.empty()) // If the field has no name, then we won't have values. return; @@ -736,8 +737,8 @@ void EditorClientImpl::DoAutofill(WebCore::HTMLInputElement* input_element, } // Then trigger form autofill. - std::wstring name = webkit_glue::StringToStdWString(input_element-> - name().string()); + std::wstring name = AutofillForm::GetNameForInputElement(input_element); + DCHECK_GT(static_cast<int>(name.length()), 0); web_view_->delegate()->QueryFormFieldAutofill(name, value, reinterpret_cast<int64>(input_element)); } |