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

Log Message

Web Inspector: click to re-enable breakpoint clears automatic continue
https://bugs.webkit.org/show_bug.cgi?id=236465

Reviewed by Patrick Angle.

This is not very convenient for developers as it means that they have to click more than
once when re-enabling an auto-continue breakpoint (i.e. once to enable it (which currently
disables auto-continue), and once to re-enable auto-continue). Separating these behaviors is
preferable because it's unlikely that a developer would want to disable auto-continue when
re-enabling a breakpoint if they've taken the time to previously configure auto-continue.

* UserInterface/Views/BreakpointTreeElement.js:
(WI.BreakpointTreeElement.prototype.onenter):
(WI.BreakpointTreeElement.prototype.onspace):
(WI.BreakpointTreeElement.prototype._statusImageElementClicked):
* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor.prototype.textEditorBreakpointClicked):
Replace `cycleToNextNode` with `disabled = !disabled`.

* UserInterface/Models/Breakpoint.js:
(WI.Breakpoint.prototype.cycleToNextMode): Deleted.
Remove this method now that it's no longer used.

Modified Paths

Diff

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


--- trunk/Source/WebInspectorUI/ChangeLog	2022-02-11 21:43:19 UTC (rev 289668)
+++ trunk/Source/WebInspectorUI/ChangeLog	2022-02-11 21:46:42 UTC (rev 289669)
@@ -1,3 +1,28 @@
+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
+
+        Reviewed by Patrick Angle.
+
+        This is not very convenient for developers as it means that they have to click more than
+        once when re-enabling an auto-continue breakpoint (i.e. once to enable it (which currently
+        disables auto-continue), and once to re-enable auto-continue). Separating these behaviors is
+        preferable because it's unlikely that a developer would want to disable auto-continue when
+        re-enabling a breakpoint if they've taken the time to previously configure auto-continue.
+
+        * UserInterface/Views/BreakpointTreeElement.js:
+        (WI.BreakpointTreeElement.prototype.onenter):
+        (WI.BreakpointTreeElement.prototype.onspace):
+        (WI.BreakpointTreeElement.prototype._statusImageElementClicked):
+        * UserInterface/Views/SourceCodeTextEditor.js:
+        (WI.SourceCodeTextEditor.prototype.textEditorBreakpointClicked):
+        Replace `cycleToNextNode` with `disabled = !disabled`.
+
+        * UserInterface/Models/Breakpoint.js:
+        (WI.Breakpoint.prototype.cycleToNextMode): Deleted.
+        Remove this method now that it's no longer used.
+
 2022-02-11  Nikita Vasilyev  <[email protected]>
 
         Web Inspector: [Flexbox] Show flex badge next to flex containers in DOM Tree

Modified: trunk/Source/WebInspectorUI/UserInterface/Models/Breakpoint.js (289668 => 289669)


--- trunk/Source/WebInspectorUI/UserInterface/Models/Breakpoint.js	2022-02-11 21:43:19 UTC (rev 289668)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/Breakpoint.js	2022-02-11 21:46:42 UTC (rev 289669)
@@ -191,33 +191,6 @@
         });
     }
 
-    cycleToNextMode()
-    {
-        if (this.disabled) {
-            if (this.editable) {
-                // When cycling, clear auto-continue when going from disabled to enabled.
-                this.autoContinue = false;
-            }
-
-            this.disabled = false;
-            return;
-        }
-
-        if (this.editable) {
-            if (this.autoContinue) {
-                this.disabled = true;
-                return;
-            }
-
-            if (this.actions.length) {
-                this.autoContinue = true;
-                return;
-            }
-        }
-
-        this.disabled = true;
-    }
-
     addAction(action, {precedingAction} = {})
     {
         console.assert(this.editable, this);

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


--- trunk/Source/WebInspectorUI/UserInterface/Views/BreakpointTreeElement.js	2022-02-11 21:43:19 UTC (rev 289668)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/BreakpointTreeElement.js	2022-02-11 21:46:42 UTC (rev 289669)
@@ -83,13 +83,13 @@
 
     onenter()
     {
-        this._breakpoint.cycleToNextMode();
+        this._breakpoint.disabled = !this._breakpoint.disabled;
         return true;
     }
 
     onspace()
     {
-        this._breakpoint.cycleToNextMode();
+        this._breakpoint.disabled = !this._breakpoint.disabled;
         return true;
     }
 
@@ -215,7 +215,7 @@
 
     _statusImageElementClicked(event)
     {
-        this._breakpoint.cycleToNextMode();
+        this._breakpoint.disabled = !this._breakpoint.disabled;
     }
 };
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js (289668 => 289669)


--- trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js	2022-02-11 21:43:19 UTC (rev 289668)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js	2022-02-11 21:46:42 UTC (rev 289669)
@@ -1400,7 +1400,7 @@
         if (!breakpoint)
             return;
 
-        breakpoint.cycleToNextMode();
+        breakpoint.disabled = !breakpoint.disabled;
     }
 
     textEditorUpdatedFormatting(textEditor)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to