summaryrefslogtreecommitdiffstats
path: root/webkit/glue
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-25 18:22:12 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-25 18:22:12 +0000
commitb05ce36f883bb46bf7bd78a235b1e979ed1add86 (patch)
tree78e8d4c9f00892a65cd52d8516ce56283d1a733d /webkit/glue
parentc6d31b1617d16638a7ac84832e56d0cb2cc4cd19 (diff)
downloadchromium_src-b05ce36f883bb46bf7bd78a235b1e979ed1add86.zip
chromium_src-b05ce36f883bb46bf7bd78a235b1e979ed1add86.tar.gz
chromium_src-b05ce36f883bb46bf7bd78a235b1e979ed1add86.tar.bz2
Remove submit handling in FillFormImpl. The one caller passes false to |submit|, so this is essentially dead code.
BUG=none TEST=none Review URL: http://codereview.chromium.org/660059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40033 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r--webkit/glue/dom_operations.cc21
1 files changed, 5 insertions, 16 deletions
diff --git a/webkit/glue/dom_operations.cc b/webkit/glue/dom_operations.cc
index eab8e40f5..9996675 100644
--- a/webkit/glue/dom_operations.cc
+++ b/webkit/glue/dom_operations.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -170,7 +170,7 @@ struct FormElements {
typedef std::vector<FormElements*> FormElementsList;
// Internal implementation of FillForm API.
-static bool FillFormImpl(FormElements* fe, const FormData& data, bool submit) {
+static bool FillFormImpl(FormElements* fe, const FormData& data) {
if (!fe->form_element.autoComplete())
return false;
@@ -179,14 +179,8 @@ static bool FillFormImpl(FormElements* fe, const FormData& data, bool submit) {
data_map[data.elements[i]] = data.values[i];
}
- bool submit_found = false;
for (FormInputElementMap::iterator it = fe->input_elements.begin();
it != fe->input_elements.end(); ++it) {
- if (it->first == data.submit) {
- it->second.setActivatedSubmit(true);
- submit_found = true;
- continue;
- }
if (!it->second.value().isEmpty()) // Don't overwrite pre-filled values.
continue;
it->second.setValue(data_map[it->first]);
@@ -194,10 +188,6 @@ static bool FillFormImpl(FormElements* fe, const FormData& data, bool submit) {
it->second.dispatchFormControlChangeEvent();
}
- if (submit && submit_found) {
- fe->form_element.submit();
- return true;
- }
return false;
}
@@ -288,11 +278,10 @@ void FillPasswordForm(WebView* view,
// FormElementsList use that.
scoped_ptr<FormElements> form_elements(*iter);
- // False param to FillFormByAction is so we don't auto-submit password
- // forms. If wait_for_username is true, we don't want to initially fill
- // the form until the user types in a valid username.
+ // If wait_for_username is true, we don't want to initially fill the form
+ // until the user types in a valid username.
if (!data.wait_for_username)
- FillFormImpl(form_elements.get(), data.basic_data, false);
+ FillFormImpl(form_elements.get(), data.basic_data);
// Attach autocomplete listener to enable selecting alternate logins.
// First, get pointers to username element.