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

Side by Side Diff: Source/WebCore/inspector/front-end/inspector.js

Issue 10963058: Merge 129348 - Web Inspector: [REGRESSION] Cmd-Shift-C doesn't enable element inspection mode when … (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1271/
Patch Set: Created 8 years, 3 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 unified diff | Download patch
« no previous file with comments | « Source/WebCore/inspector/front-end/InspectorFrontendAPI.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). 3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com).
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 var mainStatusBar = document.getElementById("main-status-bar"); 80 var mainStatusBar = document.getElementById("main-status-bar");
81 mainStatusBar.insertBefore(this._dockToggleButton.element, bottomStatusB arContainer); 81 mainStatusBar.insertBefore(this._dockToggleButton.element, bottomStatusB arContainer);
82 82
83 this._toggleConsoleButton = new WebInspector.StatusBarButton(WebInspecto r.UIString("Show console."), "console-status-bar-item"); 83 this._toggleConsoleButton = new WebInspector.StatusBarButton(WebInspecto r.UIString("Show console."), "console-status-bar-item");
84 this._toggleConsoleButton.addEventListener("click", this._toggleConsoleB uttonClicked.bind(this), false); 84 this._toggleConsoleButton.addEventListener("click", this._toggleConsoleB uttonClicked.bind(this), false);
85 mainStatusBar.insertBefore(this._toggleConsoleButton.element, bottomStat usBarContainer); 85 mainStatusBar.insertBefore(this._toggleConsoleButton.element, bottomStat usBarContainer);
86 86
87 if (!WebInspector.WorkerManager.isWorkerFrontend()) { 87 if (!WebInspector.WorkerManager.isWorkerFrontend()) {
88 this._nodeSearchButton = new WebInspector.StatusBarButton(WebInspect or.UIString("Select an element in the page to inspect it."), "node-search-status -bar-item"); 88 this._nodeSearchButton = new WebInspector.StatusBarButton(WebInspect or.UIString("Select an element in the page to inspect it."), "node-search-status -bar-item");
89 this._nodeSearchButton.addEventListener("click", this._toggleSearchi ngForNode, this); 89 this._nodeSearchButton.addEventListener("click", this.toggleSearchin gForNode, this);
90 mainStatusBar.insertBefore(this._nodeSearchButton.element, bottomSta tusBarContainer); 90 mainStatusBar.insertBefore(this._nodeSearchButton.element, bottomSta tusBarContainer);
91 } 91 }
92 92
93 mainStatusBar.appendChild(this.settingsController.statusBarItem); 93 mainStatusBar.appendChild(this.settingsController.statusBarItem);
94 }, 94 },
95 95
96 _createDockOptions: function() 96 _createDockOptions: function()
97 { 97 {
98 var alternateDockToggleButton1 = new WebInspector.StatusBarButton("Dock to main window.", "dock-status-bar-item", 3); 98 var alternateDockToggleButton1 = new WebInspector.StatusBarButton("Dock to main window.", "dock-status-bar-item", 3);
99 var alternateDockToggleButton2 = new WebInspector.StatusBarButton("Undoc k into separate window.", "dock-status-bar-item", 3); 99 var alternateDockToggleButton2 = new WebInspector.StatusBarButton("Undoc k into separate window.", "dock-status-bar-item", 3);
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 this._zoomLevel = 0; 349 this._zoomLevel = 0;
350 this._requestZoom(); 350 this._requestZoom();
351 }, 351 },
352 352
353 _requestZoom: function() 353 _requestZoom: function()
354 { 354 {
355 WebInspector.settings.zoomLevel.set(this._zoomLevel); 355 WebInspector.settings.zoomLevel.set(this._zoomLevel);
356 InspectorFrontendHost.setZoomFactor(Math.pow(1.2, this._zoomLevel)); 356 InspectorFrontendHost.setZoomFactor(Math.pow(1.2, this._zoomLevel));
357 }, 357 },
358 358
359 _toggleSearchingForNode: function() 359 toggleSearchingForNode: function()
360 { 360 {
361 var enabled = !this._nodeSearchButton.toggled; 361 var enabled = !this._nodeSearchButton.toggled;
362 /** 362 /**
363 * @param {?Protocol.Error} error 363 * @param {?Protocol.Error} error
364 */ 364 */
365 function callback(error) 365 function callback(error)
366 { 366 {
367 if (!error) 367 if (!error)
368 this._nodeSearchButton.toggled = enabled; 368 this._nodeSearchButton.toggled = enabled;
369 } 369 }
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 855
856 // Cmd/Control + Shift + C should be a shortcut to clicking the Node Search Button. 856 // Cmd/Control + Shift + C should be a shortcut to clicking the Node Search Button.
857 // This shortcut matches Firebug. 857 // This shortcut matches Firebug.
858 if (event.keyIdentifier === "U+0043") { // C key 858 if (event.keyIdentifier === "U+0043") { // C key
859 if (WebInspector.isMac()) 859 if (WebInspector.isMac())
860 var isNodeSearchKey = event.metaKey && !event.ctrlKey && !event.altK ey && event.shiftKey; 860 var isNodeSearchKey = event.metaKey && !event.ctrlKey && !event.altK ey && event.shiftKey;
861 else 861 else
862 var isNodeSearchKey = event.ctrlKey && !event.metaKey && !event.altK ey && event.shiftKey; 862 var isNodeSearchKey = event.ctrlKey && !event.metaKey && !event.altK ey && event.shiftKey;
863 863
864 if (isNodeSearchKey) { 864 if (isNodeSearchKey) {
865 this._toggleSearchingForNode(); 865 this.toggleSearchingForNode();
866 event.consume(true); 866 event.consume(true);
867 return; 867 return;
868 } 868 }
869 return; 869 return;
870 } 870 }
871 } 871 }
872 872
873 WebInspector.postDocumentKeyDown = function(event) 873 WebInspector.postDocumentKeyDown = function(event)
874 { 874 {
875 if (event.handled) 875 if (event.handled)
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
1088 { 1088 {
1089 doc.addEventListener("keydown", this.documentKeyDown.bind(this), true); 1089 doc.addEventListener("keydown", this.documentKeyDown.bind(this), true);
1090 doc.addEventListener("keydown", this.postDocumentKeyDown.bind(this), false); 1090 doc.addEventListener("keydown", this.postDocumentKeyDown.bind(this), false);
1091 doc.addEventListener("beforecopy", this.documentCanCopy.bind(this), true); 1091 doc.addEventListener("beforecopy", this.documentCanCopy.bind(this), true);
1092 doc.addEventListener("copy", this.documentCopy.bind(this), true); 1092 doc.addEventListener("copy", this.documentCopy.bind(this), true);
1093 doc.addEventListener("contextmenu", this.contextMenuEventFired.bind(this), t rue); 1093 doc.addEventListener("contextmenu", this.contextMenuEventFired.bind(this), t rue);
1094 doc.addEventListener("click", this.documentClick.bind(this), true); 1094 doc.addEventListener("click", this.documentClick.bind(this), true);
1095 } 1095 }
1096 1096
1097 WebInspector.ProfileURLRegExp = /webkit-profile:\/\/(.+)\/(.+)#([0-9]+)/; 1097 WebInspector.ProfileURLRegExp = /webkit-profile:\/\/(.+)\/(.+)#([0-9]+)/;
OLDNEW
« no previous file with comments | « Source/WebCore/inspector/front-end/InspectorFrontendAPI.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698