Changeset 289670 in webkit
- Timestamp:
- Feb 11, 2022 1:48:12 PM (5 months ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
UserInterface/Views/BreakpointPopover.js (modified) (1 diff)
-
UserInterface/Views/BreakpointTreeElement.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r289669 r289670 1 2022-02-11 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: Sources: double clicking a breakpoint icon should show the edit popover 4 https://bugs.webkit.org/show_bug.cgi?id=236524 5 6 Reviewed by Patrick Angle. 7 8 This is a more convenient way to access(/discover) the breakpoint's configuration details. 9 10 * UserInterface/Views/BreakpointTreeElement.js: 11 (WI.BreakpointTreeElement): 12 (WI.BreakpointTreeElement.prototype._handleStatusImageElementDoubleClicked): Added. 13 14 * UserInterface/Views/BreakpointPopover.js: 15 (WI.BreakpointPopover.show): Added. 16 (WI.BreakpointPopover.appendContextMenuItems): 17 Add a convenience method to create a `WI.BreakpointPopover` (or subclass) for the given 18 breakpoint and `show` it over the given target element. 19 1 20 2022-02-11 Devin Rousso <drousso@apple.com> 2 21 -
trunk/Source/WebInspectorUI/UserInterface/Views/BreakpointPopover.js
r269547 r289670 51 51 // Static 52 52 53 static show(breakpoint, targetElement) 54 { 55 const delegate = null; 56 let popover; 57 if (breakpoint instanceof WI.EventBreakpoint) 58 popover = new WI.EventBreakpointPopover(delegate, breakpoint); 59 else if (breakpoint instanceof WI.URLBreakpoint) 60 popover = new WI.URLBreakpointPopover(delegate, breakpoint); 61 else 62 popover = new WI.BreakpointPopover(delegate, breakpoint); 63 popover.show(targetElement); 64 } 65 53 66 static appendContextMenuItems(contextMenu, breakpoint, targetElement) 54 67 { 55 68 if (breakpoint.editable && targetElement) { 56 69 contextMenu.appendItem(WI.UIString("Edit Breakpoint\u2026"), () => { 57 const delegate = null; 58 let popover; 59 if (breakpoint instanceof WI.EventBreakpoint) 60 popover = new WI.EventBreakpointPopover(delegate, breakpoint); 61 else if (breakpoint instanceof WI.URLBreakpoint) 62 popover = new WI.URLBreakpointPopover(delegate, breakpoint); 63 else 64 popover = new WI.BreakpointPopover(delegate, breakpoint); 65 popover.show(targetElement); 70 WI.BreakpointPopover.show(breakpoint, targetElement); 66 71 }); 67 72 } -
trunk/Source/WebInspectorUI/UserInterface/Views/BreakpointTreeElement.js
r289669 r289670 46 46 this.status.addEventListener("mousedown", this._statusImageElementMouseDown.bind(this)); 47 47 this.status.addEventListener("click", this._statusImageElementClicked.bind(this)); 48 this.status.addEventListener("dblclick", this._handleStatusImageElementDoubleClicked.bind(this)); 48 49 49 50 this.updateStatus(); … … 218 219 this._breakpoint.disabled = !this._breakpoint.disabled; 219 220 } 221 222 _handleStatusImageElementDoubleClicked(event) 223 { 224 WI.BreakpointPopover.show(this._breakpoint, this.status); 225 } 220 226 }; 221 227
Note: See TracChangeset
for help on using the changeset viewer.