Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1770)

Unified Diff: Source/web/WebFrameImpl.cpp

Issue 214723003: Add an unimplemented history API to WebView (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: +WebHisotryCommitType descriptions Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/AssertMatchingEnums.cpp ('k') | public/web/WebFrameClient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebFrameImpl.cpp
diff --git a/Source/web/WebFrameImpl.cpp b/Source/web/WebFrameImpl.cpp
index b77f1206377c41769aa70062332ad392838b994e..07858eaa30a8f11248eb4af7171009397135d85a 100644
--- a/Source/web/WebFrameImpl.cpp
+++ b/Source/web/WebFrameImpl.cpp
@@ -2214,12 +2214,15 @@ PassRefPtr<LocalFrame> WebFrameImpl::createChildFrame(const FrameLoadRequest& re
// 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.
- HistoryItem* childItem = 0;
- if (isBackForwardLoadType(frame()->loader().loadType()) && !frame()->document()->loadEventFinished())
- childItem = frame()->page()->historyController().itemForNewChildFrame(childFrame.get());
+ RefPtr<HistoryItem> childItem;
+ if (isBackForwardLoadType(frame()->loader().loadType()) && !frame()->document()->loadEventFinished()) {
+ childItem = PassRefPtr<HistoryItem>(webframe->client()->historyItemForNewChildFrame(webframe));
+ if (!childItem)
+ childItem = frame()->page()->historyController().itemForNewChildFrame(childFrame.get());
+ }
if (childItem)
- childFrame->loader().loadHistoryItem(childItem);
+ childFrame->loader().loadHistoryItem(childItem.get());
else
childFrame->loader().load(FrameLoadRequest(0, request.resourceRequest(), "_self"));
« no previous file with comments | « Source/web/AssertMatchingEnums.cpp ('k') | public/web/WebFrameClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698