Changeset 169735 in webkit


Ignore:
Timestamp:
Jun 9, 2014 5:46:21 PM (10 years ago)
Author:
commit-queue@webkit.org
Message:

REGRESSION: Web Inspector: Exception showing the DOM tree for a node with too many children
https://bugs.webkit.org/show_bug.cgi?id=129696

Fix issue where sometimes inspecting an element will try to attach the "show all nodes" button
before the expand function is called in TreeElement before _childrenListNode has been set.

Patch by Jono Wells <jonowells@apple.com> on 2014-06-09
Reviewed by Joseph Pecoraro.

  • UserInterface/Views/TreeOutline.js:

(TreeOutline.prototype.appendChild):
(TreeOutline.prototype.insertChild):
Added check for existance of this._childrenListNode.

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r169462 r169735  
     12014-06-09  Jono Wells  <jonowells@apple.com>
     2
     3        REGRESSION: Web Inspector: Exception showing the DOM tree for a node with too many children
     4        https://bugs.webkit.org/show_bug.cgi?id=129696
     5
     6        Fix issue where sometimes inspecting an element will try to attach the "show all nodes" button
     7        before the expand function is called in TreeElement before _childrenListNode has been set.
     8
     9        Reviewed by Joseph Pecoraro.
     10
     11        * UserInterface/Views/TreeOutline.js:
     12        (TreeOutline.prototype.appendChild):
     13        (TreeOutline.prototype.insertChild):
     14        Added check for existance of this._childrenListNode.
     15
    1162014-05-29  Timothy Hatcher  <timothy@apple.com>
    217
  • trunk/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js

    r168919 r169735  
    8686        child.expanded = child.treeOutline._treeElementsExpandedState[child.identifier];
    8787
    88     if (this._childrenListNode)
    89         child._attach();
     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();
    9097
    9198    if (this.treeOutline.onadd)
     
    135142        child.expanded = child.treeOutline._treeElementsExpandedState[child.identifier];
    136143
    137     if (this._childrenListNode)
    138         child._attach();
     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();
    139153
    140154    if (this.treeOutline.onadd)
Note: See TracChangeset for help on using the changeset viewer.