Web Inspector: Debugger: deleting a special breakpoint should disable it
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Apr 2019 18:34:51 +0000 (18:34 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Apr 2019 18:34:51 +0000 (18:34 +0000)
https://bugs.webkit.org/show_bug.cgi?id=196737
<rdar://problem/49740680>

Reviewed by Timothy Hatcher.

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

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244274 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/BreakpointTreeElement.js

index d97e816..926a85c 100644 (file)
@@ -1,5 +1,16 @@
 2019-04-15  Devin Rousso  <drousso@apple.com>
 
+        Web Inspector: Debugger: deleting a special breakpoint should disable it
+        https://bugs.webkit.org/show_bug.cgi?id=196737
+        <rdar://problem/49740680>
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Views/BreakpointTreeElement.js:
+        (WI.BreakpointTreeElement.prototype.ondelete):
+
+2019-04-15  Devin Rousso  <drousso@apple.com>
+
         Web Inspector: Uncaught Exception: null is not an object (evaluating 'this.selectedTreeElement.reveal')
         https://bugs.webkit.org/show_bug.cgi?id=196804
         <rdar://problem/49800708>
index 32d149a..2ff7a6b 100644 (file)
@@ -77,8 +77,13 @@ WI.BreakpointTreeElement = class BreakpointTreeElement extends WI.GeneralTreeEle
 
     ondelete()
     {
-        if (!WI.debuggerManager.isBreakpointRemovable(this._breakpoint))
+        if (!WI.debuggerManager.isBreakpointRemovable(this._breakpoint)) {
+            if (this._breakpoint.disabled)
+                InspectorFrontendHost.beep();
+            else
+                this._breakpoint.disabled = true;
             return true;
+        }
 
         // We set this flag so that TreeOutlines that will remove this
         // BreakpointTreeElement will know whether it was deleted from