Changeset 289669 in webkit


Ignore:
Timestamp:
Feb 11, 2022 1:46:42 PM (5 months ago)
Author:
Devin Rousso
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.

Location:
trunk/Source/WebInspectorUI
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r289610 r289669  
     12022-02-11  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: click to re-enable breakpoint clears automatic continue
     4        https://bugs.webkit.org/show_bug.cgi?id=236465
     5
     6        Reviewed by Patrick Angle.
     7
     8        This is not very convenient for developers as it means that they have to click more than
     9        once when re-enabling an auto-continue breakpoint (i.e. once to enable it (which currently
     10        disables auto-continue), and once to re-enable auto-continue). Separating these behaviors is
     11        preferable because it's unlikely that a developer would want to disable auto-continue when
     12        re-enabling a breakpoint if they've taken the time to previously configure auto-continue.
     13
     14        * UserInterface/Views/BreakpointTreeElement.js:
     15        (WI.BreakpointTreeElement.prototype.onenter):
     16        (WI.BreakpointTreeElement.prototype.onspace):
     17        (WI.BreakpointTreeElement.prototype._statusImageElementClicked):
     18        * UserInterface/Views/SourceCodeTextEditor.js:
     19        (WI.SourceCodeTextEditor.prototype.textEditorBreakpointClicked):
     20        Replace `cycleToNextNode` with `disabled = !disabled`.
     21
     22        * UserInterface/Models/Breakpoint.js:
     23        (WI.Breakpoint.prototype.cycleToNextMode): Deleted.
     24        Remove this method now that it's no longer used.
     25
    1262022-02-11  Nikita Vasilyev  <nvasilyev@apple.com>
    227
  • trunk/Source/WebInspectorUI/UserInterface/Models/Breakpoint.js

    r271373 r289669  
    192192    }
    193193
    194     cycleToNextMode()
    195     {
    196         if (this.disabled) {
    197             if (this.editable) {
    198                 // When cycling, clear auto-continue when going from disabled to enabled.
    199                 this.autoContinue = false;
    200             }
    201 
    202             this.disabled = false;
    203             return;
    204         }
    205 
    206         if (this.editable) {
    207             if (this.autoContinue) {
    208                 this.disabled = true;
    209                 return;
    210             }
    211 
    212             if (this.actions.length) {
    213                 this.autoContinue = true;
    214                 return;
    215             }
    216         }
    217 
    218         this.disabled = true;
    219     }
    220 
    221194    addAction(action, {precedingAction} = {})
    222195    {
  • trunk/Source/WebInspectorUI/UserInterface/Views/BreakpointTreeElement.js

    r276310 r289669  
    8484    onenter()
    8585    {
    86         this._breakpoint.cycleToNextMode();
     86        this._breakpoint.disabled = !this._breakpoint.disabled;
    8787        return true;
    8888    }
     
    9090    onspace()
    9191    {
    92         this._breakpoint.cycleToNextMode();
     92        this._breakpoint.disabled = !this._breakpoint.disabled;
    9393        return true;
    9494    }
     
    216216    _statusImageElementClicked(event)
    217217    {
    218         this._breakpoint.cycleToNextMode();
     218        this._breakpoint.disabled = !this._breakpoint.disabled;
    219219    }
    220220};
  • trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js

    r270604 r289669  
    14011401            return;
    14021402
    1403         breakpoint.cycleToNextMode();
     1403        breakpoint.disabled = !breakpoint.disabled;
    14041404    }
    14051405
Note: See TracChangeset for help on using the changeset viewer.