Title: [289670] trunk/Source/WebInspectorUI
Revision
289670
Author
[email protected]
Date
2022-02-11 13:48:12 -0800 (Fri, 11 Feb 2022)

Log Message

Web Inspector: Sources: double clicking a breakpoint icon should show the edit popover
https://bugs.webkit.org/show_bug.cgi?id=236524

Reviewed by Patrick Angle.

This is a more convenient way to access(/discover) the breakpoint's configuration details.

* UserInterface/Views/BreakpointTreeElement.js:
(WI.BreakpointTreeElement):
(WI.BreakpointTreeElement.prototype._handleStatusImageElementDoubleClicked): Added.

* UserInterface/Views/BreakpointPopover.js:
(WI.BreakpointPopover.show): Added.
(WI.BreakpointPopover.appendContextMenuItems):
Add a convenience method to create a `WI.BreakpointPopover` (or subclass) for the given
breakpoint and `show` it over the given target element.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (289669 => 289670)


--- trunk/Source/WebInspectorUI/ChangeLog	2022-02-11 21:46:42 UTC (rev 289669)
+++ trunk/Source/WebInspectorUI/ChangeLog	2022-02-11 21:48:12 UTC (rev 289670)
@@ -1,5 +1,24 @@
 2022-02-11  Devin Rousso  <[email protected]>
 
+        Web Inspector: Sources: double clicking a breakpoint icon should show the edit popover
+        https://bugs.webkit.org/show_bug.cgi?id=236524
+
+        Reviewed by Patrick Angle.
+
+        This is a more convenient way to access(/discover) the breakpoint's configuration details.
+
+        * UserInterface/Views/BreakpointTreeElement.js:
+        (WI.BreakpointTreeElement):
+        (WI.BreakpointTreeElement.prototype._handleStatusImageElementDoubleClicked): Added.
+
+        * UserInterface/Views/BreakpointPopover.js:
+        (WI.BreakpointPopover.show): Added.
+        (WI.BreakpointPopover.appendContextMenuItems):
+        Add a convenience method to create a `WI.BreakpointPopover` (or subclass) for the given
+        breakpoint and `show` it over the given target element.
+
+2022-02-11  Devin Rousso  <[email protected]>
+
         Web Inspector: click to re-enable breakpoint clears automatic continue
         https://bugs.webkit.org/show_bug.cgi?id=236465
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/BreakpointPopover.js (289669 => 289670)


--- trunk/Source/WebInspectorUI/UserInterface/Views/BreakpointPopover.js	2022-02-11 21:46:42 UTC (rev 289669)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/BreakpointPopover.js	2022-02-11 21:48:12 UTC (rev 289670)
@@ -50,19 +50,24 @@
 
     // Static
 
+    static show(breakpoint, targetElement)
+    {
+        const delegate = null;
+        let popover;
+        if (breakpoint instanceof WI.EventBreakpoint)
+            popover = new WI.EventBreakpointPopover(delegate, breakpoint);
+        else if (breakpoint instanceof WI.URLBreakpoint)
+            popover = new WI.URLBreakpointPopover(delegate, breakpoint);
+        else
+            popover = new WI.BreakpointPopover(delegate, breakpoint);
+        popover.show(targetElement);
+    }
+
     static appendContextMenuItems(contextMenu, breakpoint, targetElement)
     {
         if (breakpoint.editable && targetElement) {
             contextMenu.appendItem(WI.UIString("Edit Breakpoint\u2026"), () => {
-                const delegate = null;
-                let popover;
-                if (breakpoint instanceof WI.EventBreakpoint)
-                    popover = new WI.EventBreakpointPopover(delegate, breakpoint);
-                else if (breakpoint instanceof WI.URLBreakpoint)
-                    popover = new WI.URLBreakpointPopover(delegate, breakpoint);
-                else
-                    popover = new WI.BreakpointPopover(delegate, breakpoint);
-                popover.show(targetElement);
+                WI.BreakpointPopover.show(breakpoint, targetElement);
             });
         }
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/BreakpointTreeElement.js (289669 => 289670)


--- trunk/Source/WebInspectorUI/UserInterface/Views/BreakpointTreeElement.js	2022-02-11 21:46:42 UTC (rev 289669)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/BreakpointTreeElement.js	2022-02-11 21:48:12 UTC (rev 289670)
@@ -45,6 +45,7 @@
         this.status.className = "status-image";
         this.status.addEventListener("mousedown", this._statusImageElementMouseDown.bind(this));
         this.status.addEventListener("click", this._statusImageElementClicked.bind(this));
+        this.status.addEventListener("dblclick", this._handleStatusImageElementDoubleClicked.bind(this));
 
         this.updateStatus();
 
@@ -217,6 +218,11 @@
     {
         this._breakpoint.disabled = !this._breakpoint.disabled;
     }
+
+    _handleStatusImageElementDoubleClicked(event)
+    {
+        WI.BreakpointPopover.show(this._breakpoint, this.status);
+    }
 };
 
 WI.BreakpointTreeElement.ProbeDataUpdatedAnimationDuration = 400; // milliseconds
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to