summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-06 00:51:08 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-06 00:51:08 +0000
commit89e2b2309146379cb3f162aacb61d5ecf0baee19 (patch)
tree0f815fd707d7cf1036f9f447936c8a71c64ee1e8
parent4c870b4013b3cf658c40e2c7b98e0a419ae7236f (diff)
downloadchromium_src-89e2b2309146379cb3f162aacb61d5ecf0baee19.zip
chromium_src-89e2b2309146379cb3f162aacb61d5ecf0baee19.tar.gz
chromium_src-89e2b2309146379cb3f162aacb61d5ecf0baee19.tar.bz2
The form aufotill was triggering a DCHECK when a form had a password field but no user name associated.
This was causing some wekbit layout tests to fail. TEST=Run the webkit layout tests. Review URL: http://codereview.chromium.org/9612 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4850 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--webkit/glue/webframeloaderclient_impl.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/webkit/glue/webframeloaderclient_impl.cc b/webkit/glue/webframeloaderclient_impl.cc
index 2a46af8..698d1a7 100644
--- a/webkit/glue/webframeloaderclient_impl.cc
+++ b/webkit/glue/webframeloaderclient_impl.cc
@@ -363,9 +363,9 @@ void WebFrameLoaderClient::dispatchDidFinishDocumentLoad() {
actions.push_back(*data);
// Let's remember the names of password related fields so we do not
// autofill them with the regular form autofill.
- DCHECK(!data->username_element.empty());
+ if (!data->username_element.empty())
+ password_related_fields.insert(data->username_element);
DCHECK(!data->password_element.empty());
- password_related_fields.insert(data->username_element);
password_related_fields.insert(data->password_element);
if (!data->old_password_element.empty())
password_related_fields.insert(data->old_password_element);