| Index: Source/core/loader/DocumentLoader.cpp
|
| diff --git a/Source/core/loader/DocumentLoader.cpp b/Source/core/loader/DocumentLoader.cpp
|
| index 55c01f5891c32b7cebd6b5c81180d389f989181c..175d69fbb09915f6e5cbc344689dbe62cfea3275 100644
|
| --- a/Source/core/loader/DocumentLoader.cpp
|
| +++ b/Source/core/loader/DocumentLoader.cpp
|
| @@ -83,6 +83,7 @@ DocumentLoader::DocumentLoader(LocalFrame* frame, const ResourceRequest& req, co
|
| , m_committed(false)
|
| , m_isClientRedirect(false)
|
| , m_replacesCurrentHistoryItem(false)
|
| + , m_navigationType(NavigationTypeOther)
|
| , m_loadingMainResource(false)
|
| , m_timeOfLastDataReceived(0.0)
|
| , m_applicationCacheHost(ApplicationCacheHost::create(this))
|
| @@ -301,7 +302,7 @@ bool DocumentLoader::isRedirectAfterPost(const ResourceRequest& newRequest, cons
|
| return false;
|
| }
|
|
|
| -bool DocumentLoader::shouldContinueForNavigationPolicy(const ResourceRequest& request, ContentSecurityPolicyDisposition shouldCheckMainWorldContentSecurityPolicy, bool isTransitionNavigation)
|
| +bool DocumentLoader::shouldContinueForNavigationPolicy(const ResourceRequest& request, ContentSecurityPolicyDisposition shouldCheckMainWorldContentSecurityPolicy, NavigationPolicy policy, bool isTransitionNavigation)
|
| {
|
| // Don't ask if we are loading an empty URL.
|
| if (request.url().isEmpty() || m_substituteData.isValid())
|
| @@ -319,7 +320,6 @@ bool DocumentLoader::shouldContinueForNavigationPolicy(const ResourceRequest& re
|
| return false;
|
| }
|
|
|
| - NavigationPolicy policy = m_triggeringAction.policy();
|
| policy = frameLoader()->client()->decidePolicyForNavigation(request, this, policy, isTransitionNavigation);
|
| if (policy == NavigationPolicyCurrentTab)
|
| return true;
|
| @@ -355,7 +355,7 @@ void DocumentLoader::willSendRequest(ResourceRequest& newRequest, const Resource
|
| // deferrals plays less of a part in this function in preventing the bad behavior deferring
|
| // callbacks is meant to prevent.
|
| ASSERT(!newRequest.isNull());
|
| - if (isFormSubmission(m_triggeringAction.type()) && !m_frame->document()->contentSecurityPolicy()->allowFormAction(newRequest.url())) {
|
| + if (isFormSubmission(m_navigationType) && !m_frame->document()->contentSecurityPolicy()->allowFormAction(newRequest.url())) {
|
| cancelMainResourceLoad(ResourceError::cancelledError(newRequest.url()));
|
| return;
|
| }
|
|
|