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

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

Issue 984983002: Do not fire didStartLoading and didStopLoading events twice. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« Source/core/dom/Document.h ('K') | « Source/core/dom/Document.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/FrameLoader.cpp
diff --git a/Source/core/loader/FrameLoader.cpp b/Source/core/loader/FrameLoader.cpp
index 65497cf1c2506e975077e69f485e77df01637399..40c2efd092c07dd0eef4b3156e1a1e6ec1efc48f 100644
--- a/Source/core/loader/FrameLoader.cpp
+++ b/Source/core/loader/FrameLoader.cpp
@@ -562,8 +562,8 @@ void FrameLoader::updateForSameDocumentNavigation(const KURL& newURL, SameDocume
// 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())
+ // See https://bugs.webkit.org/show_bug.cgi?id=31838 and crbug.com/464675
+ if (m_frame->document()->shouldFireLoadingEvents())
client()->didStartLoading(NavigationWithinSameDocument);
HistoryCommitType historyCommitType = loadTypeToCommitType(type);
@@ -573,7 +573,7 @@ void FrameLoader::updateForSameDocumentNavigation(const KURL& newURL, SameDocume
setHistoryItemStateForCommit(historyCommitType, sameDocumentNavigationSource == SameDocumentNavigationHistoryApi, data);
client()->dispatchDidNavigateWithinPage(m_currentItem.get(), historyCommitType);
client()->dispatchDidReceiveTitle(m_frame->document()->title());
- if (m_frame->document()->loadEventFinished())
+ if (m_frame->document()->shouldFireLoadingEvents())
client()->didStopLoading();
}
« Source/core/dom/Document.h ('K') | « Source/core/dom/Document.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698