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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 var target = WebInspector.NetworkProject.targetForUISourceCode(uiSourceC
ode); | 438 var target = WebInspector.NetworkProject.targetForUISourceCode(uiSourceC
ode); |
439 var frame = this._uiSourceCodeFrame(uiSourceCode); | 439 var frame = this._uiSourceCodeFrame(uiSourceCode); |
440 | 440 |
441 var parentNode = node.parent; | 441 var parentNode = node.parent; |
442 this._uiSourceCodeNodes.delete(uiSourceCode); | 442 this._uiSourceCodeNodes.delete(uiSourceCode); |
443 parentNode.removeChild(node); | 443 parentNode.removeChild(node); |
444 node = parentNode; | 444 node = parentNode; |
445 | 445 |
446 while (node) { | 446 while (node) { |
447 parentNode = node.parent; | 447 parentNode = node.parent; |
448 if (!parentNode || !node.isEmpty() || !(node instanceof WebInspector
.NavigatorFolderTreeNode)) | 448 if (!parentNode || !node.isEmpty()) |
| 449 break; |
| 450 if (!(node instanceof WebInspector.NavigatorGroupTreeNode || node in
stanceof WebInspector.NavigatorFolderTreeNode)) |
449 break; | 451 break; |
450 | 452 |
451 var folderId = this._folderNodeId(project, target, frame, uiSourceCo
de.origin(), node._folderPath); | 453 var folderId = this._folderNodeId(project, target, frame, uiSourceCo
de.origin(), node._folderPath); |
452 this._subfolderNodes.delete(folderId); | 454 this._subfolderNodes.delete(folderId); |
453 parentNode.removeChild(node); | 455 parentNode.removeChild(node); |
454 node = parentNode; | 456 node = parentNode; |
455 } | 457 } |
456 }, | 458 }, |
457 | 459 |
458 reset: function() | 460 reset: function() |
(...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1491 { | 1493 { |
1492 if (this._treeElement) | 1494 if (this._treeElement) |
1493 return this._treeElement; | 1495 return this._treeElement; |
1494 this._treeElement = new WebInspector.NavigatorFolderTreeElement(this._na
vigatorView, this._type, this._title); | 1496 this._treeElement = new WebInspector.NavigatorFolderTreeElement(this._na
vigatorView, this._type, this._title); |
1495 this._treeElement.setNode(this); | 1497 this._treeElement.setNode(this); |
1496 return this._treeElement; | 1498 return this._treeElement; |
1497 }, | 1499 }, |
1498 | 1500 |
1499 __proto__: WebInspector.NavigatorTreeNode.prototype | 1501 __proto__: WebInspector.NavigatorTreeNode.prototype |
1500 } | 1502 } |
OLD | NEW |