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

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

Issue 2863203002: Ignore print() during page dismissal. (Closed)
Patch Set: rebase, addressing comments 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 de6af36341fd010ea6f0d74ac0e88986a347b4c6..a4760020f967810acbe60f39034b2bd2d4d5d71b 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(
« no previous file with comments | « third_party/WebKit/Source/core/page/ChromeClient.h ('k') | third_party/WebKit/Source/web/ChromeClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698