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

Unified Diff: webkit/glue/editor_client_impl.cc

Issue 48033: Autocomplete should work with nameless fields (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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 | « webkit/glue/autofill_form.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/editor_client_impl.cc
===================================================================
--- webkit/glue/editor_client_impl.cc (revision 11737)
+++ webkit/glue/editor_client_impl.cc (working copy)
@@ -31,6 +31,7 @@
#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 @@
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 @@
}
// 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));
}
« no previous file with comments | « webkit/glue/autofill_form.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698