summaryrefslogtreecommitdiffstats
path: root/webkit/glue/searchable_form_data.cc
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-10 02:37:22 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-10 02:37:22 +0000
commitdeb27ae20cd7d59fba58ad530a72b2dbf8a099ee (patch)
tree7c751a2197b767521e89849abd2cb35e874238d0 /webkit/glue/searchable_form_data.cc
parentce7c39483b5e113ec862a231580684f35268c227 (diff)
downloadchromium_src-deb27ae20cd7d59fba58ad530a72b2dbf8a099ee.zip
chromium_src-deb27ae20cd7d59fba58ad530a72b2dbf8a099ee.tar.gz
chromium_src-deb27ae20cd7d59fba58ad530a72b2dbf8a099ee.tar.bz2
Scrape search definitions from forms that have onsubmit handlers. The scraping is done after submit events are handled by the page DOM so doing this is safe.
Adds test infrastructure for determining that scraping occurs on submit: - allow testserver to be configured to serve pages from / on the server - provide a ui test util that navigates and waits for N subsequent redirections/navigations before returning control to the test to handle automated submission Eric, please review the test server changes. Scott, please look over everything else. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=13444 Review URL: http://codereview.chromium.org/62145 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13491 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/searchable_form_data.cc')
-rw-r--r--webkit/glue/searchable_form_data.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/webkit/glue/searchable_form_data.cc b/webkit/glue/searchable_form_data.cc
index 3c787b2..6187897 100644
--- a/webkit/glue/searchable_form_data.cc
+++ b/webkit/glue/searchable_form_data.cc
@@ -320,10 +320,8 @@ SearchableFormData* SearchableFormData::Create(WebCore::HTMLFormElement* form) {
if (frame == NULL)
return NULL;
- // Only consider forms that GET data, do not have script for onsubmit, and
- // the action targets an http page.
- if (!IsFormMethodGet(form) || FormHasOnSubmit(form) ||
- !IsHTTPFormSubmit(form))
+ // Only consider forms that GET data and the action targets an http page.
+ if (!IsFormMethodGet(form) || !IsHTTPFormSubmit(form))
return NULL;
Vector<char> enc_string;