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

Unified Diff: third_party/WebKit/Source/core/loader/FrameLoader.cpp

Issue 1418003006: Simplify starting a navigation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
Index: third_party/WebKit/Source/core/loader/FrameLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
index 2179214eacc78df6a4e4f6108b88da171faa9102..c450291d745ca3cd8822bf8cd95fd604e1378fd9 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -1323,6 +1323,10 @@ bool FrameLoader::shouldContinueForNavigationPolicy(const ResourceRequest& reque
return false;
}
+ bool isFormSubmission = type == NavigationTypeFormSubmitted || type == NavigationTypeFormResubmitted;
+ if (isFormSubmission && !m_frame->document()->contentSecurityPolicy()->allowFormAction(request.url()))
+ return false;
+
policy = client()->decidePolicyForNavigation(request, loader, type, policy, replacesCurrentHistoryItem);
if (policy == NavigationPolicyCurrentTab)
return true;

Powered by Google App Engine
This is Rietveld 408576698