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 |
1171 WebInspector.DataGridNode.prototype = { | 1173 WebInspector.DataGridNode.prototype = { |
1172 /** @type {boolean} */ | 1174 /** @type {boolean} */ |
1173 selectable: true, | 1175 selectable: true, |
1174 | 1176 |
1175 /** @type {boolean} */ | 1177 /** @type {boolean} */ |
1176 _isRoot: false, | 1178 _isRoot: false, |
1177 | 1179 |
1178 get element() | 1180 get element() |
1179 { | 1181 { |
1180 if (this._element) | 1182 if (this._element) |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1387 } | 1389 } |
1388 | 1390 |
1389 return cell; | 1391 return cell; |
1390 }, | 1392 }, |
1391 | 1393 |
1392 /** | 1394 /** |
1393 * @return {number} | 1395 * @return {number} |
1394 */ | 1396 */ |
1395 nodeHeight: function() | 1397 nodeHeight: function() |
1396 { | 1398 { |
1397 var rowHeight = 16; | 1399 var rowHeight = WebInspector.DataGridNode.NodeShallowHeight; |
1398 if (!this.revealed) | 1400 if (!this.revealed) |
1399 return 0; | 1401 return 0; |
1400 if (!this.expanded) | 1402 if (!this.expanded) |
1401 return rowHeight; | 1403 return rowHeight; |
1402 var result = rowHeight; | 1404 var result = rowHeight; |
1403 for (var i = 0; i < this.children.length; i++) | 1405 for (var i = 0; i < this.children.length; i++) |
1404 result += this.children[i].nodeHeight(); | 1406 result += this.children[i].nodeHeight(); |
1405 return result; | 1407 return result; |
1406 }, | 1408 }, |
1407 | 1409 |
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1818 | 1820 |
1819 WebInspector.CreationDataGridNode.prototype = { | 1821 WebInspector.CreationDataGridNode.prototype = { |
1820 makeNormal: function() | 1822 makeNormal: function() |
1821 { | 1823 { |
1822 delete this.isCreationNode; | 1824 delete this.isCreationNode; |
1823 delete this.makeNormal; | 1825 delete this.makeNormal; |
1824 }, | 1826 }, |
1825 | 1827 |
1826 __proto__: WebInspector.DataGridNode.prototype | 1828 __proto__: WebInspector.DataGridNode.prototype |
1827 } | 1829 } |
OLD | NEW |