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

Unified Diff: Source/core/dom/Document.cpp

Issue 153813002: Support "await a stable state" and "provide a stable state" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: assert more Created 6 years, 10 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: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index b6c9cfd3474f0602b2c1e1f176e2d751128616cf..4c31679b2f26a9b6d5252bb3f92b35d02f7eab78 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -137,6 +137,7 @@
#include "core/html/HTMLStyleElement.h"
#include "core/html/HTMLTitleElement.h"
#include "core/html/PluginDocument.h"
+#include "core/html/StableState.h"
#include "core/html/forms/FormController.h"
#include "core/html/parser/HTMLDocumentParser.h"
#include "core/html/parser/HTMLParserIdioms.h"
@@ -2510,6 +2511,9 @@ bool Document::dispatchBeforeUnloadEvent(Chrome& chrome, bool& didAllowNavigatio
return true;
}
+ // http://whatwg.org/html#pause
+ StableState::provide();
+
String text = beforeUnloadEvent->returnValue();
if (chrome.runBeforeUnloadConfirmPanel(text, m_frame)) {
didAllowNavigation = true;

Powered by Google App Engine
This is Rietveld 408576698