| 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 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 this._uiSourceCodeNodes.delete(uiSourceCode); | 479 this._uiSourceCodeNodes.delete(uiSourceCode); |
| 480 parentNode.removeChild(node); | 480 parentNode.removeChild(node); |
| 481 node = parentNode; | 481 node = parentNode; |
| 482 | 482 |
| 483 while (node) { | 483 while (node) { |
| 484 parentNode = node.parent; | 484 parentNode = node.parent; |
| 485 if (!parentNode || !node.isEmpty()) | 485 if (!parentNode || !node.isEmpty()) |
| 486 break; | 486 break; |
| 487 if (!(node instanceof WebInspector.NavigatorGroupTreeNode || node in
stanceof WebInspector.NavigatorFolderTreeNode)) | 487 if (!(node instanceof WebInspector.NavigatorGroupTreeNode || node in
stanceof WebInspector.NavigatorFolderTreeNode)) |
| 488 break; | 488 break; |
| 489 if (node._type === WebInspector.NavigatorView.Types.Frame) |
| 490 break; |
| 489 | 491 |
| 490 var folderId = this._folderNodeId(project, target, frame, uiSourceCo
de.origin(), node._folderPath); | 492 var folderId = this._folderNodeId(project, target, frame, uiSourceCo
de.origin(), node._folderPath); |
| 491 this._subfolderNodes.delete(folderId); | 493 this._subfolderNodes.delete(folderId); |
| 492 parentNode.removeChild(node); | 494 parentNode.removeChild(node); |
| 493 node = parentNode; | 495 node = parentNode; |
| 494 } | 496 } |
| 495 }, | 497 }, |
| 496 | 498 |
| 497 reset: function() | 499 reset: function() |
| 498 { | 500 { |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 898 */ | 900 */ |
| 899 WebInspector.NavigatorSourceTreeElement = function(navigatorView, uiSourceCode,
title) | 901 WebInspector.NavigatorSourceTreeElement = function(navigatorView, uiSourceCode,
title) |
| 900 { | 902 { |
| 901 TreeElement.call(this, "", false); | 903 TreeElement.call(this, "", false); |
| 902 this._nodeType = WebInspector.NavigatorView.Types.File; | 904 this._nodeType = WebInspector.NavigatorView.Types.File; |
| 903 this.title = title; | 905 this.title = title; |
| 904 this.listItemElement.classList.add("navigator-" + uiSourceCode.contentType()
.name() + "-tree-item", "navigator-file-tree-item"); | 906 this.listItemElement.classList.add("navigator-" + uiSourceCode.contentType()
.name() + "-tree-item", "navigator-file-tree-item"); |
| 905 this.tooltip = uiSourceCode.url(); | 907 this.tooltip = uiSourceCode.url(); |
| 906 this.createIcon(); | 908 this.createIcon(); |
| 907 | 909 |
| 908 | |
| 909 this._navigatorView = navigatorView; | 910 this._navigatorView = navigatorView; |
| 910 this._uiSourceCode = uiSourceCode; | 911 this._uiSourceCode = uiSourceCode; |
| 911 } | 912 } |
| 912 | 913 |
| 913 WebInspector.NavigatorSourceTreeElement.prototype = { | 914 WebInspector.NavigatorSourceTreeElement.prototype = { |
| 914 /** | 915 /** |
| 915 * @return {!WebInspector.UISourceCode} | 916 * @return {!WebInspector.UISourceCode} |
| 916 */ | 917 */ |
| 917 get uiSourceCode() | 918 get uiSourceCode() |
| 918 { | 919 { |
| (...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1565 { | 1566 { |
| 1566 if (this._treeElement) | 1567 if (this._treeElement) |
| 1567 return this._treeElement; | 1568 return this._treeElement; |
| 1568 this._treeElement = new WebInspector.NavigatorFolderTreeElement(this._na
vigatorView, this._type, this._title, this._hoverCallback); | 1569 this._treeElement = new WebInspector.NavigatorFolderTreeElement(this._na
vigatorView, this._type, this._title, this._hoverCallback); |
| 1569 this._treeElement.setNode(this); | 1570 this._treeElement.setNode(this); |
| 1570 return this._treeElement; | 1571 return this._treeElement; |
| 1571 }, | 1572 }, |
| 1572 | 1573 |
| 1573 __proto__: WebInspector.NavigatorTreeNode.prototype | 1574 __proto__: WebInspector.NavigatorTreeNode.prototype |
| 1574 } | 1575 } |
| OLD | NEW |