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

Unified Diff: Source/devtools/front_end/ScriptsPanel.js

Issue 14329024: [DevTools] Close drawer on blur after short timeout. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed comments. Created 7 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 side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/ScriptsPanel.js
diff --git a/Source/devtools/front_end/ScriptsPanel.js b/Source/devtools/front_end/ScriptsPanel.js
index cd3a5e575ed7da4374b5973f493be0576d4b6cd3..093b6dc41d6f220efadbdb4cb6453387aa18e5ed 100755
--- a/Source/devtools/front_end/ScriptsPanel.js
+++ b/Source/devtools/front_end/ScriptsPanel.js
@@ -386,7 +386,7 @@ WebInspector.ScriptsPanel.prototype = {
showAnchorLocation: function(anchor)
{
- this._showSourceLine(anchor.uiSourceCode, anchor.lineNumber);
+ this._showSourceLine(anchor.uiSourceCode, anchor.lineNumber, !!anchor.omitFocus);
},
/**
@@ -401,13 +401,16 @@ WebInspector.ScriptsPanel.prototype = {
/**
* @param {WebInspector.UISourceCode} uiSourceCode
* @param {number=} lineNumber
+ * @param {boolean=} omitFocus
*/
- _showSourceLine: function(uiSourceCode, lineNumber)
+ _showSourceLine: function(uiSourceCode, lineNumber, omitFocus)
{
var sourceFrame = this._showFile(uiSourceCode);
if (typeof lineNumber === "number")
sourceFrame.highlightLine(lineNumber);
- sourceFrame.focus();
+
+ if (!omitFocus)
+ sourceFrame.focus();
WebInspector.notifications.dispatchEventToListeners(WebInspector.UserMetrics.UserAction, {
action: WebInspector.UserMetrics.UserActionNames.OpenSourceLink,

Powered by Google App Engine
This is Rietveld 408576698