Chromium Code Reviews| 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)) |
|
Peter Kasting
2016/11/17 01:08:57
This change allows forms from other schemes as wel
Mark P
2016/11/17 05:10:54
I'm not sure if other schemes get here. But I am
|
| + if (equalIgnoringASCIICase(formElement->getAttribute(methodAttr), "post")) |
| return; |
| WTF::TextEncoding encoding; |