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..18a8b32e3b471c68eadbe15143319db1c46395ff 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() || (!selectedNode.frameId() && !frame.parentFrame)) |
|
pfeldman
2016/02/06 02:59:05
- What if there is no frame?
- In most of the case
samli
2016/02/08 03:53:50
Appears nodes in the top frame don't get a frameId
pfeldman
2016/02/11 21:47:34
nodes don't get frameids, only document nodes do.
samli
2016/02/15 00:40:13
Ok done. PTAL, I'm not sure this is the best way t
|
| + WebInspector.context.setFlavor(WebInspector.ExecutionContext, context); |
| + } |
| } |
| WebInspector.notifications.dispatchEventToListeners(WebInspector.NotificationService.Events.SelectedNodeChanged); |
| this._selectedNodeChangedForTest(); |