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

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

Issue 2584513003: PlzNavigate: identify same-page browser-initiated navigation. (Closed)
Patch Set: Fix 2 WebContentsImplTest by assigning a document_sequence_number. Created 3 years, 11 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 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 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after
1176 newLoadType, false, request.triggeringEvent())); 1176 newLoadType, false, request.triggeringEvent()));
1177 if (shouldTreatURLAsSameAsCurrent(url)) 1177 if (shouldTreatURLAsSameAsCurrent(url))
1178 newLoadType = FrameLoadTypeReplaceCurrentItem; 1178 newLoadType = FrameLoadTypeReplaceCurrentItem;
1179 } 1179 }
1180 1180
1181 loadInSameDocument(url, stateObject, newLoadType, historyLoadType, 1181 loadInSameDocument(url, stateObject, newLoadType, historyLoadType,
1182 request.clientRedirect(), request.originDocument()); 1182 request.clientRedirect(), request.originDocument());
1183 return; 1183 return;
1184 } 1184 }
1185 1185
1186 // PlzNavigate
1187 // If the loader classifies this navigation as a different document navigation
1188 // while the browser intended the navigation to be same-document, it means
1189 // that a different navigation must have committed while the IPC was sent.
1190 // This navigation is no more same-document and must be relaunched.
1191 if (request.resourceRequest().isSameDocumentNavigation())
1192 request.resourceRequest().setCheckForBrowserSideNavigation(true);
1193
1186 startLoad(request, newLoadType, policy); 1194 startLoad(request, newLoadType, policy);
1187 } 1195 }
1188 1196
1189 SubstituteData FrameLoader::defaultSubstituteDataForURL(const KURL& url) { 1197 SubstituteData FrameLoader::defaultSubstituteDataForURL(const KURL& url) {
1190 if (!shouldTreatURLAsSrcdocDocument(url)) 1198 if (!shouldTreatURLAsSrcdocDocument(url))
1191 return SubstituteData(); 1199 return SubstituteData();
1192 String srcdoc = m_frame->deprecatedLocalOwner()->fastGetAttribute(srcdocAttr); 1200 String srcdoc = m_frame->deprecatedLocalOwner()->fastGetAttribute(srcdocAttr);
1193 DCHECK(!srcdoc.isNull()); 1201 DCHECK(!srcdoc.isNull());
1194 CString encodedSrcdoc = srcdoc.utf8(); 1202 CString encodedSrcdoc = srcdoc.utf8();
1195 return SubstituteData( 1203 return SubstituteData(
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
1896 m_documentLoader ? m_documentLoader->url() : String()); 1904 m_documentLoader ? m_documentLoader->url() : String());
1897 return tracedValue; 1905 return tracedValue;
1898 } 1906 }
1899 1907
1900 inline void FrameLoader::takeObjectSnapshot() const { 1908 inline void FrameLoader::takeObjectSnapshot() const {
1901 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, 1909 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this,
1902 toTracedValue()); 1910 toTracedValue());
1903 } 1911 }
1904 1912
1905 } // namespace blink 1913 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698