Title: [235996] trunk/Source/WebInspectorUI
- Revision
- 235996
- Author
- [email protected]
- Date
- 2018-09-13 16:58:41 -0700 (Thu, 13 Sep 2018)
Log Message
Web Inspector: Opening inspector with a selected element might immediately scroll that element off screen in the DOM Tree outline
https://bugs.webkit.org/show_bug.cgi?id=189569
<rdar://problem/44397098>
Patch by Joseph Pecoraro <[email protected]> on 2018-09-13
Reviewed by Devin Rousso.
* UserInterface/Views/DOMTreeContentView.js:
(WI.DOMTreeContentView.prototype.layout):
Re-select the selected DOM node in the DOM Tree when the view resizes.
Typically this can happen if the sidebar opens/closes/resizes, in which
case we will want the selected DOM node to stay in view even if the DOM
tree starts wrapping earlier content.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (235995 => 235996)
--- trunk/Source/WebInspectorUI/ChangeLog 2018-09-13 22:50:39 UTC (rev 235995)
+++ trunk/Source/WebInspectorUI/ChangeLog 2018-09-13 23:58:41 UTC (rev 235996)
@@ -1,3 +1,18 @@
+2018-09-13 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: Opening inspector with a selected element might immediately scroll that element off screen in the DOM Tree outline
+ https://bugs.webkit.org/show_bug.cgi?id=189569
+ <rdar://problem/44397098>
+
+ Reviewed by Devin Rousso.
+
+ * UserInterface/Views/DOMTreeContentView.js:
+ (WI.DOMTreeContentView.prototype.layout):
+ Re-select the selected DOM node in the DOM Tree when the view resizes.
+ Typically this can happen if the sidebar opens/closes/resizes, in which
+ case we will want the selected DOM node to stay in view even if the DOM
+ tree starts wrapping earlier content.
+
2018-09-12 Joseph Pecoraro <[email protected]>
Web Inspector: fix test case failures in js-isLikelyStackTrace.html
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js (235995 => 235996)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js 2018-09-13 22:50:39 UTC (rev 235995)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js 2018-09-13 23:58:41 UTC (rev 235996)
@@ -348,6 +348,9 @@
layout()
{
this._domTreeOutline.updateSelection();
+
+ if (this.layoutReason === WI.View.LayoutReason.Resize)
+ this._domTreeOutline.selectDOMNode(this._domTreeOutline.selectedDOMNode());
}
// Private
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes