OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
3 * Copyright (C) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 | 666 |
667 // We don't need to update file selector here regardless of whether useS
criptsNavigator is set or not: | 667 // We don't need to update file selector here regardless of whether useS
criptsNavigator is set or not: |
668 // SingleFileEditorContainer never dispatches EditorClosed, so no need t
o update ComboBoxFileSelector; | 668 // SingleFileEditorContainer never dispatches EditorClosed, so no need t
o update ComboBoxFileSelector; |
669 // ScriptsNavigator does not need to update on EditorClosed. | 669 // ScriptsNavigator does not need to update on EditorClosed. |
670 | 670 |
671 this._updateScriptViewStatusBarItems(); | 671 this._updateScriptViewStatusBarItems(); |
672 }, | 672 }, |
673 | 673 |
674 _editorSelected: function(event) | 674 _editorSelected: function(event) |
675 { | 675 { |
676 this._hideNavigatorOverlay(); | |
677 var uiSourceCode = /** @type {WebInspector.UISourceCode} */ event.data; | 676 var uiSourceCode = /** @type {WebInspector.UISourceCode} */ event.data; |
678 this._showFile(uiSourceCode); | 677 this._showFile(uiSourceCode); |
| 678 this._hideNavigatorOverlay(); |
679 }, | 679 }, |
680 | 680 |
681 _fileSelected: function(event) | 681 _fileSelected: function(event) |
682 { | 682 { |
683 this._hideNavigatorOverlay(); | |
684 var uiSourceCode = /** @type {WebInspector.UISourceCode} */ event.data; | 683 var uiSourceCode = /** @type {WebInspector.UISourceCode} */ event.data; |
685 this._showFile(uiSourceCode); | 684 this._showFile(uiSourceCode); |
| 685 this._hideNavigatorOverlay(); |
686 }, | 686 }, |
687 | 687 |
688 _fileSelectorReleasedFocus: function(event) | 688 _fileSelectorReleasedFocus: function(event) |
689 { | 689 { |
690 var uiSourceCode = /** @type {WebInspector.UISourceCode} */ event.data; | 690 var uiSourceCode = /** @type {WebInspector.UISourceCode} */ event.data; |
691 var sourceFrame = this._sourceFramesByUISourceCode.get(uiSourceCode); | 691 var sourceFrame = this._sourceFramesByUISourceCode.get(uiSourceCode); |
692 if (sourceFrame) | 692 if (sourceFrame) |
693 sourceFrame.focus(); | 693 sourceFrame.focus(); |
694 }, | 694 }, |
695 | 695 |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1042 | 1042 |
1043 this._sidebarOverlay.show(this.editorView.element); | 1043 this._sidebarOverlay.show(this.editorView.element); |
1044 }, | 1044 }, |
1045 | 1045 |
1046 _hideNavigatorOverlay: function() | 1046 _hideNavigatorOverlay: function() |
1047 { | 1047 { |
1048 if (!this._navigatorOverlayShown) | 1048 if (!this._navigatorOverlayShown) |
1049 return; | 1049 return; |
1050 | 1050 |
1051 this._sidebarOverlay.hide(); | 1051 this._sidebarOverlay.hide(); |
| 1052 if (this.visibleView) |
| 1053 this.visibleView.focus(); |
1052 }, | 1054 }, |
1053 | 1055 |
1054 _navigatorOverlayWasShown: function(event) | 1056 _navigatorOverlayWasShown: function(event) |
1055 { | 1057 { |
1056 this._navigatorView.element.appendChild(this._navigatorShowHideButton); | 1058 this._navigatorView.element.appendChild(this._navigatorShowHideButton); |
1057 this._navigatorShowHideButton.addStyleClass("toggled-on"); | 1059 this._navigatorShowHideButton.addStyleClass("toggled-on"); |
1058 this._navigatorShowHideButton.title = WebInspector.UIString("Hide script
s navigator"); | 1060 this._navigatorShowHideButton.title = WebInspector.UIString("Hide script
s navigator"); |
1059 this._navigator.focus(); | 1061 this._navigator.focus(); |
1060 this.registerShortcut(WebInspector.KeyboardShortcut.Keys.Esc.code, this.
_escDownWhileNavigatorOverlayOpen.bind(this)); | 1062 this.registerShortcut(WebInspector.KeyboardShortcut.Keys.Esc.code, this.
_escDownWhileNavigatorOverlayOpen.bind(this)); |
1061 }, | 1063 }, |
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1745 if (this._currentSourceFrame) | 1747 if (this._currentSourceFrame) |
1746 this._currentSourceFrame.detach(); | 1748 this._currentSourceFrame.detach(); |
1747 this._currentSourceFrame = null; | 1749 this._currentSourceFrame = null; |
1748 this._currentFile = null; | 1750 this._currentFile = null; |
1749 delete this._initialViewSelectionProcessed; | 1751 delete this._initialViewSelectionProcessed; |
1750 delete this._userSelectedFiles; | 1752 delete this._userSelectedFiles; |
1751 } | 1753 } |
1752 } | 1754 } |
1753 | 1755 |
1754 WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.__proto__ = WebIns
pector.Object.prototype; | 1756 WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.__proto__ = WebIns
pector.Object.prototype; |
OLD | NEW |