| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * | 10 * |
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 }, | 517 }, |
| 518 | 518 |
| 519 /** | 519 /** |
| 520 * @param {!WebInspector.Event} event | 520 * @param {!WebInspector.Event} event |
| 521 */ | 521 */ |
| 522 _inspectedURLChanged: function(event) | 522 _inspectedURLChanged: function(event) |
| 523 { | 523 { |
| 524 var nodes = this._uiSourceCodeNodes.values(); | 524 var nodes = this._uiSourceCodeNodes.values(); |
| 525 for (var i = 0; i < nodes.length; ++i) { | 525 for (var i = 0; i < nodes.length; ++i) { |
| 526 var uiSourceCode = nodes[i].uiSourceCode(); | 526 var uiSourceCode = nodes[i].uiSourceCode(); |
| 527 if (WebInspector.resourceTreeModel.inspectedPageURL() && uiSourceCode
.url === WebInspector.resourceTreeModel.inspectedPageURL()) | 527 var inspectedPageURL = WebInspector.targetManager.inspectedPageURL(); |
| 528 if (inspectedPageURL && uiSourceCode.url === inspectedPageURL) |
| 528 this.revealUISourceCode(uiSourceCode, true); | 529 this.revealUISourceCode(uiSourceCode, true); |
| 529 } | 530 } |
| 530 }, | 531 }, |
| 531 | 532 |
| 532 /** | 533 /** |
| 533 * @param {!WebInspector.UISourceCode} uiSourceCode | 534 * @param {!WebInspector.UISourceCode} uiSourceCode |
| 534 */ | 535 */ |
| 535 _addUISourceCode: function(uiSourceCode) | 536 _addUISourceCode: function(uiSourceCode) |
| 536 { | 537 { |
| 537 WebInspector.NavigatorView.prototype._addUISourceCode.call(this, uiSourc
eCode); | 538 WebInspector.NavigatorView.prototype._addUISourceCode.call(this, uiSourc
eCode); |
| 538 if (uiSourceCode.url === WebInspector.resourceTreeModel.inspectedPageURL
()) | 539 if (uiSourceCode.url === WebInspector.targetManager.inspectedPageURL()) |
| 539 this.revealUISourceCode(uiSourceCode, true); | 540 this.revealUISourceCode(uiSourceCode, true); |
| 540 }, | 541 }, |
| 541 | 542 |
| 542 __proto__: WebInspector.NavigatorView.prototype | 543 __proto__: WebInspector.NavigatorView.prototype |
| 543 } | 544 } |
| 544 | 545 |
| 545 /** | 546 /** |
| 546 * @constructor | 547 * @constructor |
| 547 * @extends {WebInspector.NavigatorView} | 548 * @extends {WebInspector.NavigatorView} |
| 548 */ | 549 */ |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 * @param {!TreeElement} treeElement2 | 594 * @param {!TreeElement} treeElement2 |
| 594 * @return {number} | 595 * @return {number} |
| 595 */ | 596 */ |
| 596 WebInspector.NavigatorTreeOutline._treeElementsCompare = function compare(treeEl
ement1, treeElement2) | 597 WebInspector.NavigatorTreeOutline._treeElementsCompare = function compare(treeEl
ement1, treeElement2) |
| 597 { | 598 { |
| 598 // Insert in the alphabetical order, first domains, then folders, then scrip
ts. | 599 // Insert in the alphabetical order, first domains, then folders, then scrip
ts. |
| 599 function typeWeight(treeElement) | 600 function typeWeight(treeElement) |
| 600 { | 601 { |
| 601 var type = treeElement.type(); | 602 var type = treeElement.type(); |
| 602 if (type === WebInspector.NavigatorTreeOutline.Types.Domain) { | 603 if (type === WebInspector.NavigatorTreeOutline.Types.Domain) { |
| 603 if (treeElement.titleText === WebInspector.resourceTreeModel.inspect
edPageDomain()) | 604 if (treeElement.titleText === WebInspector.targetManager.inspectedPa
geDomain()) |
| 604 return 1; | 605 return 1; |
| 605 return 2; | 606 return 2; |
| 606 } | 607 } |
| 607 if (type === WebInspector.NavigatorTreeOutline.Types.FileSystem) | 608 if (type === WebInspector.NavigatorTreeOutline.Types.FileSystem) |
| 608 return 3; | 609 return 3; |
| 609 if (type === WebInspector.NavigatorTreeOutline.Types.Folder) | 610 if (type === WebInspector.NavigatorTreeOutline.Types.Folder) |
| 610 return 4; | 611 return 4; |
| 611 return 5; | 612 return 5; |
| 612 } | 613 } |
| 613 | 614 |
| (...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1414 | 1415 |
| 1415 willRemoveChild: function(node) | 1416 willRemoveChild: function(node) |
| 1416 { | 1417 { |
| 1417 if (node._isMerged || !this.isPopulated()) | 1418 if (node._isMerged || !this.isPopulated()) |
| 1418 return; | 1419 return; |
| 1419 this._treeElement.removeChild(node._treeElement); | 1420 this._treeElement.removeChild(node._treeElement); |
| 1420 }, | 1421 }, |
| 1421 | 1422 |
| 1422 __proto__: WebInspector.NavigatorTreeNode.prototype | 1423 __proto__: WebInspector.NavigatorTreeNode.prototype |
| 1423 } | 1424 } |
| OLD | NEW |