Title: [292441] trunk/Source/WebInspectorUI
Revision
292441
Author
pan...@apple.com
Date
2022-04-05 16:52:51 -0700 (Tue, 05 Apr 2022)

Log Message

Web Inspector: Regression(r291729) The result of logging $0 to the console shows overlapping `$0` and `$[n]` after the node
https://bugs.webkit.org/show_bug.cgi?id=238843

Reviewed by Devin Rousso.

r291729 was missing a check that the `DOMTreeOutline` is actually supposed to show an indicator for the
inspected node, which means other uses of `DOMTreeOutline` (the console, the sources tab, etc.) were showing the
$0 indicator as well.

* UserInterface/Views/DOMTreeOutline.js:
(WI.DOMTreeOutline.prototype.update):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (292440 => 292441)


--- trunk/Source/WebInspectorUI/ChangeLog	2022-04-05 23:28:55 UTC (rev 292440)
+++ trunk/Source/WebInspectorUI/ChangeLog	2022-04-05 23:52:51 UTC (rev 292441)
@@ -1,3 +1,17 @@
+2022-04-05  Patrick Angle  <pan...@apple.com>
+
+        Web Inspector: Regression(r291729) The result of logging $0 to the console shows overlapping `$0` and `$[n]` after the node
+        https://bugs.webkit.org/show_bug.cgi?id=238843
+
+        Reviewed by Devin Rousso.
+
+        r291729 was missing a check that the `DOMTreeOutline` is actually supposed to show an indicator for the
+        inspected node, which means other uses of `DOMTreeOutline` (the console, the sources tab, etc.) were showing the
+        $0 indicator as well.
+
+        * UserInterface/Views/DOMTreeOutline.js:
+        (WI.DOMTreeOutline.prototype.update):
+
 2022-04-01  Michael Saboff  <msab...@apple.com>
 
         Stop copying StagedFrameworks to the secondary path by default

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.js (292440 => 292441)


--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.js	2022-04-05 23:28:55 UTC (rev 292440)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.js	2022-04-05 23:52:51 UTC (rev 292441)
@@ -61,7 +61,8 @@
         this._hideElementsKeyboardShortcut = new WI.KeyboardShortcut(null, "H", this._hideElements.bind(this), this.element);
         this._hideElementsKeyboardShortcut.implicitlyPreventsDefault = false;
 
-        if (showInspectedNode)
+        this._showInspectedNode = !!showInspectedNode;
+        if (this._showInspectedNode)
             WI.domManager.addEventListener(WI.DOMManager.Event.InspectedNodeChanged, this._handleInspectedNodeChanged, this);
     }
 
@@ -189,7 +190,7 @@
             }
         }
 
-        if (WI.domManager.inspectedNode) {
+        if (this._showInspectedNode && WI.domManager.inspectedNode) {
             let inspectedNodeTreeElement = this.findTreeElement(WI.domManager.inspectedNode);
             if (inspectedNodeTreeElement) {
                 inspectedNodeTreeElement.reveal();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to