Changeset 112677 in webkit
- Timestamp:
- Mar 30, 2012, 9:39:02 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r112676 r112677 1 2012-03-30 Vsevolod Vlasov <vsevik@chromium.org> 2 3 Web Inspector: ScriptsNavigator scripts selection/focus polish. 4 https://bugs.webkit.org/show_bug.cgi?id=82732 5 6 Reviewed by Pavel Feldman. 7 8 Script could be selected by space in ScriptsNavigator now. 9 This patch also polishes focus behavior when using ScriptsNavigator. 10 11 * inspector/front-end/ScriptsNavigator.js: 12 (WebInspector.ScriptsNavigator.prototype._scriptSelected): Added focusSource param to give clients possibility to release focus. 13 (WebInspector.NavigatorScriptTreeElement.prototype.onspace): Added script selection on space pressed. 14 (WebInspector.NavigatorScriptTreeElement.prototype._onclick): 15 (WebInspector.NavigatorScriptTreeElement.prototype.onenter): 16 * inspector/front-end/ScriptsPanel.js: _hideNavigatorOverlay moved to the end of events processing to set focus correctly. 17 (WebInspector.ScriptsPanel.prototype._editorSelected): 18 (WebInspector.ScriptsPanel.prototype._fileSelected): 19 (WebInspector.ScriptsPanel.prototype._hideNavigatorOverlay): 20 * inspector/front-end/treeoutline.js: 21 (TreeOutline.prototype._treeKeyDown): onspace event added. 22 1 23 2012-03-30 Mike Reed <reed@google.com> 2 24 -
trunk/Source/WebCore/inspector/front-end/ScriptsNavigator.js
r112656 r112677 232 232 /** 233 233 * @param {WebInspector.UISourceCode} uiSourceCode 234 */ 235 scriptSelected: function(uiSourceCode) 234 * @param {boolean} focusSource 235 */ 236 _scriptSelected: function(uiSourceCode, focusSource) 236 237 { 237 238 this._lastSelectedUISourceCode = uiSourceCode; 238 239 this.dispatchEventToListeners(WebInspector.ScriptsPanel.FileSelector.Events.FileSelected, uiSourceCode); 240 if (focusSource) 241 this.dispatchEventToListeners(WebInspector.ScriptsPanel.FileSelector.Events.ReleasedFocusAfterSelection, uiSourceCode); 239 242 }, 240 243 … … 722 725 }, 723 726 727 onspace: function() 728 { 729 this._navigator._scriptSelected(this.uiSourceCode, true); 730 return true; 731 }, 732 724 733 /** 725 734 * @param {Event} event … … 727 736 _onclick: function(event) 728 737 { 729 this._navigator. scriptSelected(this.uiSourceCode);738 this._navigator._scriptSelected(this.uiSourceCode, false); 730 739 }, 731 740 732 741 onenter: function() 733 742 { 734 this._navigator.scriptSelected(this.uiSourceCode); 743 this._navigator._scriptSelected(this.uiSourceCode, true); 744 return true; 735 745 }, 736 746 -
trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js
r112539 r112677 671 671 _editorSelected: function(event) 672 672 { 673 this._hideNavigatorOverlay();674 673 var uiSourceCode = /** @type {WebInspector.UISourceCode} */ event.data; 675 674 this._showFile(uiSourceCode); 675 this._hideNavigatorOverlay(); 676 676 }, 677 677 678 678 _fileSelected: function(event) 679 679 { 680 this._hideNavigatorOverlay();681 680 var uiSourceCode = /** @type {WebInspector.UISourceCode} */ event.data; 682 681 this._showFile(uiSourceCode); 682 this._hideNavigatorOverlay(); 683 683 }, 684 684 … … 1047 1047 1048 1048 this._sidebarOverlay.hide(); 1049 if (this.visibleView) 1050 this.visibleView.focus(); 1049 1051 }, 1050 1052 -
trunk/Source/WebCore/inspector/front-end/treeoutline.js
r112256 r112677 410 410 if (this.selectedTreeElement.onenter) 411 411 handled = this.selectedTreeElement.onenter(); 412 } else if (event.keyCode === WebInspector.KeyboardShortcut.Keys.Space.code) { 413 if (this.selectedTreeElement.onspace) 414 handled = this.selectedTreeElement.onspace(); 412 415 } 413 416
Note:
See TracChangeset
for help on using the changeset viewer.