| 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 26bd2f95c92e404ed37be2e1c80177c58efb2a69..7bacc520b53fc8148d8ff9667fe8f3bb16f7384f 100644
|
| --- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
|
| +++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
|
| @@ -1628,6 +1628,10 @@ bool FrameLoader::shouldContinueForNavigationPolicy(
|
| FrameLoadType frameLoadType,
|
| bool isClientRedirect,
|
| HTMLFormElement* form) {
|
| + Settings* settings = m_frame->settings();
|
| + bool browserSideNavigationEnabled =
|
| + settings && settings->getBrowserSideNavigationEnabled();
|
| +
|
| // Don't ask if we are loading an empty URL.
|
| if (request.url().isEmpty() || substituteData.isValid())
|
| return true;
|
| @@ -1636,7 +1640,8 @@ bool FrameLoader::shouldContinueForNavigationPolicy(
|
| // against the parent's Content Security Policy and kill the load if that
|
| // check fails, unless we should bypass the main world's CSP.
|
| if (policy == NavigationPolicyCurrentTab &&
|
| - shouldCheckMainWorldContentSecurityPolicy == CheckContentSecurityPolicy) {
|
| + shouldCheckMainWorldContentSecurityPolicy == CheckContentSecurityPolicy &&
|
| + !browserSideNavigationEnabled) {
|
| Frame* parentFrame = m_frame->tree().parent();
|
| if (parentFrame) {
|
| ContentSecurityPolicy* parentPolicy =
|
| @@ -1662,9 +1667,9 @@ bool FrameLoader::shouldContinueForNavigationPolicy(
|
|
|
| bool replacesCurrentHistoryItem =
|
| frameLoadType == FrameLoadTypeReplaceCurrentItem;
|
| - policy = client()->decidePolicyForNavigation(request, loader, type, policy,
|
| - replacesCurrentHistoryItem,
|
| - isClientRedirect, form);
|
| + policy = client()->decidePolicyForNavigation(
|
| + request, loader, type, policy, replacesCurrentHistoryItem,
|
| + isClientRedirect, form, shouldCheckMainWorldContentSecurityPolicy);
|
| if (policy == NavigationPolicyCurrentTab)
|
| return true;
|
| if (policy == NavigationPolicyIgnore)
|
|
|