| Index: Source/web/WebFrameImpl.cpp
|
| diff --git a/Source/web/WebFrameImpl.cpp b/Source/web/WebFrameImpl.cpp
|
| index e6c209c3648a07d629b48e8457e1350eba198ec9..423e4011607d49e28f4e4b6a343cd1ff62df0ac2 100644
|
| --- a/Source/web/WebFrameImpl.cpp
|
| +++ b/Source/web/WebFrameImpl.cpp
|
| @@ -924,8 +924,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()->shouldTreatURLAsSameAsCurrent(historyItem->url());
|
| frame()->page()->goToItem(historyItem.get());
|
| m_inSameDocumentHistoryLoad = false;
|
| }
|
| @@ -998,7 +997,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
|
| @@ -1016,11 +1015,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)
|
| @@ -2193,12 +2192,12 @@ PassRefPtr<Frame> WebFrameImpl::createChildFrame(const FrameLoadRequest& request
|
| if (!childFrame->tree()->parent())
|
| return 0;
|
|
|
| - HistoryItem* parentItem = frame()->loader()->history()->currentItem();
|
| + HistoryItem* parentItem = frame()->loader()->history()->currentItem(frame());
|
| 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 (parentItem && isBackForwardLoadType(frame()->loader()->loadType()) && !frame()->document()->loadEventFinished())
|
| + childItem = frame()->loader()->history()->currentItem(childFrame.get());
|
|
|
| if (childItem)
|
| childFrame->loader()->loadHistoryItem(childItem);
|
|
|