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

Unified Diff: third_party/WebKit/Source/web/WebSearchableFormData.cpp

Issue 2505933005: Auto-Generating Search Engines - Remove HTTP Restriction (Closed)
Patch Set: added test Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/tests/WebSearchableFormDataTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebSearchableFormData.cpp
diff --git a/third_party/WebKit/Source/web/WebSearchableFormData.cpp b/third_party/WebKit/Source/web/WebSearchableFormData.cpp
index 580af9a72fbf848d569ffafe700da86dbd3493cc..5b377e4b2e07f648a2fc45050ebef2050693931e 100644
--- a/third_party/WebKit/Source/web/WebSearchableFormData.cpp
+++ b/third_party/WebKit/Source/web/WebSearchableFormData.cpp
@@ -66,18 +66,6 @@ void getFormEncoding(const HTMLFormElement& form, WTF::TextEncoding* encoding) {
*encoding = WTF::TextEncoding(form.document().encoding());
}
-// Returns true if the submit request results in an HTTP URL.
-bool isHTTPFormSubmit(const HTMLFormElement& form) {
- // FIXME: This function is insane. This is an overly complicated way to get
- // this information.
- String action(form.action());
- // The isNull() check is trying to avoid completeURL returning KURL() when
- // passed a null string.
- return form.document()
- .completeURL(action.isNull() ? "" : action)
- .protocolIs("http");
-}
-
// If the form does not have an activated submit button, the first submit
// button is returned.
HTMLFormControlElement* buttonToActivate(const HTMLFormElement& form) {
@@ -235,9 +223,7 @@ WebSearchableFormData::WebSearchableFormData(
static_cast<HTMLInputElement*>(selectedInputElement);
// Only consider forms that GET data.
- // Allow HTTPS only when an input element is provided.
- if (equalIgnoringASCIICase(formElement->getAttribute(methodAttr), "post") ||
- (!isHTTPFormSubmit(*formElement) && !inputElement))
+ if (equalIgnoringASCIICase(formElement->getAttribute(methodAttr), "post"))
return;
WTF::TextEncoding encoding;
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/tests/WebSearchableFormDataTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698