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

Unified Diff: third_party/WebKit/Source/web/ChromeClientImpl.cpp

Issue 2160473002: Don't allow deferred frames to create new windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/tests/ChromeClientImplTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/ChromeClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/ChromeClientImpl.cpp b/third_party/WebKit/Source/web/ChromeClientImpl.cpp
index ab5b0e7b38da10ede99bb915ea7f6405b1e21267..3d0bf95dd324a920a57a37ca0f3cd260e3805720 100644
--- a/third_party/WebKit/Source/web/ChromeClientImpl.cpp
+++ b/third_party/WebKit/Source/web/ChromeClientImpl.cpp
@@ -355,6 +355,9 @@ Page* ChromeClientImpl::createWindow(LocalFrame* frame, const FrameLoadRequest&
if (!m_webView->client())
return nullptr;
+ if (!frame->page() || frame->page()->defersLoading())
+ return nullptr;
+
WebNavigationPolicy policy = effectiveNavigationPolicy(navigationPolicy, features);
DCHECK(frame->document());
Fullscreen::fullyExitFullscreen(*frame->document());
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/tests/ChromeClientImplTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698