| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 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 * | 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 registerRequiredCSS: function(cssFile) | 335 registerRequiredCSS: function(cssFile) |
| 336 { | 336 { |
| 337 WebInspector.appendStyle(this._shadowRoot, cssFile); | 337 WebInspector.appendStyle(this._shadowRoot, cssFile); |
| 338 }, | 338 }, |
| 339 | 339 |
| 340 hideOverflow: function() | 340 hideOverflow: function() |
| 341 { | 341 { |
| 342 this._disclosureElement.classList.add("tree-outline-disclosure-hide-over
flow"); | 342 this._disclosureElement.classList.add("tree-outline-disclosure-hide-over
flow"); |
| 343 }, | 343 }, |
| 344 | 344 |
| 345 makeDense: function() |
| 346 { |
| 347 this.contentElement.classList.add("tree-outline-dense"); |
| 348 }, |
| 349 |
| 345 __proto__: TreeOutline.prototype | 350 __proto__: TreeOutline.prototype |
| 346 } | 351 } |
| 347 | 352 |
| 348 /** | 353 /** |
| 349 * @constructor | 354 * @constructor |
| 350 * @param {(string|!Node)=} title | 355 * @param {(string|!Node)=} title |
| 351 * @param {boolean=} expandable | 356 * @param {boolean=} expandable |
| 352 */ | 357 */ |
| 353 function TreeElement(title, expandable) | 358 function TreeElement(title, expandable) |
| 354 { | 359 { |
| (...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1164 isEventWithinDisclosureTriangle: function(event) | 1169 isEventWithinDisclosureTriangle: function(event) |
| 1165 { | 1170 { |
| 1166 // FIXME: We should not use getComputedStyle(). For that we need to get
rid of using ::before for disclosure triangle. (http://webk.it/74446) | 1171 // FIXME: We should not use getComputedStyle(). For that we need to get
rid of using ::before for disclosure triangle. (http://webk.it/74446) |
| 1167 var paddingLeftValue = window.getComputedStyle(this._listItemNode).paddi
ngLeft; | 1172 var paddingLeftValue = window.getComputedStyle(this._listItemNode).paddi
ngLeft; |
| 1168 console.assert(paddingLeftValue.endsWith("px")); | 1173 console.assert(paddingLeftValue.endsWith("px")); |
| 1169 var computedLeftPadding = parseFloat(paddingLeftValue); | 1174 var computedLeftPadding = parseFloat(paddingLeftValue); |
| 1170 var left = this._listItemNode.totalOffsetLeft() + computedLeftPadding; | 1175 var left = this._listItemNode.totalOffsetLeft() + computedLeftPadding; |
| 1171 return event.pageX >= left && event.pageX <= left + TreeElement._ArrowTo
ggleWidth && this._expandable; | 1176 return event.pageX >= left && event.pageX <= left + TreeElement._ArrowTo
ggleWidth && this._expandable; |
| 1172 } | 1177 } |
| 1173 } | 1178 } |
| OLD | NEW |