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

Side by Side Diff: webkit/glue/searchable_form_data.cc

Issue 62145: Yet another scrape atttempt (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/url_request/url_request_unittest.h ('k') | webkit/glue/unittest_test_server.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 8
9 MSVC_PUSH_WARNING_LEVEL(0); 9 MSVC_PUSH_WARNING_LEVEL(0);
10 #include "CSSHelper.h" 10 #include "CSSHelper.h"
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 return NULL; 313 return NULL;
314 314
315 return Create(form); 315 return Create(form);
316 } 316 }
317 317
318 SearchableFormData* SearchableFormData::Create(WebCore::HTMLFormElement* form) { 318 SearchableFormData* SearchableFormData::Create(WebCore::HTMLFormElement* form) {
319 WebCore::Frame* frame = form->document()->frame(); 319 WebCore::Frame* frame = form->document()->frame();
320 if (frame == NULL) 320 if (frame == NULL)
321 return NULL; 321 return NULL;
322 322
323 // Only consider forms that GET data, do not have script for onsubmit, and 323 // Only consider forms that GET data and the action targets an http page.
324 // the action targets an http page. 324 if (!IsFormMethodGet(form) || !IsHTTPFormSubmit(form))
325 if (!IsFormMethodGet(form) || FormHasOnSubmit(form) ||
326 !IsHTTPFormSubmit(form))
327 return NULL; 325 return NULL;
328 326
329 Vector<char> enc_string; 327 Vector<char> enc_string;
330 WebCore::HTMLFormControlElement* first_submit_button = 328 WebCore::HTMLFormControlElement* first_submit_button =
331 GetButtonToActivate(form); 329 GetButtonToActivate(form);
332 330
333 if (first_submit_button) { 331 if (first_submit_button) {
334 // The form does not have an active submit button, make the first button 332 // The form does not have an active submit button, make the first button
335 // active. We need to do this, otherwise the URL will not contain the 333 // active. We need to do this, otherwise the URL will not contain the
336 // name of the submit button. 334 // name of the submit button.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 375
378 SearchableFormData::SearchableFormData(const GURL& url, 376 SearchableFormData::SearchableFormData(const GURL& url,
379 const std::wstring& element_name, 377 const std::wstring& element_name,
380 const std::wstring& element_value, 378 const std::wstring& element_value,
381 const std::string& encoding) 379 const std::string& encoding)
382 : url_(url), 380 : url_(url),
383 element_name_(element_name), 381 element_name_(element_name),
384 element_value_(element_value), 382 element_value_(element_value),
385 encoding_(encoding) { 383 encoding_(encoding) {
386 } 384 }
OLDNEW
« no previous file with comments | « net/url_request/url_request_unittest.h ('k') | webkit/glue/unittest_test_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698