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

Side by Side Diff: third_party/WebKit/Source/core/loader/FrameLoader.cpp

Issue 2196333002: PlzNavigate: Clear provisional history item on redirects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@timing_api
Patch Set: Rebasing again, Trybot issues. Created 4 years, 3 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 unified diff | Download patch
OLDNEW
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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 363
364 // detachChildren() potentially detaches the frame from the document. The 364 // detachChildren() potentially detaches the frame from the document. The
365 // loading cannot continue in that case. 365 // loading cannot continue in that case.
366 if (!m_frame->page()) 366 if (!m_frame->page())
367 return; 367 return;
368 368
369 client()->transitionToCommittedForNewPage(); 369 client()->transitionToCommittedForNewPage();
370 documentLoader->replaceDocumentWhileExecutingJavaScriptURL(init, source); 370 documentLoader->replaceDocumentWhileExecutingJavaScriptURL(init, source);
371 } 371 }
372 372
373 void FrameLoader::receivedMainResourceRedirect(const KURL& newURL) 373 void FrameLoader::clearProvisionalHistoryItem()
374 { 374 {
375 client()->dispatchDidReceiveServerRedirectForProvisionalLoad();
376
377 // If a back/forward navigation redirects, don't reuse any state from the Hi storyItem.
378 m_provisionalItem.clear(); 375 m_provisionalItem.clear();
379 } 376 }
380 377
381 void FrameLoader::setHistoryItemStateForCommit(FrameLoadType loadType, HistoryCo mmitType historyCommitType, HistoryNavigationType navigationType) 378 void FrameLoader::setHistoryItemStateForCommit(FrameLoadType loadType, HistoryCo mmitType historyCommitType, HistoryNavigationType navigationType)
382 { 379 {
383 HistoryItem* oldItem = m_currentItem; 380 HistoryItem* oldItem = m_currentItem;
384 if (isBackForwardLoadType(loadType) && m_provisionalItem) 381 if (isBackForwardLoadType(loadType) && m_provisionalItem)
385 m_currentItem = m_provisionalItem.release(); 382 m_currentItem = m_provisionalItem.release();
386 else 383 else
387 m_currentItem = HistoryItem::create(); 384 m_currentItem = HistoryItem::create();
(...skipping 1234 matching lines...) Expand 10 before | Expand all | Expand 10 after
1622 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa der->url() : String()); 1619 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa der->url() : String());
1623 return tracedValue; 1620 return tracedValue;
1624 } 1621 }
1625 1622
1626 inline void FrameLoader::takeObjectSnapshot() const 1623 inline void FrameLoader::takeObjectSnapshot() const
1627 { 1624 {
1628 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced Value()); 1625 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced Value());
1629 } 1626 }
1630 1627
1631 } // namespace blink 1628 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameLoader.h ('k') | third_party/WebKit/Source/web/WebDataSourceImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698