Title: [252201] trunk/Source/WebInspectorUI
Revision
252201
Author
[email protected]
Date
2019-11-07 12:31:44 -0800 (Thu, 07 Nov 2019)

Log Message

Web Inspector: REGRESSION(r249451): missing "Reveal in DOM Tree" on nodes logged to the console
https://bugs.webkit.org/show_bug.cgi?id=203836

Reviewed by Timothy Hatcher.

* UserInterface/Views/ContextMenuUtilities.js:
(WI.appendContextMenuItemsForDOMNode):
* UserInterface/Views/DOMTreeOutline.js:
(WI.DOMTreeOutline.prototype.populateContextMenu):
DOM trees in the console are marked as being non-editable, which is intended to prevent
modifications (e.g. changing an attribute) from being made in the console as the DOM tree
there is not hooked up to the associated DOM agent. In r249451 however, this guard was over
expanded to include non-editing actions, like "Reveal in DOM Tree" and DOM breakpoints.

* UserInterface/Views/LogContentView.js:
(WI.LogContentView.prototype._handleContextMenuEvent):
Drive-by: add a separator before "Copy Selected" so it doesn't end up in the same group as
          any "Collapse All" from a `WI.TreeOutline`.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (252200 => 252201)


--- trunk/Source/WebInspectorUI/ChangeLog	2019-11-07 20:17:59 UTC (rev 252200)
+++ trunk/Source/WebInspectorUI/ChangeLog	2019-11-07 20:31:44 UTC (rev 252201)
@@ -1,5 +1,26 @@
 2019-11-07  Devin Rousso  <[email protected]>
 
+        Web Inspector: REGRESSION(r249451): missing "Reveal in DOM Tree" on nodes logged to the console
+        https://bugs.webkit.org/show_bug.cgi?id=203836
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Views/ContextMenuUtilities.js:
+        (WI.appendContextMenuItemsForDOMNode):
+        * UserInterface/Views/DOMTreeOutline.js:
+        (WI.DOMTreeOutline.prototype.populateContextMenu):
+        DOM trees in the console are marked as being non-editable, which is intended to prevent
+        modifications (e.g. changing an attribute) from being made in the console as the DOM tree
+        there is not hooked up to the associated DOM agent. In r249451 however, this guard was over
+        expanded to include non-editing actions, like "Reveal in DOM Tree" and DOM breakpoints.
+
+        * UserInterface/Views/LogContentView.js:
+        (WI.LogContentView.prototype._handleContextMenuEvent):
+        Drive-by: add a separator before "Copy Selected" so it doesn't end up in the same group as
+                  any "Collapse All" from a `WI.TreeOutline`.
+
+2019-11-07  Devin Rousso  <[email protected]>
+
         Web Inspector: Local Resource Overrides: automatically show a file picker when attempting to create an override for non-text resources
         https://bugs.webkit.org/show_bug.cgi?id=203917
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ContextMenuUtilities.js (252200 => 252201)


--- trunk/Source/WebInspectorUI/UserInterface/Views/ContextMenuUtilities.js	2019-11-07 20:17:59 UTC (rev 252200)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ContextMenuUtilities.js	2019-11-07 20:31:44 UTC (rev 252201)
@@ -226,7 +226,7 @@
 
     contextMenu.appendSeparator();
 
-    if (!options.disallowEditing) {
+    if (!options.usingLocalDOMNode) {
         if (domNode.isCustomElement()) {
             contextMenu.appendItem(WI.UIString("Jump to Definition"), () => {
                 function didGetFunctionDetails(error, response) {
@@ -260,7 +260,7 @@
             contextMenu.appendSeparator();
         }
 
-        if (WI.cssManager.canForcePseudoClasses() && domNode.attached) {
+        if (!options.disallowEditing && WI.cssManager.canForcePseudoClasses() && domNode.attached) {
             contextMenu.appendSeparator();
 
             let pseudoSubMenu = contextMenu.appendSubMenuItem(WI.UIString("Forced Pseudo-Classes", "A context menu item to force (override) a DOM node's pseudo-classes"));

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.js (252200 => 252201)


--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.js	2019-11-07 20:17:59 UTC (rev 252200)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.js	2019-11-07 20:31:44 UTC (rev 252201)
@@ -295,6 +295,7 @@
 
         let options = {
             disallowEditing: !this._editable,
+            usingLocalDOMNode: this._usingLocalDOMNode,
             excludeRevealElement: this._excludeRevealElementContextMenu,
             copySubMenu: subMenus.copy,
         };

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js (252200 => 252201)


--- trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js	2019-11-07 20:17:59 UTC (rev 252200)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js	2019-11-07 20:31:44 UTC (rev 252201)
@@ -506,6 +506,8 @@
 
         let contextMenu = WI.ContextMenu.createFromEvent(event);
 
+        contextMenu.appendSeparator();
+
         if (this._selectedMessages.length) {
             contextMenu.appendItem(WI.UIString("Copy Selected"), () => {
                 InspectorFrontendHost.copyText(this._formatMessagesAsData(true));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to