Index: third_party/WebKit/Source/core/html/HTMLFormElement.cpp |
diff --git a/third_party/WebKit/Source/core/html/HTMLFormElement.cpp b/third_party/WebKit/Source/core/html/HTMLFormElement.cpp |
index 86834c5fe5ee7122dc5dd3bc84277839ec669f6e..746f318784c9fbb967c94848593369c6cba6ce64 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLFormElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLFormElement.cpp |
@@ -416,10 +416,12 @@ void HTMLFormElement::scheduleFormSubmission(FormSubmission* submission) { |
return; |
} |
+ if (!document().contentSecurityPolicy()->allowFormAction( |
+ submission->action())) { |
+ return; |
+ } |
+ |
if (protocolIsJavaScript(submission->action())) { |
- if (!document().contentSecurityPolicy()->allowFormAction( |
- submission->action())) |
- return; |
document().frame()->script().executeScriptIfJavaScriptURL( |
submission->action(), this); |
return; |