OLD | NEW |
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 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
826 if (isValidZoomShortcut && !event.shiftKey) { | 826 if (isValidZoomShortcut && !event.shiftKey) { |
827 WebInspector._resetZoom(); | 827 WebInspector._resetZoom(); |
828 event.consume(true); | 828 event.consume(true); |
829 } | 829 } |
830 break; | 830 break; |
831 } | 831 } |
832 } | 832 } |
833 | 833 |
834 WebInspector.postDocumentKeyDown = function(event) | 834 WebInspector.postDocumentKeyDown = function(event) |
835 { | 835 { |
| 836 var Esc = "U+001B"; |
| 837 |
836 if (event.handled) | 838 if (event.handled) |
837 return; | 839 return; |
838 | 840 |
839 if (event.keyCode === WebInspector.KeyboardShortcut.Keys.Esc.code) { | 841 if (event.keyIdentifier === Esc) { |
840 if (WebInspector.searchController.isSearchVisible()) { | 842 if (WebInspector.searchController.isSearchVisible()) { |
841 WebInspector.searchController.closeSearch(); | 843 WebInspector.searchController.closeSearch(); |
842 return; | 844 return; |
843 } | 845 } |
844 // If drawer is open with some view other than console then close it. | 846 // If drawer is open with some view other than console then close it. |
845 if (!this._toggleConsoleButton.toggled && WebInspector.drawer.visible) | 847 if (!this._toggleConsoleButton.toggled && WebInspector.drawer.visible) |
846 this.closeViewInDrawer(); | 848 this.closeViewInDrawer(); |
847 else | 849 else |
848 this._toggleConsoleButtonClicked(); | 850 this._toggleConsoleButtonClicked(); |
849 } | 851 } |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1097 | 1099 |
1098 /** | 1100 /** |
1099 * @return {string} | 1101 * @return {string} |
1100 */ | 1102 */ |
1101 WebInspector.getSelectionForegroundColor = function() | 1103 WebInspector.getSelectionForegroundColor = function() |
1102 { | 1104 { |
1103 return InspectorFrontendHost.getSelectionForegroundColor(); | 1105 return InspectorFrontendHost.getSelectionForegroundColor(); |
1104 } | 1106 } |
1105 | 1107 |
1106 window.DEBUG = true; | 1108 window.DEBUG = true; |
OLD | NEW |