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

Unified Diff: third_party/WebKit/Source/core/loader/DocumentLoader.h

Issue 1364863002: DocumentLoader::isCommittedButEmpty is timing-dependent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Emulate onPageFinished Created 4 years, 5 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
Index: third_party/WebKit/Source/core/loader/DocumentLoader.h
diff --git a/third_party/WebKit/Source/core/loader/DocumentLoader.h b/third_party/WebKit/Source/core/loader/DocumentLoader.h
index 2551df872fb5b04b5a3a8cccd0329f13346b2be6..b3c61239392e10bb743751b72af656e8147ee80d 100644
--- a/third_party/WebKit/Source/core/loader/DocumentLoader.h
+++ b/third_party/WebKit/Source/core/loader/DocumentLoader.h
@@ -107,7 +107,7 @@ public:
bool replacesCurrentHistoryItem() const { return m_replacesCurrentHistoryItem; }
void setReplacesCurrentHistoryItem(bool replacesCurrentHistoryItem) { m_replacesCurrentHistoryItem = replacesCurrentHistoryItem; }
- bool isCommittedButEmpty() const { return m_state == Committed; }
+ bool isCommittedButEmpty() const { return m_state >= Committed && !m_dataReceived; }
void setSentDidFinishLoad() { m_state = SentDidFinishLoad; }
bool sentDidFinishLoad() const { return m_state == SentDidFinishLoad; }
@@ -213,6 +213,7 @@ private:
bool m_isClientRedirect;
bool m_replacesCurrentHistoryItem;
+ bool m_dataReceived;
NavigationType m_navigationType;
@@ -232,7 +233,6 @@ private:
NotStarted,
Provisional,
Committed,
- DataReceived,
MainResourceDone,
SentDidFinishLoad
};

Powered by Google App Engine
This is Rietveld 408576698