| Index: Source/web/WebFrameImpl.cpp
|
| diff --git a/Source/web/WebFrameImpl.cpp b/Source/web/WebFrameImpl.cpp
|
| index 59e09e5bf1e1aa298b0ce98c6c8024aafe3398fd..71d8ec43d316b9a433b802c7129cbf33e8ff1b43 100644
|
| --- a/Source/web/WebFrameImpl.cpp
|
| +++ b/Source/web/WebFrameImpl.cpp
|
| @@ -926,8 +926,7 @@ void WebFrameImpl::loadHistoryItem(const WebHistoryItem& item)
|
| ASSERT(historyItem);
|
|
|
| frame()->loader().prepareForHistoryNavigation();
|
| - RefPtr<HistoryItem> currentItem = frame()->loader().history()->currentItem();
|
| - m_inSameDocumentHistoryLoad = currentItem && currentItem->shouldDoSameDocumentNavigationTo(historyItem.get());
|
| + m_inSameDocumentHistoryLoad = frame()->loader().history()->shouldPerformSameDocumentHistoryNavigation(frame(), historyItem.get());
|
| frame()->page()->goToItem(historyItem.get());
|
| m_inSameDocumentHistoryLoad = false;
|
| }
|
| @@ -1000,7 +999,7 @@ WebHistoryItem WebFrameImpl::previousHistoryItem() const
|
| // only get saved to history when it becomes the previous item. The caller
|
| // is expected to query the history item after a navigation occurs, after
|
| // the desired history item has become the previous entry.
|
| - return WebHistoryItem(frame()->loader().history()->previousItem());
|
| + return WebHistoryItem(frame()->loader().history()->previousItemForExport(frame()));
|
| }
|
|
|
| WebHistoryItem WebFrameImpl::currentHistoryItem() const
|
| @@ -1018,11 +1017,11 @@ WebHistoryItem WebFrameImpl::currentHistoryItem() const
|
| // clobbering here?
|
| if (!m_inSameDocumentHistoryLoad && (frame()->loader().loadType() == FrameLoadTypeStandard
|
| || !frame()->loader().activeDocumentLoader()->isLoadingInAPISense()))
|
| - frame()->loader().history()->saveDocumentAndScrollState();
|
| + frame()->loader().history()->saveDocumentAndScrollState(frame());
|
|
|
| - if (HistoryItem* item = frame()->loader().history()->provisionalItem())
|
| + if (RefPtr<HistoryItem> item = frame()->loader().history()->provisionalItemForExport(frame()))
|
| return WebHistoryItem(item);
|
| - return WebHistoryItem(frame()->page()->mainFrame()->loader().history()->currentItem());
|
| + return WebHistoryItem(frame()->loader().history()->currentItemForExport(frame()));
|
| }
|
|
|
| void WebFrameImpl::enableViewSourceMode(bool enable)
|
| @@ -2198,12 +2197,11 @@ PassRefPtr<Frame> WebFrameImpl::createChildFrame(const FrameLoadRequest& request
|
| if (!childFrame->tree().parent())
|
| return 0;
|
|
|
| - HistoryItem* parentItem = frame()->loader().history()->currentItem();
|
| HistoryItem* childItem = 0;
|
| // 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.
|
| - if (parentItem && parentItem->children().size() && isBackForwardLoadType(frame()->loader().loadType()) && !frame()->document()->loadEventFinished())
|
| - childItem = parentItem->childItemWithTarget(childFrame->tree().uniqueName());
|
| + if (isBackForwardLoadType(frame()->loader().loadType()) && !frame()->document()->loadEventFinished())
|
| + childItem = frame()->loader().history()->currentItem(childFrame.get());
|
|
|
| if (childItem)
|
| childFrame->loader().loadHistoryItem(childItem);
|
|
|