summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-09 19:57:42 +0000
committertim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-09 19:57:42 +0000
commit9b341774ce43e4034ac4465997b31e7b15fa1928 (patch)
treee9cd764f0212d154271a9a50364983b05e6014b6
parent01aace8e72e686bfb59d2fae34fb70e474427754 (diff)
downloadchromium_src-9b341774ce43e4034ac4465997b31e7b15fa1928.zip
chromium_src-9b341774ce43e4034ac4465997b31e7b15fa1928.tar.gz
chromium_src-9b341774ce43e4034ac4465997b31e7b15fa1928.tar.bz2
Don't overwrite pre-filled values when autofilling a form.
BUG=6197 Review URL: http://codereview.chromium.org/17314 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7822 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--webkit/glue/dom_operations.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/webkit/glue/dom_operations.cc b/webkit/glue/dom_operations.cc
index da1a961..1db09c1 100644
--- a/webkit/glue/dom_operations.cc
+++ b/webkit/glue/dom_operations.cc
@@ -297,6 +297,8 @@ static bool FillFormImpl(FormElements* fe, const FormData& data, bool submit) {
submit_found = true;
continue;
}
+ if (!it->second->value().isEmpty()) // Don't overwrite pre-filled values.
+ continue;
it->second->setValue(StdWStringToString(data_map[it->first]));
it->second->setAutofilled(true);
it->second->onChange();