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

Unified Diff: Source/core/html/HTMLFormElement.cpp

Issue 605453002: Merge 182515 "Revert "Mixed Content: Make MixedContentChecker co..." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/2167/
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/fetch/ResourceFetcher.cpp ('k') | Source/core/html/HTMLPlugInElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLFormElement.cpp
===================================================================
--- Source/core/html/HTMLFormElement.cpp (revision 182628)
+++ Source/core/html/HTMLFormElement.cpp (working copy)
@@ -442,9 +442,13 @@
if (!targetFrame->page())
return;
- UseCounter::count(document(), UseCounter::FormsSubmitted);
- if (MixedContentChecker::checkFormAction(document().frame(), submission->action()))
+ if (MixedContentChecker::isMixedContent(document().securityOrigin(), submission->action())) {
UseCounter::count(document(), UseCounter::MixedContentFormsSubmitted);
+ if (!document().frame()->loader().mixedContentChecker()->canSubmitToInsecureForm(document().securityOrigin(), submission->action()))
+ return;
+ } else {
+ UseCounter::count(document(), UseCounter::FormsSubmitted);
+ }
submission->setReferrer(Referrer(document().outgoingReferrer(), document().referrerPolicy()));
submission->setOrigin(document().outgoingOrigin());
@@ -518,7 +522,8 @@
// If the new action attribute is pointing to insecure "action" location from a secure page
// it is marked as "passive" mixed content.
KURL actionURL = document().completeURL(m_attributes.action().isEmpty() ? document().url().string() : m_attributes.action());
- MixedContentChecker::checkFormAction(document().frame(), actionURL);
+ if (document().frame() && MixedContentChecker::isMixedContent(document().securityOrigin(), actionURL))
+ document().frame()->loader().mixedContentChecker()->canSubmitToInsecureForm(document().securityOrigin(), actionURL);
} else if (name == targetAttr)
m_attributes.setTarget(value);
else if (name == methodAttr)
« no previous file with comments | « Source/core/fetch/ResourceFetcher.cpp ('k') | Source/core/html/HTMLPlugInElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698