| 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 59426dd8146ebbc2ff770d250539ebfa8f54c7a1..a63ff3b8205965a6f7bd9ce7aad87a0818f2d6f1 100644
|
| --- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
|
| +++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
|
| @@ -287,7 +287,7 @@ void FrameLoader::saveScrollState() {
|
| }
|
|
|
| void FrameLoader::dispatchUnloadEvent() {
|
| - NavigationDisablerForUnload navigationDisabler;
|
| + FrameNavigationDisabler navigationDisabler(*m_frame);
|
|
|
| // If the frame is unloading, the provisional loader should no longer be
|
| // protected. It will be detached soon.
|
| @@ -1093,9 +1093,6 @@ void FrameLoader::load(const FrameLoadRequest& passedRequest,
|
| HistoryLoadType historyLoadType) {
|
| DCHECK(m_frame->document());
|
|
|
| - if (!m_frame->isNavigationAllowed())
|
| - return;
|
| -
|
| if (m_inStopAllLoaders)
|
| return;
|
|
|
| @@ -1124,6 +1121,12 @@ void FrameLoader::load(const FrameLoadRequest& passedRequest,
|
| ? nullptr
|
| : m_frame->findFrameForNavigation(
|
| AtomicString(request.frameName()), *m_frame);
|
| +
|
| + if (targetFrame && targetFrame->isLocalFrame() &&
|
| + !toLocalFrame(targetFrame)->isNavigationAllowed()) {
|
| + return;
|
| + }
|
| +
|
| NavigationPolicy policy = navigationPolicyForRequest(request);
|
| if (targetFrame && targetFrame != m_frame &&
|
| shouldNavigateTargetFrame(policy)) {
|
| @@ -1559,7 +1562,7 @@ bool FrameLoader::shouldClose(bool isReload) {
|
|
|
| bool shouldClose = false;
|
| {
|
| - NavigationDisablerForUnload navigationDisabler;
|
| + NavigationDisablerForBeforeUnload navigationDisabler;
|
| size_t i;
|
|
|
| bool didAllowNavigation = false;
|
|
|