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

Unified Diff: third_party/WebKit/Source/core/loader/FrameLoader.cpp

Issue 2584513003: PlzNavigate: identify same-page browser-initiated navigation. (Closed)
Patch Set: Very minor fix. 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/loader/FrameLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
index e664eb27cae54417d51390f29bb50218095ea927..25cd699d5490e2a9c52b5b334921aef234feb68f 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -1174,7 +1174,6 @@ void FrameLoader::load(const FrameLoadRequest& passedRequest,
shouldPerformFragmentNavigation(request.form(),
request.resourceRequest().httpMethod(),
newLoadType, url);
-
// Perform same document navigation.
if (sameDocumentHistoryNavigation || sameDocumentNavigation) {
DCHECK(historyItem || !sameDocumentHistoryNavigation);
@@ -1193,6 +1192,14 @@ void FrameLoader::load(const FrameLoadRequest& passedRequest,
return;
}
+ // PlzNavigate
+ // If the loader classifies this navigation as a different document navigation
+ // while the browser intended the navigation to be same-document, it means
+ // that a different navigation must have committed while the IPC was sent.
+ // This navigation is no more same-document. The navigation is simply dropped.
+ if (request.resourceRequest().isSameDocumentNavigation())
+ return;
+
startLoad(request, newLoadType, policy);
}

Powered by Google App Engine
This is Rietveld 408576698