Changeset 31644 in webkit
- Timestamp:
- Apr 4, 2008 1:29:47 PM (16 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r31643 r31644 1 2008-04-04 Timothy Hatcher <timothy@apple.com> 2 3 Makes setting shouldRefreshChildren on a TreeElement perform the refresh 4 immediately if the element is already expanded. 5 6 Reviewed by Adam Roben. 7 8 * page/inspector/treeoutline.js: 9 (TreeElement.prototype.get shouldRefreshChildren): Return this._shouldRefreshChildren. 10 (TreeElement.prototype.set shouldRefreshChildren): If changing to true, and 11 already expanded, 12 call expand again to trigger the refresh. Sets this._shouldRefreshChildren. 13 (TreeElement.prototype._attach): Check for this._shouldRefreshChildren. 14 (TreeElement.prototype.expand): Ditto. 15 1 16 2008-04-04 Jon Honeycutt <jhoneycutt@apple.com> 2 17 -
trunk/WebCore/page/inspector/treeoutline.js
r31642 r31644 461 461 this._childrenListNode.removeStyleClass("hidden"); 462 462 } 463 }, 464 465 get shouldRefreshChildren() { 466 return this._shouldRefreshChildren; 467 }, 468 469 set shouldRefreshChildren(x) { 470 this._shouldRefreshChildren = x; 471 if (x && this.expanded) 472 this.expand(); 463 473 } 464 474 } … … 472 482 TreeElement.prototype._attach = function() 473 483 { 474 if (!this._listItemNode || this.parent. refreshChildren) {484 if (!this._listItemNode || this.parent._shouldRefreshChildren) { 475 485 if (this._listItemNode && this._listItemNode.parentNode) 476 486 this._listItemNode.parentNode.removeChild(this._listItemNode); … … 588 598 TreeElement.prototype.expand = function() 589 599 { 590 if (!this.hasChildren || (this.expanded && !this. refreshChildren && this._childrenListNode))591 return; 592 593 if (!this._childrenListNode || this. refreshChildren) {600 if (!this.hasChildren || (this.expanded && !this._shouldRefreshChildren && this._childrenListNode)) 601 return; 602 603 if (!this._childrenListNode || this._shouldRefreshChildren) { 594 604 if (this._childrenListNode && this._childrenListNode.parentNode) 595 605 this._childrenListNode.parentNode.removeChild(this._childrenListNode); … … 608 618 this.children[i]._attach(); 609 619 610 delete this. refreshChildren;620 delete this._shouldRefreshChildren; 611 621 } 612 622
Note: See TracChangeset
for help on using the changeset viewer.