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

Unified Diff: Source/WebCore/inspector/front-end/ScriptsNavigator.js

Issue 9956025: Merge 112677 - Web Inspector: ScriptsNavigator scripts selection/focus polish. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/WebCore/inspector/front-end/ScriptsPanel.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/inspector/front-end/ScriptsNavigator.js
===================================================================
--- Source/WebCore/inspector/front-end/ScriptsNavigator.js (revision 112683)
+++ Source/WebCore/inspector/front-end/ScriptsNavigator.js (working copy)
@@ -219,11 +219,14 @@
/**
* @param {WebInspector.UISourceCode} uiSourceCode
+ * @param {boolean} focusSource
*/
- scriptSelected: function(uiSourceCode)
+ _scriptSelected: function(uiSourceCode, focusSource)
{
this._lastSelectedUISourceCode = uiSourceCode;
this.dispatchEventToListeners(WebInspector.ScriptsPanel.FileSelector.Events.FileSelected, uiSourceCode);
+ if (focusSource)
+ this.dispatchEventToListeners(WebInspector.ScriptsPanel.FileSelector.Events.ReleasedFocusAfterSelection, uiSourceCode);
},
/**
@@ -575,17 +578,24 @@
this.listItemElement.addEventListener("click", this._onclick.bind(this), false);
},
+ onspace: function()
+ {
+ this._navigator._scriptSelected(this.uiSourceCode, true);
+ return true;
+ },
+
/**
* @param {Event} event
*/
_onclick: function(event)
{
- this._navigator.scriptSelected(this.uiSourceCode);
+ this._navigator._scriptSelected(this.uiSourceCode, false);
},
onenter: function()
{
- this._navigator.scriptSelected(this.uiSourceCode);
+ this._navigator._scriptSelected(this.uiSourceCode, true);
+ return true;
}
}
« no previous file with comments | « no previous file | Source/WebCore/inspector/front-end/ScriptsPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698