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

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: Change new method name 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
« no previous file with comments | « 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 0c218bcf5a772cdf7ff1766a733cac77091ea9c6..74d0df4fc9a4d75781313491ae5e249230731ec7 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()->isLoadEventCompleted())
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()->isLoadEventCompleted())
client()->didStopLoading();
}
« no previous file with comments | « Source/core/dom/Document.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698