Title: [244327] trunk/Source/WebInspectorUI
- Revision
- 244327
- Author
- [email protected]
- Date
- 2019-04-15 23:57:16 -0700 (Mon, 15 Apr 2019)
Log Message
Web Inspector: DOM Nodes should not show $0 when selected in Console area
https://bugs.webkit.org/show_bug.cgi?id=196953
Reviewed by Devin Rousso.
* UserInterface/Views/DOMTreeContentView.js:
(WI.DOMTreeContentView):
Enable showing the last selected element.
* UserInterface/Views/DOMTreeOutline.js:
Make parameters explicit. Drop "selectable" which was always true.
And add a new option for adding a class name.
* UserInterface/Views/DOMTreeOutline.css:
(.tree-outline.dom.show-last-selected li.last-selected > span::after):
(.tree-outline.dom.show-last-selected:focus li.last-selected > span::after):
Only show the "= $0" for a DOM tree that has enabled showing the last selected element.
* UserInterface/Views/FormattedValue.css:
(.formatted-node > .tree-outline.dom li.selected .selection-area):
Don't show the selection-area for a console formatted node.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (244326 => 244327)
--- trunk/Source/WebInspectorUI/ChangeLog 2019-04-16 06:22:41 UTC (rev 244326)
+++ trunk/Source/WebInspectorUI/ChangeLog 2019-04-16 06:57:16 UTC (rev 244327)
@@ -1,3 +1,27 @@
+2019-04-15 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: DOM Nodes should not show $0 when selected in Console area
+ https://bugs.webkit.org/show_bug.cgi?id=196953
+
+ Reviewed by Devin Rousso.
+
+ * UserInterface/Views/DOMTreeContentView.js:
+ (WI.DOMTreeContentView):
+ Enable showing the last selected element.
+
+ * UserInterface/Views/DOMTreeOutline.js:
+ Make parameters explicit. Drop "selectable" which was always true.
+ And add a new option for adding a class name.
+
+ * UserInterface/Views/DOMTreeOutline.css:
+ (.tree-outline.dom.show-last-selected li.last-selected > span::after):
+ (.tree-outline.dom.show-last-selected:focus li.last-selected > span::after):
+ Only show the "= $0" for a DOM tree that has enabled showing the last selected element.
+
+ * UserInterface/Views/FormattedValue.css:
+ (.formatted-node > .tree-outline.dom li.selected .selection-area):
+ Don't show the selection-area for a console formatted node.
+
2019-04-15 Devin Rousso <[email protected]>
Web Inspector: update sheet rect whenever inspector window size changes
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js (244326 => 244327)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js 2019-04-16 06:22:41 UTC (rev 244326)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js 2019-04-16 06:57:16 UTC (rev 244327)
@@ -63,7 +63,7 @@
this.element.classList.add("dom-tree");
this.element.addEventListener("click", this._mouseWasClicked.bind(this), false);
- this._domTreeOutline = new WI.DOMTreeOutline(true, true, true);
+ this._domTreeOutline = new WI.DOMTreeOutline({omitRootDOMNode: true, excludeRevealElementContextMenu: true, showLastSelected: true});
this._domTreeOutline.allowsEmptySelection = false;
this._domTreeOutline.allowsMultipleSelection = true;
this._domTreeOutline.addEventListener(WI.TreeOutline.Event.ElementAdded, this._domTreeElementAdded, this);
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.css (244326 => 244327)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.css 2019-04-16 06:22:41 UTC (rev 244326)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.css 2019-04-16 06:57:16 UTC (rev 244327)
@@ -70,7 +70,7 @@
opacity: 0.3;
}
-.tree-outline.dom li.last-selected > span::after {
+.tree-outline.dom.show-last-selected li.last-selected > span::after {
content: " = $0";
color: var(--console-secondary-text-color);
position: absolute;
@@ -77,7 +77,7 @@
white-space: pre;
}
-.tree-outline.dom:focus li.last-selected > span::after {
+.tree-outline.dom.show-last-selected:focus li.last-selected > span::after {
color: var(--selected-secondary-text-color);
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.js (244326 => 244327)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.js 2019-04-16 06:22:41 UTC (rev 244326)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.js 2019-04-16 06:57:16 UTC (rev 244327)
@@ -30,9 +30,9 @@
WI.DOMTreeOutline = class DOMTreeOutline extends WI.TreeOutline
{
- constructor(omitRootDOMNode, selectable, excludeRevealElementContextMenu)
+ constructor({omitRootDOMNode, excludeRevealElementContextMenu, showLastSelected} = {})
{
- super(selectable);
+ super();
this.element.addEventListener("mousedown", this._onmousedown.bind(this), false);
this.element.addEventListener("mousemove", this._onmousemove.bind(this), false);
@@ -45,6 +45,9 @@
this.element.classList.add("dom", WI.SyntaxHighlightedStyleClassName);
+ if (showLastSelected)
+ this.element.classList.add("show-last-selected");
+
this._includeRootDOMNode = !omitRootDOMNode;
this._excludeRevealElementContextMenu = excludeRevealElementContextMenu;
this._rootDOMNode = null;
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/FormattedValue.css (244326 => 244327)
--- trunk/Source/WebInspectorUI/UserInterface/Views/FormattedValue.css 2019-04-16 06:22:41 UTC (rev 244326)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/FormattedValue.css 2019-04-16 06:57:16 UTC (rev 244327)
@@ -72,6 +72,10 @@
-webkit-user-select: none !important;
}
+.formatted-node > .tree-outline.dom li.selected .selection-area {
+ background-color: transparent;
+}
+
.formatted-node > .tree-outline.dom li.hovered:not(.selected) .selection-area {
display: block;
left: -1px;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes