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

Unified Diff: Source/core/frame/DOMWindow.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/frame/DOMWindow.cpp
diff --git a/Source/core/frame/DOMWindow.cpp b/Source/core/frame/DOMWindow.cpp
index 28661b8e793fe0cf85b0d9e0df6f8988365e1dd5..8953860447cf75b23567b10e516767539571cd42 100644
--- a/Source/core/frame/DOMWindow.cpp
+++ b/Source/core/frame/DOMWindow.cpp
@@ -70,6 +70,7 @@
#include "core/frame/Screen.h"
#include "core/frame/Settings.h"
#include "core/html/HTMLFrameOwnerElement.h"
+#include "core/html/StableState.h"
#include "core/inspector/InspectorInstrumentation.h"
#include "core/inspector/ScriptCallStack.h"
#include "core/loader/DocumentLoader.h"
@@ -1012,6 +1013,10 @@ void DOMWindow::print()
return;
}
m_shouldPrintWhenFinishedLoading = false;
+
+ // http://whatwg.org/html#pause
+ StableState::provide();
+
host->chrome().print(m_frame);
}
@@ -1033,6 +1038,9 @@ void DOMWindow::alert(const String& message)
if (!host)
return;
+ // http://whatwg.org/html#pause
+ StableState::provide();
acolwell GONE FROM CHROMIUM 2014/02/10 22:36:05 nit: You should probably find a good home for the
philipj_slow 2014/02/11 17:25:21 Yeah, I started looking for a place and a name but
+
host->chrome().runJavaScriptAlert(m_frame, message);
}
@@ -1047,6 +1055,9 @@ bool DOMWindow::confirm(const String& message)
if (!host)
return false;
+ // http://whatwg.org/html#pause
+ StableState::provide();
+
return host->chrome().runJavaScriptConfirm(m_frame, message);
}
@@ -1061,6 +1072,9 @@ String DOMWindow::prompt(const String& message, const String& defaultValue)
if (!host)
return String();
+ // http://whatwg.org/html#pause
+ StableState::provide();
+
String returnValue;
if (host->chrome().runJavaScriptPrompt(m_frame, message, defaultValue, returnValue))
return returnValue;

Powered by Google App Engine
This is Rietveld 408576698