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

Unified Diff: Source/WebKit/chromium/src/ChromeClientImpl.cpp

Issue 11413067: Merge 134654 - [chromium] Don't let shift-click turn popup into tab. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebKit/chromium/src/ChromeClientImpl.cpp
===================================================================
--- Source/WebKit/chromium/src/ChromeClientImpl.cpp (revision 135169)
+++ Source/WebKit/chromium/src/ChromeClientImpl.cpp (working copy)
@@ -291,7 +291,12 @@
bool alt = mouseEvent->modifiers & WebMouseEvent::AltKey;
bool meta = mouseEvent->modifiers & WebMouseEvent::MetaKey;
- WebViewImpl::navigationPolicyFromMouseEvent(buttonNumber, ctrl, shift, alt, meta, policy);
+ WebNavigationPolicy userPolicy = *policy;
+ WebViewImpl::navigationPolicyFromMouseEvent(buttonNumber, ctrl, shift, alt, meta, &userPolicy);
+ // User and app agree that we want a new window; let the app override the decorations.
+ if (userPolicy == WebNavigationPolicyNewWindow && *policy == WebNavigationPolicyNewPopup)
+ return;
+ *policy = userPolicy;
}
WebNavigationPolicy ChromeClientImpl::getNavigationPolicy()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698