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..6c3d5424aabc83da2672875d9e5ba22a9f6dfc02 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js |
| @@ -355,22 +355,28 @@ WebInspector.SourcesPanel.prototype = { |
| /** |
| * @param {!WebInspector.UISourceCode} uiSourceCode |
| + * @param {boolean=} skipReveal |
| */ |
| - _revealInNavigator: function(uiSourceCode) |
| + _revealInNavigator: function(uiSourceCode, skipReveal) |
|
lushnikov
2016/08/26 22:31:09
this seems to be never used.
luoe
2016/08/26 23:14:28
Yeah, I messed up the if statement on #376
|
| { |
| var extensions = self.runtime.extensions(WebInspector.NavigatorView); |
| - Promise.all(extensions.map(extension => extension.instance())).then(filterNavigators); |
| + Promise.all(extensions.map(extension => extension.instance())).then(filterNavigators.bind(this)); |
| /** |
| + * @this {WebInspector.SourcesPanel} |
| * @param {!Array.<!Object>} objects |
| */ |
| function filterNavigators(objects) |
| { |
| for (var i = 0; i < objects.length; ++i) { |
| var navigatorView = /** @type {!WebInspector.NavigatorView} */ (objects[i]); |
| + var viewId = extensions[i].descriptor()["viewId"]; |
| if (navigatorView.accept(uiSourceCode)) { |
| navigatorView.revealUISourceCode(uiSourceCode, true); |
| - WebInspector.viewManager.showView(extensions[i].descriptor()["viewId"]); |
| + if (this.editorView.mainWidget()) |
|
lushnikov
2016/08/26 22:31:09
isn't it the same as always calling WebInspector.v
pfeldman
2016/08/26 22:36:27
You should not do WebInspector.viewManager.showVie
luoe
2016/08/26 23:14:28
Right, the condition should say if (skipReveal) {.
luoe
2016/08/26 23:14:28
Sorry, this condition should have been skipReveal,
|
| + this._navigatorTabbedLocation.tabbedPane().selectTab(viewId); |
| + else |
| + WebInspector.viewManager.showView(viewId); |
| } |
| } |
| } |
| @@ -527,6 +533,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); |
| }, |
| /** |