| 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 d480a9d51027054973a67fdadc6593c8e1a011fb..7b2d7a19bdd2598d062ad509028f5d0b64ff150f 100644
|
| --- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
|
| +++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
|
| @@ -1638,11 +1638,20 @@ bool FrameLoader::shouldContinueForNavigationPolicy(
|
| if (request.url().isEmpty() || substituteData.isValid())
|
| return true;
|
|
|
| + Settings* settings = m_frame->settings();
|
| + bool browserSideNavigationEnabled =
|
| + settings && settings->getBrowserSideNavigationEnabled();
|
| +
|
| // If we're loading content into |m_frame| (NavigationPolicyCurrentTab), check
|
| // 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 &&
|
| + // TODO(arthursonzogni): 'frame-src' check is disabled on the
|
| + // renderer side with browser-side-navigation, but is enforced on the
|
| + // browser side. See http://crbug.com/692595 for understanding why it
|
| + // can't be enforced on both sides instead.
|
| + !browserSideNavigationEnabled) {
|
| Frame* parentFrame = m_frame->tree().parent();
|
| if (parentFrame) {
|
| ContentSecurityPolicy* parentPolicy =
|
| @@ -1668,9 +1677,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)
|
|
|