Changeset 93296 in webkit
- Timestamp:
- Aug 18, 2011 4:10:44 AM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r93295 r93296 1 2011-08-18 Gavin Peters <gavinp@chromium.org> 2 3 Prepare frames for history navigation. 4 5 Before beginning an explicit history navigation in a newly initialized 6 frame, it's important to give a "previous" item to avoid crashes, and 7 give a state to the state machine to avoid extra validating loads. 8 9 https://bugs.webkit.org/show_bug.cgi?id=66322 10 11 Reviewed by Darin Fisher. 12 13 No new tests, as history navigation is very difficult to test in 14 DumpRenderTree. 15 16 * loader/FrameLoader.cpp: 17 (WebCore::FrameLoader::prepareForHistoryNavigation): 18 * loader/FrameLoader.h: 19 1 20 2011-08-18 Jing Zhao <jingzhao@chromium.org> 2 21 -
trunk/Source/WebCore/loader/FrameLoader.cpp
r93066 r93296 1091 1091 } 1092 1092 1093 void FrameLoader::prepareForHistoryNavigation() 1094 { 1095 // If there is no currentItem, but we still want to engage in 1096 // history navigation we need to manufacture one, and update 1097 // the state machine of this frame to impersonate having 1098 // loaded it. 1099 RefPtr<HistoryItem> currentItem = history()->currentItem(); 1100 if (!currentItem) { 1101 currentItem = HistoryItem::create(); 1102 currentItem->setLastVisitWasFailure(true); 1103 history()->setCurrentItem(currentItem.get()); 1104 frame()->page()->backForward()->setCurrentItem(currentItem.get()); 1105 1106 ASSERT(stateMachine()->isDisplayingInitialEmptyDocument()); 1107 stateMachine()->advanceTo(FrameLoaderStateMachine::DisplayingInitialEmptyDocumentPostCommit); 1108 stateMachine()->advanceTo(FrameLoaderStateMachine::CommittedFirstRealLoad); 1109 } 1110 } 1111 1093 1112 void FrameLoader::prepareForLoadStart() 1094 1113 { -
trunk/Source/WebCore/loader/FrameLoader.h
r93066 r93296 92 92 IconController* icon() const { return &m_icon; } 93 93 94 void prepareForHistoryNavigation(); 94 95 void prepareForLoadStart(); 95 96 void setupForReplace(); -
trunk/Source/WebKit/chromium/ChangeLog
r93294 r93296 1 2011-08-18 Gavin Peters <gavinp@chromium.org> 2 3 Prepare frames for history navigation. 4 5 Before beginning an explicit history navigation in a newly initialized 6 frame, it's important to give a "previous" item to avoid crashes, and 7 give a state to the state machine to avoid extra validating loads. 8 9 https://bugs.webkit.org/show_bug.cgi?id=66322 10 11 Reviewed by Darin Fisher. 12 13 * src/WebFrameImpl.cpp: 14 (WebKit::WebFrameImpl::loadHistoryItem): 15 1 16 2011-08-18 Nico Weber <thakis@chromium.org> 2 17 -
trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp
r92893 r93296 890 890 ASSERT(historyItem.get()); 891 891 892 // If there is no currentItem, which happens when we are navigating in 893 // session history after a crash, we need to manufacture one otherwise WebKit 894 // hoarks. This is probably the wrong thing to do, but it seems to work. 892 m_frame->loader()->prepareForHistoryNavigation(); 895 893 RefPtr<HistoryItem> currentItem = m_frame->loader()->history()->currentItem(); 896 if (!currentItem) {897 currentItem = HistoryItem::create();898 currentItem->setLastVisitWasFailure(true);899 m_frame->loader()->history()->setCurrentItem(currentItem.get());900 m_frame->page()->backForward()->setCurrentItem(currentItem.get());901 }902 903 894 m_inSameDocumentHistoryLoad = currentItem->shouldDoSameDocumentNavigationTo(historyItem.get()); 904 895 m_frame->page()->goToItem(historyItem.get(),
Note: See TracChangeset
for help on using the changeset viewer.