Title: [171227] trunk/Source/WebInspectorUI
- Revision
- 171227
- Author
- [email protected]
- Date
- 2014-07-18 11:20:54 -0700 (Fri, 18 Jul 2014)
Log 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.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (171226 => 171227)
--- trunk/Source/WebInspectorUI/ChangeLog 2014-07-18 18:01:24 UTC (rev 171226)
+++ trunk/Source/WebInspectorUI/ChangeLog 2014-07-18 18:20:54 UTC (rev 171227)
@@ -1,3 +1,19 @@
+2014-07-18 Timothy Hatcher <[email protected]>
+
+ 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.
+
2014-07-17 Timothy Hatcher <[email protected]>
Make console.profile record to the Timeline.
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js (171226 => 171227)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js 2014-07-18 18:01:24 UTC (rev 171226)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js 2014-07-18 18:20:54 UTC (rev 171227)
@@ -409,15 +409,18 @@
var button = document.createElement("button");
button.className = "show-all-nodes";
button.value = "";
+
var item = new TreeElement(button, null, false);
item.selectable = false;
item.expandAllButton = true;
+
this.insertChild(item, targetButtonIndex);
- this.expandAllButtonElement = item.listItemElement.firstChild;
+ this.expandAllButtonElement = button;
this.expandAllButtonElement.__treeElement = item;
this.expandAllButtonElement.addEventListener("click", this.handleLoadAllChildren.bind(this), false);
} else if (!this.expandAllButtonElement.__treeElement.parent)
this.insertChild(this.expandAllButtonElement.__treeElement, targetButtonIndex);
+
this.expandAllButtonElement.textContent = WebInspector.UIString("Show All Nodes (%d More)").format(childNodeCount - expandedChildCount);
} else if (this.expandAllButtonElement)
delete this.expandAllButtonElement;
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js (171226 => 171227)
--- trunk/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js 2014-07-18 18:01:24 UTC (rev 171226)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js 2014-07-18 18:20:54 UTC (rev 171227)
@@ -85,16 +85,9 @@
if (child.hasChildren && child.treeOutline._treeElementsExpandedState[child.identifier] !== undefined)
child.expanded = child.treeOutline._treeElementsExpandedState[child.identifier];
- if (!this._childrenListNode) {
- this._childrenListNode = this.treeOutline._childrenListNode.ownerDocument.createElement("ol");
- this._childrenListNode.parentTreeElement = this;
- this._childrenListNode.classList.add("children");
- if (this.hidden)
- this._childrenListNode.classList.add("hidden");
- }
+ if (this._childrenListNode)
+ child._attach();
- child._attach();
-
if (this.treeOutline.onadd)
this.treeOutline.onadd(child);
@@ -141,16 +134,9 @@
if (child.hasChildren && child.treeOutline._treeElementsExpandedState[child.identifier] !== undefined)
child.expanded = child.treeOutline._treeElementsExpandedState[child.identifier];
- if (!this._childrenListNode) {
- this._childrenListNode = this.treeOutline._childrenListNode.ownerDocument.createElement("ol");
- this._childrenListNode.parentTreeElement = this;
- this._childrenListNode.classList.add("children");
- if (this.hidden)
- this._childrenListNode.classList.add("hidden");
- }
+ if (this._childrenListNode)
+ child._attach();
- child._attach();
-
if (this.treeOutline.onadd)
this.treeOutline.onadd(child);
@@ -358,6 +344,7 @@
// again, to prevent infinite recursion.
if (ancestors[i] === representedObject)
continue;
+
// FIXME: we could do something faster than findTreeElement since we will know the next
// ancestor exists in the tree.
item = this.findTreeElement(ancestors[i], isAncestor, getParent);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes