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

Unified Diff: Source/web/WebLocalFrameImpl.cpp

Issue 514603004: Make WebFrame::isLoading() local-only and map it to load event completion (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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/web/WebLocalFrameImpl.h ('k') | public/web/WebLocalFrame.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebLocalFrameImpl.cpp
diff --git a/Source/web/WebLocalFrameImpl.cpp b/Source/web/WebLocalFrameImpl.cpp
index 4ed3d84b79ed8cf92ccbfbf500873526525e86f2..93f5483a6bf057b5791ed330235400e9d712e3f8 100644
--- a/Source/web/WebLocalFrameImpl.cpp
+++ b/Source/web/WebLocalFrameImpl.cpp
@@ -96,6 +96,7 @@
#include "core/editing/TextIterator.h"
#include "core/editing/htmlediting.h"
#include "core/editing/markup.h"
+#include "core/fetch/ResourceFetcher.h"
#include "core/frame/Console.h"
#include "core/frame/LocalDOMWindow.h"
#include "core/frame/FrameHost.h"
@@ -874,9 +875,16 @@ void WebLocalFrameImpl::sendPings(const WebNode& linkNode, const WebURL& destina
bool WebLocalFrameImpl::isLoading() const
{
- if (!frame())
+ if (!frame() || !frame()->document())
+ return false;
+ return frame()->loader().stateMachine()->isDisplayingInitialEmptyDocument() || !frame()->document()->loadEventFinished();
+}
+
+bool WebLocalFrameImpl::isResourceLoadInProgress() const
+{
+ if (!frame() || !frame()->document())
return false;
- return frame()->loader().isLoading();
+ return frame()->document()->fetcher()->requestCount();
}
void WebLocalFrameImpl::stopLoading()
« no previous file with comments | « Source/web/WebLocalFrameImpl.h ('k') | public/web/WebLocalFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698