Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js b/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js |
| index 5348993f0784b4615bccb078b009b0bf6cb0aa1f..2edf7c56d8b9ef4c2749e2d4b514d5b337374619 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js |
| @@ -355,8 +355,9 @@ WebInspector.SourcesPanel.prototype = { |
| /** |
| * @param {!WebInspector.UISourceCode} uiSourceCode |
| + * @param {boolean=} skipShow |
| */ |
| - _revealInNavigator: function(uiSourceCode) |
| + _revealInNavigator: function(uiSourceCode, skipShow) |
| { |
| var extensions = self.runtime.extensions(WebInspector.NavigatorView); |
| Promise.all(extensions.map(extension => extension.instance())).then(filterNavigators); |
| @@ -370,7 +371,8 @@ WebInspector.SourcesPanel.prototype = { |
| var navigatorView = /** @type {!WebInspector.NavigatorView} */ (objects[i]); |
| if (navigatorView.accept(uiSourceCode)) { |
| navigatorView.revealUISourceCode(uiSourceCode, true); |
| - WebInspector.viewManager.showView(extensions[i].descriptor()["viewId"]); |
| + if (skipShow) |
|
lushnikov
2016/08/25 02:00:09
should it be vice-versa?
luoe
2016/08/25 18:19:34
This check is wrong. Really, we want to call show
|
| + WebInspector.viewManager.showView(extensions[i].descriptor()["viewId"]); |
| } |
| } |
| } |
| @@ -527,6 +529,8 @@ WebInspector.SourcesPanel.prototype = { |
| { |
| var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (event.data); |
| this._editorChanged(uiSourceCode); |
| + if (this.editorView.mainWidget() && WebInspector.moduleSetting("autoRevealInNavigator").get()) |
| + this._revealInNavigator(uiSourceCode, true); |
| }, |
| /** |