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

Unified Diff: third_party/WebKit/Source/core/page/ChromeClient.cpp

Issue 2863203002: Ignore print() during page dismissal. (Closed)
Patch Set: rebase, fix linux build Created 3 years, 7 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/page/ChromeClient.cpp
diff --git a/third_party/WebKit/Source/core/page/ChromeClient.cpp b/third_party/WebKit/Source/core/page/ChromeClient.cpp
index a7c4ea868efbf805f6c00a50f6c8e5cf9fadac22..d6c420805cb2fcef263c7bd16bdd633fb4411c73 100644
--- a/third_party/WebKit/Source/core/page/ChromeClient.cpp
+++ b/third_party/WebKit/Source/core/page/ChromeClient.cpp
@@ -29,6 +29,7 @@
#include "core/inspector/ConsoleMessage.h"
#include "core/layout/HitTestResult.h"
#include "core/page/FrameTree.h"
+#include "core/page/Page.h"
#include "core/page/ScopedPageSuspender.h"
#include "core/page/WindowFeatures.h"
#include "core/probe/CoreProbes.h"
@@ -222,6 +223,11 @@ void ChromeClient::ClearToolTip(LocalFrame& frame) {
}
bool ChromeClient::Print(LocalFrame* frame) {
+ if (!CanOpenModalIfDuringPageDismissal(*frame->GetPage()->MainFrame(),
+ ChromeClient::kPrintDialog, "")) {
+ return false;
+ }
+
if (frame->GetDocument()->IsSandboxed(kSandboxModals)) {
UseCounter::Count(frame, UseCounter::kDialogInSandboxedContext);
frame->Console().AddMessage(ConsoleMessage::Create(

Powered by Google App Engine
This is Rietveld 408576698