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

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

Issue 2943523002: Fire start/stop based on Frame::IsLoading for same document navigations (Closed)
Patch Set: Fire start/stop based on IsLoading Created 3 years, 6 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
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/navigation/same-origin-fragment-navigation-is-sync-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1b02fd54ecfb16f3665ddeb6f5b18392400ea201..8b043327999a73d7a5ab0e6f9d545ae3ee91a75d 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -499,8 +499,8 @@ void FrameLoader::UpdateForSameDocumentNavigation(
// handler. See https://bugs.webkit.org/show_bug.cgi?id=31838
// Do not fire the notifications if the frame is concurrently navigating away
// from the document, since a new document is already loading.
- if (frame_->GetDocument()->LoadEventFinished() &&
- !provisional_document_loader_)
+ bool was_loading = frame_->IsLoading();
+ if (!was_loading)
Client()->DidStartLoading(kNavigationWithinSameDocument);
// Update the data source's request with the new URL to fake the URL change
@@ -508,10 +508,7 @@ void FrameLoader::UpdateForSameDocumentNavigation(
GetDocumentLoader()->UpdateForSameDocumentNavigation(
new_url, same_document_navigation_source, std::move(data),
scroll_restoration_type, type, initiating_document);
-
- Client()->DispatchDidReceiveTitle(frame_->GetDocument()->title());
Nate Chapin 2017/06/19 20:49:31 DispatchDidReceiveTitle should be called whenever
- if (frame_->GetDocument()->LoadEventFinished() &&
- !provisional_document_loader_)
+ if (!was_loading)
Client()->DidStopLoading();
}
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/navigation/same-origin-fragment-navigation-is-sync-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698