Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js b/third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js |
| index d9d112afd364f07db0ca0af07f0bc73b0a1d9cd9..502a67c174676864d6f770d22bb6d01d2121cbf8 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js |
| @@ -385,6 +385,13 @@ WebInspector.ElementsPanel.prototype = { |
| if (selectedNode) { |
| selectedNode.setAsInspectedNode(); |
| this._lastValidSelectedNode = selectedNode; |
| + |
| + var executionContexts = selectedNode.target().runtimeModel.executionContexts(); |
| + for (var context of executionContexts) { |
| + var frame = context.target().resourceTreeModel.frameForId(context.frameId); |
| + if (context.frameId == selectedNode.frameId()) |
|
pfeldman
2016/02/17 01:18:46
Could we not compute this in the loop?
samli
2016/02/18 02:14:36
Yes, done, sorry.
|
| + WebInspector.context.setFlavor(WebInspector.ExecutionContext, context); |
|
pfeldman
2016/02/17 01:18:46
should we break this n^2 loop sooner?
samli
2016/02/18 02:14:36
Done.
|
| + } |
| } |
| WebInspector.notifications.dispatchEventToListeners(WebInspector.NotificationService.Events.SelectedNodeChanged); |
| this._selectedNodeChangedForTest(); |