| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1161 this.children = []; | 1161 this.children = []; |
| 1162 this.dataGrid = null; | 1162 this.dataGrid = null; |
| 1163 this.parent = null; | 1163 this.parent = null; |
| 1164 /** @type {?WebInspector.DataGridNode} */ | 1164 /** @type {?WebInspector.DataGridNode} */ |
| 1165 this.previousSibling = null; | 1165 this.previousSibling = null; |
| 1166 /** @type {?WebInspector.DataGridNode} */ | 1166 /** @type {?WebInspector.DataGridNode} */ |
| 1167 this.nextSibling = null; | 1167 this.nextSibling = null; |
| 1168 this.disclosureToggleWidth = 10; | 1168 this.disclosureToggleWidth = 10; |
| 1169 } | 1169 } |
| 1170 | 1170 |
| 1171 WebInspector.DataGridNode.NodeShallowHeight = 16; | |
| 1172 | |
| 1173 WebInspector.DataGridNode.prototype = { | 1171 WebInspector.DataGridNode.prototype = { |
| 1174 /** @type {boolean} */ | 1172 /** @type {boolean} */ |
| 1175 selectable: true, | 1173 selectable: true, |
| 1176 | 1174 |
| 1177 /** @type {boolean} */ | 1175 /** @type {boolean} */ |
| 1178 _isRoot: false, | 1176 _isRoot: false, |
| 1179 | 1177 |
| 1180 get element() | 1178 get element() |
| 1181 { | 1179 { |
| 1182 if (this._element) | 1180 if (this._element) |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1387 if (this.leftPadding) | 1385 if (this.leftPadding) |
| 1388 cell.style.setProperty("padding-left", this.leftPadding + "px"); | 1386 cell.style.setProperty("padding-left", this.leftPadding + "px"); |
| 1389 } | 1387 } |
| 1390 | 1388 |
| 1391 return cell; | 1389 return cell; |
| 1392 }, | 1390 }, |
| 1393 | 1391 |
| 1394 /** | 1392 /** |
| 1395 * @return {number} | 1393 * @return {number} |
| 1396 */ | 1394 */ |
| 1397 nodeHeight: function() | 1395 nodeSelfHeight: function() |
| 1398 { | 1396 { |
| 1399 var rowHeight = WebInspector.DataGridNode.NodeShallowHeight; | 1397 return 16; |
| 1400 if (!this.revealed) | |
| 1401 return 0; | |
| 1402 if (!this.expanded) | |
| 1403 return rowHeight; | |
| 1404 var result = rowHeight; | |
| 1405 for (var i = 0; i < this.children.length; i++) | |
| 1406 result += this.children[i].nodeHeight(); | |
| 1407 return result; | |
| 1408 }, | 1398 }, |
| 1409 | 1399 |
| 1410 /** | 1400 /** |
| 1411 * @param {!WebInspector.DataGridNode} child | 1401 * @param {!WebInspector.DataGridNode} child |
| 1412 */ | 1402 */ |
| 1413 appendChild: function(child) | 1403 appendChild: function(child) |
| 1414 { | 1404 { |
| 1415 this.insertChild(child, this.children.length); | 1405 this.insertChild(child, this.children.length); |
| 1416 }, | 1406 }, |
| 1417 | 1407 |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1820 | 1810 |
| 1821 WebInspector.CreationDataGridNode.prototype = { | 1811 WebInspector.CreationDataGridNode.prototype = { |
| 1822 makeNormal: function() | 1812 makeNormal: function() |
| 1823 { | 1813 { |
| 1824 delete this.isCreationNode; | 1814 delete this.isCreationNode; |
| 1825 delete this.makeNormal; | 1815 delete this.makeNormal; |
| 1826 }, | 1816 }, |
| 1827 | 1817 |
| 1828 __proto__: WebInspector.DataGridNode.prototype | 1818 __proto__: WebInspector.DataGridNode.prototype |
| 1829 } | 1819 } |
| OLD | NEW |