Chromium Code Reviews| Index: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp |
| diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp |
| index d0e9bbb04981714c12a5a1f00027e51b88fbea6a..47c6e0fd16326c40f49bdcec9b28c681cb76d1cf 100644 |
| --- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp |
| +++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp |
| @@ -146,6 +146,7 @@ |
| #include "core/loader/HistoryItem.h" |
| #include "core/loader/MixedContentChecker.h" |
| #include "core/loader/NavigationScheduler.h" |
| +#include "core/loader/ProgressTracker.h" |
| #include "core/page/FocusController.h" |
| #include "core/page/FrameTree.h" |
| #include "core/page/Page.h" |
| @@ -1757,10 +1758,19 @@ PassRefPtrWillBeRawPtr<LocalFrame> WebLocalFrameImpl::createChildFrame(const Fra |
| return nullptr; |
| // If we're moving in the back/forward list, we might want to replace the content |
| - // of this child frame with whatever was there at that point. |
| + // of this child frame with whatever was there at that point. The client may want |
| + // to do this asynchronously, in which case shouldLoadRequest will be set to false. |
| + bool shouldLoadRequest = true; |
| RefPtrWillBeRawPtr<HistoryItem> childItem = nullptr; |
| - if (isBackForwardLoadType(frame()->loader().loadType()) && !frame()->document()->loadEventFinished()) |
| - childItem = PassRefPtrWillBeRawPtr<HistoryItem>(webframeChild->client()->historyItemForNewChildFrame(webframeChild)); |
| + if (isBackForwardLoadType(frame()->loader().loadType()) && !frame()->document()->loadEventFinished()) { |
| + childItem = PassRefPtrWillBeRawPtr<HistoryItem>(webframeChild->client()->historyItemForNewChildFrame(&shouldLoadRequest)); |
| + if (!shouldLoadRequest) { |
| + // The load will start in the browser process, so let the progress tracker |
| + // know about it. |
| + child->loader().progress().progressStarted(); |
| + return child; |
| + } |
| + } |
| FrameLoadRequest newRequest = request; |
| FrameLoadType loadType = FrameLoadTypeStandard; |
| @@ -1992,9 +2002,9 @@ void WebLocalFrameImpl::initializeToReplaceRemoteFrame(WebRemoteFrame* oldWebFra |
| OwnPtrWillBeRawPtr<FrameOwner> tempOwner = RemoteBridgeFrameOwner::create(nullptr, SandboxNone, WebFrameOwnerProperties()); |
| RefPtrWillBeRawPtr<LocalFrame> frame = LocalFrame::create(m_frameLoaderClientImpl.get(), oldFrame->host(), tempOwner.get()); |
| frame->setOwner(oldFrame->owner()); |
| - frame->tree().setName(name); |
| setParent(oldWebFrame->parent()); |
| setOpener(oldWebFrame->opener()); |
| + frame->tree().setName(name); |
|
Charlie Reis
2015/11/23 22:56:36
This will go away when Daniel fixes unique names w
|
| setCoreFrame(frame); |
| if (frame->owner() && !frame->owner()->isLocal()) { |