Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> | 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> |
| 4 * Copyright (C) 2009 Joseph Pecoraro | 4 * Copyright (C) 2009 Joseph Pecoraro |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 378 if (!selectedNode && this._lastValidSelectedNode) | 378 if (!selectedNode && this._lastValidSelectedNode) |
| 379 this._selectedPathOnReset = this._lastValidSelectedNode.path(); | 379 this._selectedPathOnReset = this._lastValidSelectedNode.path(); |
| 380 | 380 |
| 381 this._breadcrumbs.setSelectedNode(selectedNode); | 381 this._breadcrumbs.setSelectedNode(selectedNode); |
| 382 | 382 |
| 383 WebInspector.context.setFlavor(WebInspector.DOMNode, selectedNode); | 383 WebInspector.context.setFlavor(WebInspector.DOMNode, selectedNode); |
| 384 | 384 |
| 385 if (selectedNode) { | 385 if (selectedNode) { |
| 386 selectedNode.setAsInspectedNode(); | 386 selectedNode.setAsInspectedNode(); |
| 387 this._lastValidSelectedNode = selectedNode; | 387 this._lastValidSelectedNode = selectedNode; |
| 388 | |
| 389 var executionContexts = selectedNode.target().runtimeModel.execution Contexts(); | |
| 390 for (var context of executionContexts) { | |
| 391 var frame = context.target().resourceTreeModel.frameForId(contex t.frameId); | |
| 392 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
| |
| 393 WebInspector.context.setFlavor(WebInspector.ExecutionContext , context); | |
| 394 } | |
| 388 } | 395 } |
| 389 WebInspector.notifications.dispatchEventToListeners(WebInspector.Notific ationService.Events.SelectedNodeChanged); | 396 WebInspector.notifications.dispatchEventToListeners(WebInspector.Notific ationService.Events.SelectedNodeChanged); |
| 390 this._selectedNodeChangedForTest(); | 397 this._selectedNodeChangedForTest(); |
| 391 }, | 398 }, |
| 392 | 399 |
| 393 _selectedNodeChangedForTest: function() { }, | 400 _selectedNodeChangedForTest: function() { }, |
| 394 | 401 |
| 395 _reset: function() | 402 _reset: function() |
| 396 { | 403 { |
| 397 delete this.currentQuery; | 404 delete this.currentQuery; |
| (...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1275 */ | 1282 */ |
| 1276 wasShown: function() | 1283 wasShown: function() |
| 1277 { | 1284 { |
| 1278 this._toolbarItem.setToggled(true); | 1285 this._toolbarItem.setToggled(true); |
| 1279 this._nodeChanged(); | 1286 this._nodeChanged(); |
| 1280 WebInspector.ThrottledWidget.prototype.wasShown.call(this); | 1287 WebInspector.ThrottledWidget.prototype.wasShown.call(this); |
| 1281 }, | 1288 }, |
| 1282 | 1289 |
| 1283 __proto__: WebInspector.ThrottledWidget.prototype | 1290 __proto__: WebInspector.ThrottledWidget.prototype |
| 1284 } | 1291 } |
| OLD | NEW |