| 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 7e88545b6d6c3ec6f3bcbb1bf792ee12c8647aae..eea5797155874aa4843eace40811c41bad19d9f7 100644
|
| --- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
|
| +++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
|
| @@ -1699,23 +1699,48 @@ LocalFrame* WebLocalFrameImpl::CreateChildFrame(
|
| if (!webframe_child->Parent())
|
| 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.
|
| + FrameLoadRequest new_request = request;
|
| + FrameLoadType child_load_type = kFrameLoadTypeStandard;
|
| HistoryItem* child_item = nullptr;
|
| - if (IsBackForwardLoadType(
|
| - GetFrame()->Loader().GetDocumentLoader()->LoadType()) &&
|
| - !GetFrame()->GetDocument()->LoadEventFinished())
|
| - child_item = webframe_child->Client()->HistoryItemForNewChildFrame();
|
|
|
| - FrameLoadRequest new_request = request;
|
| - FrameLoadType load_type = kFrameLoadTypeStandard;
|
| - if (child_item) {
|
| - new_request = FrameLoadRequest(
|
| - request.OriginDocument(), child_item->GenerateResourceRequest(
|
| - WebCachePolicy::kUseProtocolCachePolicy));
|
| - load_type = kFrameLoadTypeInitialHistoryLoad;
|
| + if (!GetFrame()->GetDocument()->LoadEventFinished()) {
|
| + FrameLoadType load_type =
|
| + GetFrame()->Loader().GetDocumentLoader()->LoadType();
|
| + switch (load_type) {
|
| + case kFrameLoadTypeStandard:
|
| + case kFrameLoadTypeReplaceCurrentItem:
|
| + case kFrameLoadTypeInitialInChildFrame:
|
| + break;
|
| +
|
| + // 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.
|
| + case kFrameLoadTypeBackForward:
|
| + case kFrameLoadTypeInitialHistoryLoad:
|
| + child_item = webframe_child->Client()->HistoryItemForNewChildFrame();
|
| + if (child_item) {
|
| + child_load_type = kFrameLoadTypeInitialHistoryLoad;
|
| + new_request =
|
| + FrameLoadRequest(request.OriginDocument(),
|
| + child_item->GenerateResourceRequest(
|
| + WebCachePolicy::kUseProtocolCachePolicy));
|
| + }
|
| + break;
|
| +
|
| + // We're in a middle of a reload. The FrameLoadType is propagated to its
|
| + // children only if it is a ReloadBypassingCache, else it becomes a
|
| + // standard load.
|
| + case kFrameLoadTypeReload:
|
| + break;
|
| + case kFrameLoadTypeReloadBypassingCache:
|
| + child_load_type = kFrameLoadTypeReloadBypassingCache;
|
| + new_request.GetResourceRequest().SetCachePolicy(
|
| + WebCachePolicy::kBypassingCache);
|
| + break;
|
| + }
|
| }
|
| - webframe_child->GetFrame()->Loader().Load(new_request, load_type, child_item);
|
| +
|
| + webframe_child->GetFrame()->Loader().Load(new_request, child_load_type,
|
| + child_item);
|
|
|
| // Note a synchronous navigation (about:blank) would have already processed
|
| // onload, so it is possible for the child frame to have already been
|
|
|