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

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

Issue 9965056: Merge 112539 - Web Inspector: "go to the previous panel" shortcut is painful to maintain (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 8 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/TimelinePanel.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 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 } 645 }
646 646
647 WebInspector._registerShortcuts = function() 647 WebInspector._registerShortcuts = function()
648 { 648 {
649 var shortcut = WebInspector.KeyboardShortcut; 649 var shortcut = WebInspector.KeyboardShortcut;
650 var section = WebInspector.shortcutsScreen.section(WebInspector.UIString("Al l Panels")); 650 var section = WebInspector.shortcutsScreen.section(WebInspector.UIString("Al l Panels"));
651 var keys = [ 651 var keys = [
652 shortcut.shortcutToString("]", shortcut.Modifiers.CtrlOrMeta), 652 shortcut.shortcutToString("]", shortcut.Modifiers.CtrlOrMeta),
653 shortcut.shortcutToString("[", shortcut.Modifiers.CtrlOrMeta) 653 shortcut.shortcutToString("[", shortcut.Modifiers.CtrlOrMeta)
654 ]; 654 ];
655 section.addRelatedKeys(keys, WebInspector.UIString("Next/previous panel")); 655 section.addRelatedKeys(keys, WebInspector.UIString("Go to the panel to the l eft/right"));
656
657 var keys = [
658 shortcut.shortcutToString("[", shortcut.Modifiers.CtrlOrMeta | shortcut. Modifiers.Alt),
659 shortcut.shortcutToString("]", shortcut.Modifiers.CtrlOrMeta | shortcut. Modifiers.Alt)
660 ];
661 section.addRelatedKeys(keys, WebInspector.UIString("Go back/forward in panel history"));
662
656 section.addKey(shortcut.shortcutToString(shortcut.Keys.Esc), WebInspector.UI String("Toggle console")); 663 section.addKey(shortcut.shortcutToString(shortcut.Keys.Esc), WebInspector.UI String("Toggle console"));
657 section.addKey(shortcut.shortcutToString("f", shortcut.Modifiers.CtrlOrMeta) , WebInspector.UIString("Search")); 664 section.addKey(shortcut.shortcutToString("f", shortcut.Modifiers.CtrlOrMeta) , WebInspector.UIString("Search"));
658 665
659 var advancedSearchShortcut = WebInspector.AdvancedSearchController.createSho rtcut(); 666 var advancedSearchShortcut = WebInspector.AdvancedSearchController.createSho rtcut();
660 section.addKey(advancedSearchShortcut.name, WebInspector.UIString("Search ac ross all scripts")); 667 section.addKey(advancedSearchShortcut.name, WebInspector.UIString("Search ac ross all scripts"));
661 668
662 if (WebInspector.isMac()) { 669 if (WebInspector.isMac()) {
663 keys = [ 670 keys = [
664 shortcut.shortcutToString("g", shortcut.Modifiers.Meta), 671 shortcut.shortcutToString("g", shortcut.Modifiers.Meta),
665 shortcut.shortcutToString("g", shortcut.Modifiers.Meta | shortcut.Mo difiers.Shift) 672 shortcut.shortcutToString("g", shortcut.Modifiers.Meta | shortcut.Mo difiers.Shift)
666 ]; 673 ];
667 section.addRelatedKeys(keys, WebInspector.UIString("Find next/previous") ); 674 section.addRelatedKeys(keys, WebInspector.UIString("Find next/previous") );
668 } 675 }
669 676
670 var goToShortcut = WebInspector.GoToLineDialog.createShortcut(); 677 var goToShortcut = WebInspector.GoToLineDialog.createShortcut();
671 section.addKey(goToShortcut.name, WebInspector.UIString("Go to Line")); 678 section.addKey(goToShortcut.name, WebInspector.UIString("Go to line"));
672 } 679 }
673 680
674 WebInspector.documentKeyDown = function(event) 681 WebInspector.documentKeyDown = function(event)
675 { 682 {
676 const helpKey = WebInspector.isMac() ? "U+003F" : "U+00BF"; // "?" for both platforms 683 const helpKey = WebInspector.isMac() ? "U+003F" : "U+00BF"; // "?" for both platforms
677 684
678 if (event.keyIdentifier === "F1" || 685 if (event.keyIdentifier === "F1" ||
679 (event.keyIdentifier === helpKey && event.shiftKey && (!WebInspector.isB eingEdited(event.target) || event.metaKey))) { 686 (event.keyIdentifier === helpKey && event.shiftKey && (!WebInspector.isB eingEdited(event.target) || event.metaKey))) {
680 WebInspector.shortcutsScreen.show(); 687 WebInspector.shortcutsScreen.show();
681 event.consume(); 688 event.consume();
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 WebInspector.frontendReused = function() 1003 WebInspector.frontendReused = function()
997 { 1004 {
998 this.resourceTreeModel.frontendReused(); 1005 this.resourceTreeModel.frontendReused();
999 } 1006 }
1000 1007
1001 WebInspector._toolbarItemClicked = function(event) 1008 WebInspector._toolbarItemClicked = function(event)
1002 { 1009 {
1003 var toolbarItem = event.currentTarget; 1010 var toolbarItem = event.currentTarget;
1004 WebInspector.inspectorView.setCurrentPanel(toolbarItem.panel); 1011 WebInspector.inspectorView.setCurrentPanel(toolbarItem.panel);
1005 } 1012 }
OLDNEW
« no previous file with comments | « Source/WebCore/inspector/front-end/TimelinePanel.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698