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

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

Issue 2705373006: PlzNavigate: Fix the fast/loader/crash-replacing-location-before-load.html layout test. (Closed)
Patch Set: Created 3 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/FlagExpectations/enable-browser-side-navigation ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
6 * (http://www.torchmobile.com/) 6 * (http://www.torchmobile.com/)
7 * Copyright (C) 2008 Alp Toker <alp@atoker.com> 7 * Copyright (C) 2008 Alp Toker <alp@atoker.com>
8 * Copyright (C) Research In Motion Limited 2009. All rights reserved. 8 * Copyright (C) Research In Motion Limited 2009. All rights reserved.
9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> 9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com>
10 * Copyright (C) 2011 Google Inc. All rights reserved. 10 * Copyright (C) 2011 Google Inc. All rights reserved.
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 FrameLoadType frameLoadType, 857 FrameLoadType frameLoadType,
858 HistoryLoadType historyLoadType, 858 HistoryLoadType historyLoadType,
859 ClientRedirectPolicy clientRedirect, 859 ClientRedirectPolicy clientRedirect,
860 Document* initiatingDocument) { 860 Document* initiatingDocument) {
861 // If we have a state object, we cannot also be a new navigation. 861 // If we have a state object, we cannot also be a new navigation.
862 DCHECK(!stateObject || frameLoadType == FrameLoadTypeBackForward); 862 DCHECK(!stateObject || frameLoadType == FrameLoadTypeBackForward);
863 863
864 // If we have a provisional request for a different document, a fragment 864 // If we have a provisional request for a different document, a fragment
865 // scroll should cancel it. 865 // scroll should cancel it.
866 detachDocumentLoader(m_provisionalDocumentLoader); 866 detachDocumentLoader(m_provisionalDocumentLoader);
867
868 // PlzNavigate: A fragment scroll should clear ongoing client navigations.
869 clearNavigationHandledByClient();
870
867 if (!m_frame->host()) 871 if (!m_frame->host())
868 return; 872 return;
869 saveScrollState(); 873 saveScrollState();
870 874
871 KURL oldURL = m_frame->document()->url(); 875 KURL oldURL = m_frame->document()->url();
872 bool hashChange = equalIgnoringFragmentIdentifier(url, oldURL) && 876 bool hashChange = equalIgnoringFragmentIdentifier(url, oldURL) &&
873 url.fragmentIdentifier() != oldURL.fragmentIdentifier(); 877 url.fragmentIdentifier() != oldURL.fragmentIdentifier();
874 if (hashChange) { 878 if (hashChange) {
875 // If we were in the autoscroll/middleClickAutoscroll mode we want to stop 879 // If we were in the autoscroll/middleClickAutoscroll mode we want to stop
876 // it before following the link to the anchor 880 // it before following the link to the anchor
(...skipping 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after
2032 m_isNavigationHandledByClient = true; 2036 m_isNavigationHandledByClient = true;
2033 InspectorInstrumentation::frameScheduledClientNavigation(m_frame); 2037 InspectorInstrumentation::frameScheduledClientNavigation(m_frame);
2034 } 2038 }
2035 2039
2036 void FrameLoader::clearNavigationHandledByClient() { 2040 void FrameLoader::clearNavigationHandledByClient() {
2037 m_isNavigationHandledByClient = false; 2041 m_isNavigationHandledByClient = false;
2038 InspectorInstrumentation::frameClearedScheduledClientNavigation(m_frame); 2042 InspectorInstrumentation::frameClearedScheduledClientNavigation(m_frame);
2039 } 2043 }
2040 2044
2041 } // namespace blink 2045 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/FlagExpectations/enable-browser-side-navigation ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698