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

Unified Diff: Source/devtools/front_end/host/InspectorFrontendHost.js

Issue 670303002: DevTools: fix Ctrl-Plus/Ctrl-Minus shortcuts for zooming in hosted mode (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix compilation Created 6 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/host/InspectorFrontendHost.js
diff --git a/Source/devtools/front_end/host/InspectorFrontendHost.js b/Source/devtools/front_end/host/InspectorFrontendHost.js
index 00c50e304fbabe81c25a3c82222b247defa207af..011adffffbc371743d505e7589157a54dbe51c9c 100644
--- a/Source/devtools/front_end/host/InspectorFrontendHost.js
+++ b/Source/devtools/front_end/host/InspectorFrontendHost.js
@@ -296,9 +296,20 @@ InspectorFrontendHostAPI.prototype = {
/**
* @constructor
* @implements {InspectorFrontendHostAPI}
+ * @suppressGlobalPropertiesCheck
*/
WebInspector.InspectorFrontendHostStub = function()
{
+ /**
+ * @param {!Event} event
+ */
+ function stopEventPropagation(event)
+ {
+ // Let browser handle Ctrl+/Ctrl- shortcuts in hosted mode.
+ if (event.ctrlKey && (event.keyCode === 187 || event.keyCode === 189))
+ event.stopPropagation();
+ }
+ document.addEventListener("keydown", stopEventPropagation, true);
}
WebInspector.InspectorFrontendHostStub.prototype = {
« 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