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 1338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1349 | 1349 |
1350 // In case some nodes from the expanded range were removed, pull some no
des from the collapsed range into the expanded range at the bottom. | 1350 // In case some nodes from the expanded range were removed, pull some no
des from the collapsed range into the expanded range at the bottom. |
1351 for (var i = this.expandedChildCount, limit = Math.min(this.expandedChil
drenLimit, childNodeCount); i < limit; ++i) | 1351 for (var i = this.expandedChildCount, limit = Math.min(this.expandedChil
drenLimit, childNodeCount); i < limit; ++i) |
1352 this.insertChildElement(visibleChildren[i], i); | 1352 this.insertChildElement(visibleChildren[i], i); |
1353 | 1353 |
1354 const expandedChildCount = this.expandedChildCount; | 1354 const expandedChildCount = this.expandedChildCount; |
1355 if (childNodeCount > this.expandedChildCount) { | 1355 if (childNodeCount > this.expandedChildCount) { |
1356 var targetButtonIndex = expandedChildCount; | 1356 var targetButtonIndex = expandedChildCount; |
1357 if (!this.expandAllButtonElement) { | 1357 if (!this.expandAllButtonElement) { |
1358 var button = document.createElement("button"); | 1358 var button = document.createElement("button"); |
1359 button.className = "show-all-nodes"; | 1359 button.className = "text-button"; |
1360 button.value = ""; | 1360 button.value = ""; |
1361 var item = new TreeElement(button, null, false); | 1361 var item = new TreeElement(button, null, false); |
1362 item.selectable = false; | 1362 item.selectable = false; |
1363 item.expandAllButton = true; | 1363 item.expandAllButton = true; |
1364 this.insertChild(item, targetButtonIndex); | 1364 this.insertChild(item, targetButtonIndex); |
1365 this.expandAllButtonElement = item.listItemElement.firstChild; | 1365 this.expandAllButtonElement = item.listItemElement.firstChild; |
1366 this.expandAllButtonElement.__treeElement = item; | 1366 this.expandAllButtonElement.__treeElement = item; |
1367 this.expandAllButtonElement.addEventListener("click", this.handl
eLoadAllChildren.bind(this), false); | 1367 this.expandAllButtonElement.addEventListener("click", this.handl
eLoadAllChildren.bind(this), false); |
1368 } else if (!this.expandAllButtonElement.__treeElement.parent) | 1368 } else if (!this.expandAllButtonElement.__treeElement.parent) |
1369 this.insertChild(this.expandAllButtonElement.__treeElement, targ
etButtonIndex); | 1369 this.insertChild(this.expandAllButtonElement.__treeElement, targ
etButtonIndex); |
(...skipping 1465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2835 var treeOutline = new WebInspector.ElementsTreeOutline(node.target(), fa
lse, false); | 2835 var treeOutline = new WebInspector.ElementsTreeOutline(node.target(), fa
lse, false); |
2836 treeOutline.rootDOMNode = node; | 2836 treeOutline.rootDOMNode = node; |
2837 treeOutline.element.classList.add("outline-disclosure"); | 2837 treeOutline.element.classList.add("outline-disclosure"); |
2838 if (!treeOutline.children[0].hasChildren) | 2838 if (!treeOutline.children[0].hasChildren) |
2839 treeOutline.element.classList.add("single-node"); | 2839 treeOutline.element.classList.add("single-node"); |
2840 treeOutline.setVisible(true); | 2840 treeOutline.setVisible(true); |
2841 treeOutline.element.treeElementForTest = treeOutline.children[0]; | 2841 treeOutline.element.treeElementForTest = treeOutline.children[0]; |
2842 return treeOutline.element; | 2842 return treeOutline.element; |
2843 } | 2843 } |
2844 } | 2844 } |
OLD | NEW |