Title: [184515] trunk/Source/WebInspectorUI
- Revision
- 184515
- Author
- [email protected]
- Date
- 2015-05-18 15:16:59 -0700 (Mon, 18 May 2015)
Log Message
Web Inspector: Improve Reliability of Closing and Reopening Elements Tab
https://bugs.webkit.org/show_bug.cgi?id=145139
Patch by Joseph Pecoraro <[email protected]> on 2015-05-18
Reviewed by Timothy Hatcher.
* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype.highlightSearchResults):
(WebInspector.DOMTreeElement.prototype.hideSearchHighlights):
(WebInspector.DOMTreeElement.prototype.emphasizeSearchHighlight.animationEnded):
(WebInspector.DOMTreeElement.prototype.emphasizeSearchHighlight):
(WebInspector.DOMTreeElement.prototype._updateChildren):
(WebInspector.DOMTreeElement.prototype.adjustCollapsedRange):
(WebInspector.DOMTreeElement.prototype._startEditingAsHTML.dispose):
(WebInspector.DOMTreeElement.prototype._startEditingAsHTML):
(WebInspector.DOMTreeElement.prototype.updateTitle):
Stop using the `delete` operator.
* UserInterface/Views/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline.prototype.setVisible):
Trigger an update when the outline is made visible.
* UserInterface/Views/FrameDOMTreeContentView.js:
(WebInspector.FrameDOMTreeContentView.prototype._rootDOMNodeAvailable):
Provide a reasonable default selection if there is no body or document element.
For example in an augmented DOM tree.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (184514 => 184515)
--- trunk/Source/WebInspectorUI/ChangeLog 2015-05-18 22:09:53 UTC (rev 184514)
+++ trunk/Source/WebInspectorUI/ChangeLog 2015-05-18 22:16:59 UTC (rev 184515)
@@ -1,5 +1,33 @@
2015-05-18 Joseph Pecoraro <[email protected]>
+ Web Inspector: Improve Reliability of Closing and Reopening Elements Tab
+ https://bugs.webkit.org/show_bug.cgi?id=145139
+
+ Reviewed by Timothy Hatcher.
+
+ * UserInterface/Views/DOMTreeElement.js:
+ (WebInspector.DOMTreeElement.prototype.highlightSearchResults):
+ (WebInspector.DOMTreeElement.prototype.hideSearchHighlights):
+ (WebInspector.DOMTreeElement.prototype.emphasizeSearchHighlight.animationEnded):
+ (WebInspector.DOMTreeElement.prototype.emphasizeSearchHighlight):
+ (WebInspector.DOMTreeElement.prototype._updateChildren):
+ (WebInspector.DOMTreeElement.prototype.adjustCollapsedRange):
+ (WebInspector.DOMTreeElement.prototype._startEditingAsHTML.dispose):
+ (WebInspector.DOMTreeElement.prototype._startEditingAsHTML):
+ (WebInspector.DOMTreeElement.prototype.updateTitle):
+ Stop using the `delete` operator.
+
+ * UserInterface/Views/DOMTreeOutline.js:
+ (WebInspector.DOMTreeOutline.prototype.setVisible):
+ Trigger an update when the outline is made visible.
+
+ * UserInterface/Views/FrameDOMTreeContentView.js:
+ (WebInspector.FrameDOMTreeContentView.prototype._rootDOMNodeAvailable):
+ Provide a reasonable default selection if there is no body or document element.
+ For example in an augmented DOM tree.
+
+2015-05-18 Joseph Pecoraro <[email protected]>
+
Web Inspector: Tab Restoration incorrectly makes ContentViews "shown" in background tabs
https://bugs.webkit.org/show_bug.cgi?id=145080
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js (184514 => 184515)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js 2015-05-18 22:09:53 UTC (rev 184514)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js 2015-05-18 22:16:59 UTC (rev 184515)
@@ -52,7 +52,7 @@
{
if (this._searchQuery !== searchQuery) {
this._updateSearchHighlight(false);
- delete this._highlightResult; // A new search query.
+ this._highlightResult = undefined; // A new search query.
}
this._searchQuery = searchQuery;
@@ -62,7 +62,7 @@
hideSearchHighlights()
{
- delete this._searchHighlightsVisible;
+ this._searchHighlightsVisible = false;
this._updateSearchHighlight(false);
}
@@ -93,7 +93,7 @@
return;
this._bouncyHighlightElement.remove();
- delete this._bouncyHighlightElement;
+ this._bouncyHighlightElement = null;
}
this._bouncyHighlightElement.addEventListener("webkitAnimationEnd", animationEnded.bind(this));
@@ -407,7 +407,7 @@
treeOutlineContainerElement.scrollTop = originalScrollTop;
}
- delete this._updateChildrenInProgress;
+ this._updateChildrenInProgress = false;
}
adjustCollapsedRange()
@@ -447,7 +447,7 @@
this.expandAllButtonElement.textContent = WebInspector.UIString("Show All Nodes (%d More)").format(childNodeCount - expandedChildCount);
} else if (this.expandAllButtonElement)
- delete this.expandAllButtonElement;
+ this.expandAllButtonElement = null;
}
handleLoadAllChildren()
@@ -839,7 +839,7 @@
// Remove editor.
this.listItemElement.removeChild(this._htmlEditElement);
- delete this._htmlEditElement;
+ this._htmlEditElement = null;
// Unhide children item.
if (this._childrenListNode)
this._childrenListNode.style.removeProperty("display");
@@ -1030,10 +1030,10 @@
} else {
this.title = document.createElement("span");
this.title.appendChild(this._nodeTitleInfo().titleDOM);
- delete this._highlightResult;
+ this._highlightResult = undefined;
}
- delete this.selectionElement;
+ this.selectionElement = null;
this.updateSelection();
this._highlightSearchResults();
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.js (184514 => 184515)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.js 2015-05-18 22:09:53 UTC (rev 184514)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.js 2015-05-18 22:16:59 UTC (rev 184515)
@@ -89,8 +89,11 @@
return;
this._updateModifiedNodes();
+
if (this._selectedDOMNode)
this._revealAndSelectNode(this._selectedDOMNode, omitFocus);
+
+ this.update();
}
get rootDOMNode()
@@ -176,7 +179,7 @@
treeElement.selectable = this._selectEnabled;
this.appendChild(treeElement);
node = node.nextSibling;
-
+
if (treeElement.hasChildren && !treeElement.expanded)
treeElement.expand();
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/FrameDOMTreeContentView.js (184514 => 184515)
--- trunk/Source/WebInspectorUI/UserInterface/Views/FrameDOMTreeContentView.js 2015-05-18 22:09:53 UTC (rev 184514)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/FrameDOMTreeContentView.js 2015-05-18 22:16:59 UTC (rev 184515)
@@ -72,7 +72,7 @@
return;
}
- this._restoreSelectedNodeAfterUpdate(this._domTree.frame.url, rootDOMNode.body || rootDOMNode.documentElement);
+ this._restoreSelectedNodeAfterUpdate(this._domTree.frame.url, rootDOMNode.body || rootDOMNode.documentElement || rootDOMNode.firstChild);
},
_rootDOMNodeInvalidated: function(event)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes