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

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

Issue 2475693002: Do not reset NavigationHandle when navigating same-page (Closed)
Patch Set: Rebase Created 4 years, 1 month 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 031199d6675b7907a7f77c7e2eb8dc81a63a6c7d..24811542a83ff0c5f33a7e5e2ce50f214008fe77 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -797,7 +797,9 @@ void FrameLoader::updateForSameDocumentNavigation(
// Generate start and stop notifications only when loader is completed so that
// we don't fire them for fragment redirection that happens in window.onload
// handler. See https://bugs.webkit.org/show_bug.cgi?id=31838
- if (m_frame->document()->loadEventFinished())
+ // Do not fire the notifications if the frame is navigating away from the
+ // document, since a new document is already loading.
Charlie Reis 2016/11/04 17:30:53 nit: concurrently navigating away
clamy 2016/11/07 14:10:51 Done.
+ if (m_frame->document()->loadEventFinished() && !m_provisionalDocumentLoader)
client()->didStartLoading(NavigationWithinSameDocument);
HistoryCommitType historyCommitType = loadTypeToCommitType(type);
@@ -820,7 +822,7 @@ void FrameLoader::updateForSameDocumentNavigation(
client()->dispatchDidNavigateWithinPage(
m_currentItem.get(), historyCommitType, !!initiatingDocument);
client()->dispatchDidReceiveTitle(m_frame->document()->title());
- if (m_frame->document()->loadEventFinished())
+ if (m_frame->document()->loadEventFinished() && !m_provisionalDocumentLoader)
client()->didStopLoading();
}

Powered by Google App Engine
This is Rietveld 408576698