|
Lines 2336-2344
void FrameLoader::checkLoadCompleteForTh
WebCore/loader/FrameLoader.cpp_sec1
|
| 2336 |
|
2336 |
|
| 2337 |
// Check all children first. |
2337 |
// Check all children first. |
| 2338 |
RefPtr<HistoryItem> item; |
2338 |
RefPtr<HistoryItem> item; |
| 2339 |
if (Page* page = m_frame->page()) |
2339 |
if (Page* page = m_frame->page()) { |
| 2340 |
if (isBackForwardLoadType(loadType()) && m_frame == page->mainFrame()) |
2340 |
if (isBackForwardLoadType(loadType())) { |
| 2341 |
item = history()->currentItem(); |
2341 |
if (m_frame == page->mainFrame()) { |
|
|
2342 |
// We need to reset the back forward list to the last committed |
| 2343 |
// history item. |
| 2344 |
item = history()->currentItem(); |
| 2345 |
} else { |
| 2346 |
// We need to reset the back forward list to the corresponding |
| 2347 |
// top-level history item, which is currently the main frame's |
| 2348 |
// previous item (because recursiveGoToItem has set the current |
| 2349 |
// item already). |
| 2350 |
item = page->mainFrame()->loader()->history()->previousItem(); |
| 2351 |
} |
| 2352 |
} |
| 2353 |
} |
| 2342 |
|
2354 |
|
| 2343 |
bool shouldReset = true; |
2355 |
bool shouldReset = true; |
| 2344 |
if (!(pdl->isLoadingInAPISense() && !pdl->isStopping())) { |
2356 |
if (!(pdl->isLoadingInAPISense() && !pdl->isStopping())) { |
|
Lines 2371-2376
void FrameLoader::checkLoadCompleteForTh
WebCore/loader/FrameLoader.cpp_sec2
|
| 2371 |
page->backForward()->setCurrentItem(item.get()); |
2383 |
page->backForward()->setCurrentItem(item.get()); |
| 2372 |
Settings* settings = m_frame->settings(); |
2384 |
Settings* settings = m_frame->settings(); |
| 2373 |
page->setGlobalHistoryItem((!settings || settings->privateBrowsingEnabled()) ? 0 : item.get()); |
2385 |
page->setGlobalHistoryItem((!settings || settings->privateBrowsingEnabled()) ? 0 : item.get()); |
|
|
2386 |
|
| 2387 |
// If this is a subframe, we have also modified the top-level history's |
| 2388 |
// current item in recursiveGoToItem, and we need to reset it. |
| 2389 |
if (m_frame != page->mainFrame()) |
| 2390 |
page->mainFrame()->loader()->history()->cancelCurrentItem(); |
| 2374 |
} |
2391 |
} |
| 2375 |
return; |
2392 |
return; |
| 2376 |
} |
2393 |
} |