Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. |
| 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) | 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) |
| 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
| 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. |
| 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> | 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> |
| 8 * Copyright (C) 2011 Google Inc. All rights reserved. | 8 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 9 * | 9 * |
| 10 * Redistribution and use in source and binary forms, with or without | 10 * Redistribution and use in source and binary forms, with or without |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 364 | 364 |
| 365 // detachChildren() potentially detaches the frame from the document. The | 365 // detachChildren() potentially detaches the frame from the document. The |
| 366 // loading cannot continue in that case. | 366 // loading cannot continue in that case. |
| 367 if (!m_frame->page()) | 367 if (!m_frame->page()) |
| 368 return; | 368 return; |
| 369 | 369 |
| 370 client()->transitionToCommittedForNewPage(); | 370 client()->transitionToCommittedForNewPage(); |
| 371 documentLoader->replaceDocumentWhileExecutingJavaScriptURL(init, source); | 371 documentLoader->replaceDocumentWhileExecutingJavaScriptURL(init, source); |
| 372 } | 372 } |
| 373 | 373 |
| 374 void FrameLoader::receivedMainResourceRedirect(const KURL& newURL) | 374 void FrameLoader::receivedMainResourceRedirect(const KURL& newURL) |
|
Nate Chapin
2016/08/17 23:45:52
This helper no longer seems useful now that a way
arthursonzogni
2016/08/18 09:21:38
Done.
| |
| 375 { | 375 { |
| 376 client()->dispatchDidReceiveServerRedirectForProvisionalLoad(); | 376 client()->dispatchDidReceiveServerRedirectForProvisionalLoad(); |
| 377 | 377 |
| 378 // If a back/forward navigation redirects, don't reuse any state from the Hi storyItem. | 378 // If a back/forward navigation redirects, don't reuse any state from the Hi storyItem. |
| 379 discardProvisionalHistoryItem(); | |
| 380 } | |
| 381 | |
| 382 void FrameLoader::discardProvisionalHistoryItem() | |
|
Nate Chapin
2016/08/17 23:45:52
Nit: clearProvisionalHistoryItem(), for maximum ac
arthursonzogni
2016/08/18 09:21:38
Done.
| |
| 383 { | |
| 379 m_provisionalItem.clear(); | 384 m_provisionalItem.clear(); |
| 380 } | 385 } |
| 381 | 386 |
| 382 void FrameLoader::setHistoryItemStateForCommit(FrameLoadType loadType, HistoryCo mmitType historyCommitType, HistoryNavigationType navigationType) | 387 void FrameLoader::setHistoryItemStateForCommit(FrameLoadType loadType, HistoryCo mmitType historyCommitType, HistoryNavigationType navigationType) |
| 383 { | 388 { |
| 384 HistoryItem* oldItem = m_currentItem; | 389 HistoryItem* oldItem = m_currentItem; |
| 385 if (isBackForwardLoadType(loadType) && m_provisionalItem) | 390 if (isBackForwardLoadType(loadType) && m_provisionalItem) |
| 386 m_currentItem = m_provisionalItem.release(); | 391 m_currentItem = m_provisionalItem.release(); |
| 387 else | 392 else |
| 388 m_currentItem = HistoryItem::create(); | 393 m_currentItem = HistoryItem::create(); |
| (...skipping 1234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1623 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa der->url() : String()); | 1628 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa der->url() : String()); |
| 1624 return tracedValue; | 1629 return tracedValue; |
| 1625 } | 1630 } |
| 1626 | 1631 |
| 1627 inline void FrameLoader::takeObjectSnapshot() const | 1632 inline void FrameLoader::takeObjectSnapshot() const |
| 1628 { | 1633 { |
| 1629 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced Value()); | 1634 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced Value()); |
| 1630 } | 1635 } |
| 1631 | 1636 |
| 1632 } // namespace blink | 1637 } // namespace blink |
| OLD | NEW |