Changeset 171227 in webkit


Ignore:
Timestamp:
Jul 18, 2014 11:20:54 AM (10 years ago)
Author:
timothy@apple.com
Message:

Revert r169735 since it broke Timeline, and fix bug 129696 in a more targeted way.

REGRESSION (r169735): Web Inspector: Timeline tree outline missing data until collapse-expand.
https://bugs.webkit.org/show_bug.cgi?id=134845

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/DOMTreeElement.js:

(WebInspector.DOMTreeElement.prototype.adjustCollapsedRange): Use button isteand of assuming
item.listItemElement will be ready to use. The listItemElement node is lazily created.

  • UserInterface/Views/TreeOutline.js:

(TreeOutline.prototype.appendChild): Don't attach unless _childrenListNode exists.
(TreeOutline.prototype.insertChild): Ditto.

Location:
trunk/Source/WebInspectorUI
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r171195 r171227  
     12014-07-18  Timothy Hatcher  <timothy@apple.com>
     2
     3        Revert r169735 since it broke Timeline, and fix bug 129696 in a more targeted way.
     4
     5        REGRESSION (r169735): Web Inspector: Timeline tree outline missing data until collapse-expand.
     6        https://bugs.webkit.org/show_bug.cgi?id=134845
     7
     8        Reviewed by Joseph Pecoraro.
     9
     10        * UserInterface/Views/DOMTreeElement.js:
     11        (WebInspector.DOMTreeElement.prototype.adjustCollapsedRange): Use button isteand of assuming
     12        item.listItemElement will be ready to use. The listItemElement node is lazily created.
     13        * UserInterface/Views/TreeOutline.js:
     14        (TreeOutline.prototype.appendChild): Don't attach unless _childrenListNode exists.
     15        (TreeOutline.prototype.insertChild): Ditto.
     16
    1172014-07-17  Timothy Hatcher  <timothy@apple.com>
    218
  • trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js

    r168919 r171227  
    410410                button.className = "show-all-nodes";
    411411                button.value = "";
     412
    412413                var item = new TreeElement(button, null, false);
    413414                item.selectable = false;
    414415                item.expandAllButton = true;
     416
    415417                this.insertChild(item, targetButtonIndex);
    416                 this.expandAllButtonElement = item.listItemElement.firstChild;
     418                this.expandAllButtonElement = button;
    417419                this.expandAllButtonElement.__treeElement = item;
    418420                this.expandAllButtonElement.addEventListener("click", this.handleLoadAllChildren.bind(this), false);
    419421            } else if (!this.expandAllButtonElement.__treeElement.parent)
    420422                this.insertChild(this.expandAllButtonElement.__treeElement, targetButtonIndex);
     423
    421424            this.expandAllButtonElement.textContent = WebInspector.UIString("Show All Nodes (%d More)").format(childNodeCount - expandedChildCount);
    422425        } else if (this.expandAllButtonElement)
  • trunk/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js

    r170416 r171227  
    8686        child.expanded = child.treeOutline._treeElementsExpandedState[child.identifier];
    8787
    88     if (!this._childrenListNode) {
    89         this._childrenListNode = this.treeOutline._childrenListNode.ownerDocument.createElement("ol");
    90         this._childrenListNode.parentTreeElement = this;
    91         this._childrenListNode.classList.add("children");
    92         if (this.hidden)
    93             this._childrenListNode.classList.add("hidden");
    94     }
    95 
    96     child._attach();
     88    if (this._childrenListNode)
     89        child._attach();
    9790
    9891    if (this.treeOutline.onadd)
     
    142135        child.expanded = child.treeOutline._treeElementsExpandedState[child.identifier];
    143136
    144     if (!this._childrenListNode) {
    145         this._childrenListNode = this.treeOutline._childrenListNode.ownerDocument.createElement("ol");
    146         this._childrenListNode.parentTreeElement = this;
    147         this._childrenListNode.classList.add("children");
    148         if (this.hidden)
    149             this._childrenListNode.classList.add("hidden");
    150     }
    151 
    152     child._attach();
     137    if (this._childrenListNode)
     138        child._attach();
    153139
    154140    if (this.treeOutline.onadd)
     
    359345        if (ancestors[i] === representedObject)
    360346            continue;
     347
    361348        // FIXME: we could do something faster than findTreeElement since we will know the next
    362349        // ancestor exists in the tree.
Note: See TracChangeset for help on using the changeset viewer.