Title: [161687] trunk/Source/WebInspectorUI
Revision
161687
Author
[email protected]
Date
2014-01-10 15:48:54 -0800 (Fri, 10 Jan 2014)

Log Message

Web Inspector: cycle clicked breakpoints between enabled, auto-continue, and disabled
https://bugs.webkit.org/show_bug.cgi?id=126669

Reviewed by Joseph Pecoraro.

It's time-consuming to change a breakpoint's auto-continue setting through the
breakpoint editor popup. This patch enables the user to toggle between enabled,
auto-continue, and disabled by clicking on the breakpoint wedge in the sidebar
tree and in the source text editor gutter. The auto-continue option is only
cycled when the breakpoint has associated actions.

Clean up the breakpoint editor dialog so it hides irrelevant options when
no breakpoint actions have been added.

Automatically unset auto-continue when the last breakpoint action is removed.

Rename the delegate textEditorBreakpointToggled to textEditorBreakpointClicked, since
the behavior of the click depends on breakpoint state not available in the text editor.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Breakpoint.js:
(WebInspector.Breakpoint.prototype.cycleToNextMode): Added.
(WebInspector.Breakpoint.prototype.toggleAutoContinue): Added.
(WebInspector.Breakpoint.prototype.appendContextMenuItems): Add auto-continue options.
(WebInspector.Breakpoint.prototype.removeAction):

(WebInspector.Breakpoint.prototype._editBreakpointPopoverContentElement):
(WebInspector.Breakpoint.prototype._popoverActionsAddActionButtonClicked):
(WebInspector.Breakpoint.prototype.breakpointActionViewAppendActionView):
(WebInspector.Breakpoint.prototype.breakpointActionViewRemoveActionView):
(WebInspector.Breakpoint.prototype.willDismissPopover):
* UserInterface/BreakpointTreeElement.css:
(.item.breakpoint .status > .status-image.auto-continue):
(.item.breakpoint .status > .status-image.disabled):
* UserInterface/BreakpointTreeElement.js:
(WebInspector.BreakpointTreeElement):
(WebInspector.BreakpointTreeElement.prototype.onenter):
(WebInspector.BreakpointTreeElement.prototype.onspace):
(WebInspector.BreakpointTreeElement.prototype._updateStatus):
(WebInspector.BreakpointTreeElement.prototype._breakpointLocationDidChange):
(WebInspector.BreakpointTreeElement.prototype._statusImageElementClicked):
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor):
(WebInspector.SourceCodeTextEditor.prototype.close):
(WebInspector.SourceCodeTextEditor.prototype._breakpointInfoForBreakpoint):
(WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointClicked):
* UserInterface/TextEditor.css:
(.text-editor > .CodeMirror .breakpoint-auto-continue:not(.breakpoint-disabled) .CodeMirror-linenumber::before):
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype._setBreakpointStylesOnLine.updateStyles):
(WebInspector.TextEditor.prototype._setBreakpointStylesOnLine):
(WebInspector.TextEditor.prototype.updateStyles):
(WebInspector.TextEditor.prototype._removeBreakpointFromLineAndColumn):
(WebInspector.TextEditor.prototype._documentMouseUp):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (161686 => 161687)


--- trunk/Source/WebInspectorUI/ChangeLog	2014-01-10 23:47:12 UTC (rev 161686)
+++ trunk/Source/WebInspectorUI/ChangeLog	2014-01-10 23:48:54 UTC (rev 161687)
@@ -1,3 +1,60 @@
+2014-01-10  Brian Burg  <[email protected]>
+
+        Web Inspector: cycle clicked breakpoints between enabled, auto-continue, and disabled
+        https://bugs.webkit.org/show_bug.cgi?id=126669
+
+        Reviewed by Joseph Pecoraro.
+
+        It's time-consuming to change a breakpoint's auto-continue setting through the
+        breakpoint editor popup. This patch enables the user to toggle between enabled,
+        auto-continue, and disabled by clicking on the breakpoint wedge in the sidebar
+        tree and in the source text editor gutter. The auto-continue option is only
+        cycled when the breakpoint has associated actions.
+
+        Clean up the breakpoint editor dialog so it hides irrelevant options when
+        no breakpoint actions have been added.
+
+        Automatically unset auto-continue when the last breakpoint action is removed.
+
+        Rename the delegate textEditorBreakpointToggled to textEditorBreakpointClicked, since
+        the behavior of the click depends on breakpoint state not available in the text editor.
+
+        * Localizations/en.lproj/localizedStrings.js:
+        * UserInterface/Breakpoint.js:
+        (WebInspector.Breakpoint.prototype.cycleToNextMode): Added.
+        (WebInspector.Breakpoint.prototype.toggleAutoContinue): Added.
+        (WebInspector.Breakpoint.prototype.appendContextMenuItems): Add auto-continue options.
+        (WebInspector.Breakpoint.prototype.removeAction):
+
+        (WebInspector.Breakpoint.prototype._editBreakpointPopoverContentElement):
+        (WebInspector.Breakpoint.prototype._popoverActionsAddActionButtonClicked):
+        (WebInspector.Breakpoint.prototype.breakpointActionViewAppendActionView):
+        (WebInspector.Breakpoint.prototype.breakpointActionViewRemoveActionView):
+        (WebInspector.Breakpoint.prototype.willDismissPopover):
+        * UserInterface/BreakpointTreeElement.css:
+        (.item.breakpoint .status > .status-image.auto-continue):
+        (.item.breakpoint .status > .status-image.disabled):
+        * UserInterface/BreakpointTreeElement.js:
+        (WebInspector.BreakpointTreeElement):
+        (WebInspector.BreakpointTreeElement.prototype.onenter):
+        (WebInspector.BreakpointTreeElement.prototype.onspace):
+        (WebInspector.BreakpointTreeElement.prototype._updateStatus):
+        (WebInspector.BreakpointTreeElement.prototype._breakpointLocationDidChange):
+        (WebInspector.BreakpointTreeElement.prototype._statusImageElementClicked):
+        * UserInterface/SourceCodeTextEditor.js:
+        (WebInspector.SourceCodeTextEditor):
+        (WebInspector.SourceCodeTextEditor.prototype.close):
+        (WebInspector.SourceCodeTextEditor.prototype._breakpointInfoForBreakpoint):
+        (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointClicked):
+        * UserInterface/TextEditor.css:
+        (.text-editor > .CodeMirror .breakpoint-auto-continue:not(.breakpoint-disabled) .CodeMirror-linenumber::before):
+        * UserInterface/TextEditor.js:
+        (WebInspector.TextEditor.prototype._setBreakpointStylesOnLine.updateStyles):
+        (WebInspector.TextEditor.prototype._setBreakpointStylesOnLine):
+        (WebInspector.TextEditor.prototype.updateStyles):
+        (WebInspector.TextEditor.prototype._removeBreakpointFromLineAndColumn):
+        (WebInspector.TextEditor.prototype._documentMouseUp):
+
 2014-01-10  Timothy Hatcher  <[email protected]>
 
         Clean up some areas of TreeOutline.

Modified: trunk/Source/WebInspectorUI/UserInterface/Breakpoint.js (161686 => 161687)


--- trunk/Source/WebInspectorUI/UserInterface/Breakpoint.js	2014-01-10 23:47:12 UTC (rev 161686)
+++ trunk/Source/WebInspectorUI/UserInterface/Breakpoint.js	2014-01-10 23:48:54 UTC (rev 161687)
@@ -66,6 +66,7 @@
 WebInspector.Breakpoint.WidePopoverClassName = "wide";
 WebInspector.Breakpoint.PopoverConditionInputId = "edit-breakpoint-popover-condition";
 WebInspector.Breakpoint.PopoverOptionsAutoContinueInputId = "edit-breakpoint-popoover-auto-continue";
+WebInspector.Breakpoint.HiddenStyleClassName = "hidden";
 
 WebInspector.Breakpoint.DefaultBreakpointActionType = WebInspector.BreakpointAction.Type.Log;
 
@@ -202,6 +203,28 @@
         };
     },
 
+    cycleToNextMode: function()
+    {
+        if (this.disabled) {
+            // When cycling, clear auto-continue when going from disabled to enabled.
+            this.autoContinue = false;
+            this.disabled = false;
+            return;
+        }
+
+        if (this.autoContinue) {
+            this.disabled = true;
+            return;
+        }
+
+        if (this.actions.length) {
+            this.autoContinue = true;
+            return;
+        }
+
+        this.disabled = true;
+    },
+
     appendContextMenuItems: function(contextMenu, breakpointDisplayElement)
     {
         console.assert(document.body.contains(breakpointDisplayElement), "breakpoint popover display element must be in the DOM");
@@ -223,6 +246,11 @@
             this.disabled = !this.disabled;
         }
 
+        function toggleAutoContinue()
+        {
+            this.autoContinue = !this.autoContinue;
+        }
+
         function revealOriginalSourceCodeLocation()
         {
             WebInspector.resourceSidebarPanel.showOriginalOrFormattedSourceCodeLocation(this._sourceCodeLocation);
@@ -231,11 +259,17 @@
         if (WebInspector.debuggerManager.isBreakpointEditable(this))
             contextMenu.appendItem(WebInspector.UIString("Edit Breakpoint…"), editBreakpoint.bind(this));
 
-        if (this._disabled)
+        if (this.autoContinue && !this.disabled) {
+            contextMenu.appendItem(WebInspector.UIString("Disable Breakpoint"), toggleBreakpoint.bind(this));
+            contextMenu.appendItem(WebInspector.UIString("Cancel Automatic Continue"), toggleAutoContinue.bind(this));
+        } else if (!this.disabled)
+            contextMenu.appendItem(WebInspector.UIString("Disable Breakpoint"), toggleBreakpoint.bind(this));
+        else
             contextMenu.appendItem(WebInspector.UIString("Enable Breakpoint"), toggleBreakpoint.bind(this));
-        else
-            contextMenu.appendItem(WebInspector.UIString("Disable Breakpoint"), toggleBreakpoint.bind(this));
 
+        if (!this.autoContinue && !this.disabled && this.actions.length)
+            contextMenu.appendItem(WebInspector.UIString("Set to Automatically Continue"), toggleAutoContinue.bind(this));
+
         if (WebInspector.debuggerManager.isBreakpointRemovable(this)) {
             contextMenu.appendSeparator();
             contextMenu.appendItem(WebInspector.UIString("Delete Breakpoint"), removeBreakpoint.bind(this));
@@ -292,6 +326,9 @@
 
         this._actions.splice(index, 1);
 
+        if (!this._actions.length)
+            this.autoContinue = false;
+
         this.dispatchEventToListeners(WebInspector.Breakpoint.Event.ActionsDidChange);
     },
 
@@ -396,11 +433,13 @@
                 }
             }
 
-            var optionsRow = table.appendChild(document.createElement("tr"));
+            var optionsRow = this._popoverOptionsRowElement = table.appendChild(document.createElement("tr"));
+            if (!this._actions.length)
+                optionsRow.classList.add(WebInspector.Breakpoint.HiddenStyleClassName);
             var optionsHeader = optionsRow.appendChild(document.createElement("th"));
             var optionsData = optionsRow.appendChild(document.createElement("td"));
             var optionsLabel = optionsHeader.appendChild(document.createElement("label"));
-            var optionsCheckbox = optionsData.appendChild(document.createElement("input"));
+            var optionsCheckbox = this._popoverOptionsCheckboxElement = optionsData.appendChild(document.createElement("input"));
             var optionsCheckboxLabel = optionsData.appendChild(document.createElement("label"));
             optionsCheckbox.id = WebInspector.Breakpoint.PopoverOptionsAutoContinueInputId;
             optionsCheckbox.type = "checkbox";
@@ -435,7 +474,7 @@
         var newAction = this.createAction(WebInspector.Breakpoint.DefaultBreakpointActionType);
         var newBreakpointActionView = new WebInspector.BreakpointActionView(newAction, this);
         this._popoverActionsInsertBreakpointActionView(newBreakpointActionView, -1);
-
+        this._popoverOptionsRowElement.classList.remove(WebInspector.Breakpoint.HiddenStyleClassName);
         this._popover.update();
     },
 
@@ -463,6 +502,7 @@
         }
 
         this._popoverActionsInsertBreakpointActionView(newBreakpointActionView, index);
+        this._popoverOptionsRowElement.classList.remove(WebInspector.Breakpoint.HiddenStyleClassName);
 
         this._popover.update();
     },
@@ -471,8 +511,11 @@
     {
         breakpointActionView.element.remove();
 
-        if (!this._actionsContainer.children.length)
+        if (!this._actionsContainer.children.length) {
             this._popoverActionsCreateAddActionButton();
+            this._popoverOptionsRowElement.classList.add(WebInspector.Breakpoint.HiddenStyleClassName);
+            this._popoverOptionsCheckboxElement.checked = false;
+        }
 
         this._popover.update();
     },
@@ -486,6 +529,8 @@
     {
         console.assert(this._popover === popover);
         delete this._popoverContentElement;
+        delete this._popoverOptionsRowElement;
+        delete this._popoverOptionsCheckboxElement;
         delete this._actionsContainer;
         delete this._popover;
     },

Modified: trunk/Source/WebInspectorUI/UserInterface/BreakpointTreeElement.css (161686 => 161687)


--- trunk/Source/WebInspectorUI/UserInterface/BreakpointTreeElement.css	2014-01-10 23:47:12 UTC (rev 161686)
+++ trunk/Source/WebInspectorUI/UserInterface/BreakpointTreeElement.css	2014-01-10 23:48:54 UTC (rev 161687)
@@ -34,8 +34,12 @@
     content: url(Images/BreakpointButton.svg);
 }
 
+.item.breakpoint .status > .status-image.auto-continue {
+    opacity: 0.6;
+}
+
 .item.breakpoint .status > .status-image.disabled {
-    opacity: 0.45;
+    opacity: 0.35;
 }
 
 .item.breakpoint .subtitle.formatted-location {

Modified: trunk/Source/WebInspectorUI/UserInterface/BreakpointTreeElement.js (161686 => 161687)


--- trunk/Source/WebInspectorUI/UserInterface/BreakpointTreeElement.js	2014-01-10 23:47:12 UTC (rev 161686)
+++ trunk/Source/WebInspectorUI/UserInterface/BreakpointTreeElement.js	2014-01-10 23:48:54 UTC (rev 161687)
@@ -37,6 +37,7 @@
     if (!title)
         this._breakpoint.addEventListener(WebInspector.Breakpoint.Event.LocationDidChange, this._breakpointLocationDidChange, this);
     this._breakpoint.addEventListener(WebInspector.Breakpoint.Event.DisabledStateDidChange, this._updateStatus, this);
+    this._breakpoint.addEventListener(WebInspector.Breakpoint.Event.AutoContinueDidChange, this._updateStatus, this);
     this._breakpoint.addEventListener(WebInspector.Breakpoint.Event.ResolvedStateDidChange, this._updateStatus, this);
 
     this._statusImageElement = document.createElement("img");
@@ -56,6 +57,7 @@
 WebInspector.BreakpointTreeElement.StyleClassName = "breakpoint";
 WebInspector.BreakpointTreeElement.StatusImageElementStyleClassName = "status-image";
 WebInspector.BreakpointTreeElement.StatusImageResolvedStyleClassName = "resolved";
+WebInspector.BreakpointTreeElement.StatusImageAutoContinueStyleClassName = "auto-continue";
 WebInspector.BreakpointTreeElement.StatusImageDisabledStyleClassName = "disabled";
 WebInspector.BreakpointTreeElement.FormattedLocationStyleClassName = "formatted-location";
 
@@ -80,13 +82,13 @@
 
     onenter: function()
     {
-        this._breakpoint.disabled = !this._breakpoint.disabled;
+        this._breakpoint.cycleToNextMode();
         return true;
     },
 
     onspace: function()
     {
-        this._breakpoint.disabled = !this._breakpoint.disabled;
+        this._breakpoint.cycleToNextMode();
         return true;
     },
 
@@ -129,6 +131,11 @@
         else
             this._statusImageElement.classList.remove(WebInspector.BreakpointTreeElement.StatusImageDisabledStyleClassName);
 
+        if (this._breakpoint.autoContinue)
+            this._statusImageElement.classList.add(WebInspector.BreakpointTreeElement.StatusImageAutoContinueStyleClassName);
+        else
+            this._statusImageElement.classList.remove(WebInspector.BreakpointTreeElement.StatusImageAutoContinueStyleClassName);
+
         if (this._breakpoint.resolved)
             this._statusImageElement.classList.add(WebInspector.BreakpointTreeElement.StatusImageResolvedStyleClassName);
         else
@@ -143,6 +150,7 @@
         if (event.data.oldDisplaySourceCode === this._breakpoint.displaySourceCode) {
             this._breakpoint.addEventListener(WebInspector.Breakpoint.Event.LocationDidChange, this._breakpointLocationDidChange, this);
             this._breakpoint.addEventListener(WebInspector.Breakpoint.Event.DisabledStateDidChange, this._updateStatus, this);
+            this._breakpoint.addEventListener(WebInspector.Breakpoint.Event.AutoContinueDidChange, this._updateStatus, this);
             this._breakpoint.addEventListener(WebInspector.Breakpoint.Event.ResolvedStateDidChange, this._updateStatus, this);
             return;
         }
@@ -158,7 +166,7 @@
 
     _statusImageElementClicked: function(event)
     {
-        this._breakpoint.disabled = !this._breakpoint.disabled;
+        this._breakpoint.cycleToNextMode();
     }
 };
 

Modified: trunk/Source/WebInspectorUI/UserInterface/SourceCodeTextEditor.js (161686 => 161687)


--- trunk/Source/WebInspectorUI/UserInterface/SourceCodeTextEditor.js	2014-01-10 23:47:12 UTC (rev 161686)
+++ trunk/Source/WebInspectorUI/UserInterface/SourceCodeTextEditor.js	2014-01-10 23:48:54 UTC (rev 161687)
@@ -43,6 +43,7 @@
 
     if (this._supportsDebugging) {
         WebInspector.Breakpoint.addEventListener(WebInspector.Breakpoint.Event.DisabledStateDidChange, this._updateBreakpointStatus, this);
+        WebInspector.Breakpoint.addEventListener(WebInspector.Breakpoint.Event.AutoContinueDidChange, this._updateBreakpointStatus, this);
         WebInspector.Breakpoint.addEventListener(WebInspector.Breakpoint.Event.ResolvedStateDidChange, this._updateBreakpointStatus, this);
         WebInspector.Breakpoint.addEventListener(WebInspector.Breakpoint.Event.LocationDidChange, this._updateBreakpointLocation, this);
 
@@ -112,6 +113,7 @@
     {
         if (this._supportsDebugging) {
             WebInspector.Breakpoint.removeEventListener(WebInspector.Breakpoint.Event.DisabledStateDidChange, this._updateBreakpointStatus, this);
+            WebInspector.Breakpoint.removeEventListener(WebInspector.Breakpoint.Event.AutoContinueDidChange, this._updateBreakpointStatus, this);
             WebInspector.Breakpoint.removeEventListener(WebInspector.Breakpoint.Event.ResolvedStateDidChange, this._updateBreakpointStatus, this);
             WebInspector.Breakpoint.removeEventListener(WebInspector.Breakpoint.Event.LocationDidChange, this._updateBreakpointLocation, this);
 
@@ -710,7 +712,7 @@
 
     _breakpointInfoForBreakpoint: function(breakpoint)
     {
-        return {resolved: breakpoint.resolved, disabled: breakpoint.disabled};
+        return {resolved: breakpoint.resolved, disabled: breakpoint.disabled, autoContinue: breakpoint.autoContinue};
     },
 
     get _supportsDebugging()
@@ -908,7 +910,7 @@
             this.updateBreakpointLineAndColumn(newLineInfo.lineNumber, newLineInfo.columnNumber, accurateNewLineInfo.lineNumber, accurateNewLineInfo.columnNumber);
     },
 
-    textEditorBreakpointToggled: function(textEditor, lineNumber, columnNumber, disabled)
+    textEditorBreakpointClicked: function(textEditor, lineNumber, columnNumber)
     {
         console.assert(this._supportsDebugging);
         if (!this._supportsDebugging)
@@ -919,7 +921,7 @@
         if (!breakpoint)
             return;
 
-        breakpoint.disabled = disabled;
+        breakpoint.cycleToNextMode();
     },
 
     textEditorUpdatedFormatting: function(textEditor)

Modified: trunk/Source/WebInspectorUI/UserInterface/TextEditor.css (161686 => 161687)


--- trunk/Source/WebInspectorUI/UserInterface/TextEditor.css	2014-01-10 23:47:12 UTC (rev 161686)
+++ trunk/Source/WebInspectorUI/UserInterface/TextEditor.css	2014-01-10 23:48:54 UTC (rev 161687)
@@ -66,6 +66,10 @@
     border-image-source: -webkit-image-set(url(Images/Breakpoint.png) 1x, url(Images/[email protected]) 2x);
 }
 
+.text-editor > .CodeMirror .breakpoint-auto-continue:not(.breakpoint-disabled) .CodeMirror-linenumber::before {
+    opacity: 0.6;
+}
+
 .text-editor > .CodeMirror .breakpoint-disabled .CodeMirror-linenumber::before {
     opacity: 0.35;
 }

Modified: trunk/Source/WebInspectorUI/UserInterface/TextEditor.js (161686 => 161687)


--- trunk/Source/WebInspectorUI/UserInterface/TextEditor.js	2014-01-10 23:47:12 UTC (rev 161686)
+++ trunk/Source/WebInspectorUI/UserInterface/TextEditor.js	2014-01-10 23:48:54 UTC (rev 161687)
@@ -76,6 +76,7 @@
 WebInspector.TextEditor.SearchResultStyleClassName = "search-result";
 WebInspector.TextEditor.HasBreakpointStyleClassName = "has-breakpoint";
 WebInspector.TextEditor.BreakpointResolvedStyleClassName = "breakpoint-resolved";
+WebInspector.TextEditor.BreakpointAutoContinueStyleClassName = "breakpoint-auto-continue";
 WebInspector.TextEditor.BreakpointDisabledStyleClassName = "breakpoint-disabled";
 WebInspector.TextEditor.MultipleBreakpointsStyleClassName = "multiple-breakpoints";
 WebInspector.TextEditor.ExecutionLineStyleClassName = "execution-line";
@@ -906,6 +907,7 @@
 
         var allDisabled = true;
         var allResolved = true;
+        var allAutoContinue = true;
         var multiple = Object.keys(columnBreakpoints).length > 1;
         for (var columnNumber in columnBreakpoints) {
             var breakpointInfo = columnBreakpoints[columnNumber];
@@ -913,6 +915,8 @@
                 allDisabled = false;
             if (!breakpointInfo.resolved)
                 allResolved = false;
+            if (!breakpointInfo.autoContinue)
+                allAutoContinue = false;
         }
 
         function updateStyles()
@@ -935,6 +939,11 @@
             else
                 this._codeMirror.removeLineClass(lineHandle, "wrap", WebInspector.TextEditor.BreakpointDisabledStyleClassName);
 
+            if (allAutoContinue)
+                this._codeMirror.addLineClass(lineHandle, "wrap", WebInspector.TextEditor.BreakpointAutoContinueStyleClassName);
+            else
+                this._codeMirror.removeLineClass(lineHandle, "wrap", WebInspector.TextEditor.BreakpointAutoContinueStyleClassName);
+
             if (multiple)
                 this._codeMirror.addLineClass(lineHandle, "wrap", WebInspector.TextEditor.MultipleBreakpointsStyleClassName);
             else
@@ -975,6 +984,7 @@
             this._codeMirror.removeLineClass(lineHandle, "wrap", WebInspector.TextEditor.HasBreakpointStyleClassName);
             this._codeMirror.removeLineClass(lineHandle, "wrap", WebInspector.TextEditor.BreakpointResolvedStyleClassName);
             this._codeMirror.removeLineClass(lineHandle, "wrap", WebInspector.TextEditor.BreakpointDisabledStyleClassName);
+            this._codeMirror.removeLineClass(lineHandle, "wrap", WebInspector.TextEditor.BreakpointAutoContinueStyleClassName);
             this._codeMirror.removeLineClass(lineHandle, "wrap", WebInspector.TextEditor.MultipleBreakpointsStyleClassName);
         }
 
@@ -1116,7 +1126,7 @@
         document.removeEventListener("mousemove", this._documentMouseMovedEventListener, true);
         document.removeEventListener("mouseup", this._documentMouseUpEventListener, true);
 
-        const delegateImplementsBreakpointToggled = this._delegate && typeof this._delegate.textEditorBreakpointToggled === "function";
+        const delegateImplementsBreakpointClicked = this._delegate && typeof this._delegate.textEditorBreakpointClicked === "function";
         const delegateImplementsBreakpointRemoved = this._delegate && typeof this._delegate.textEditorBreakpointRemoved === "function";
         const delegateImplementsBreakpointMoved = this._delegate && typeof this._delegate.textEditorBreakpointMoved === "function";
 
@@ -1152,11 +1162,8 @@
             // Toggle the disabled state of the breakpoint.
             console.assert(this._lineNumberWithMousedDownBreakpoint in this._breakpoints);
             console.assert(this._columnNumberWithMousedDownBreakpoint in this._breakpoints[this._lineNumberWithMousedDownBreakpoint]);
-            if (this._lineNumberWithMousedDownBreakpoint in this._breakpoints && this._columnNumberWithMousedDownBreakpoint in this._breakpoints[this._lineNumberWithMousedDownBreakpoint] && delegateImplementsBreakpointToggled) {
-                var disabled = this._codeMirror.toggleLineClass(this._lineNumberWithMousedDownBreakpoint, "wrap", WebInspector.TextEditor.BreakpointDisabledStyleClassName);
-                this._breakpoints[this._lineNumberWithMousedDownBreakpoint][this._columnNumberWithMousedDownBreakpoint].disabled = disabled;
-                this._delegate.textEditorBreakpointToggled(this, this._lineNumberWithMousedDownBreakpoint, this._columnNumberWithMousedDownBreakpoint, disabled);
-            }
+            if (this._lineNumberWithMousedDownBreakpoint in this._breakpoints && this._columnNumberWithMousedDownBreakpoint in this._breakpoints[this._lineNumberWithMousedDownBreakpoint] && delegateImplementsBreakpointClicked)
+                this._delegate.textEditorBreakpointClicked(this, this._lineNumberWithMousedDownBreakpoint, this._columnNumberWithMousedDownBreakpoint);
         }
 
         delete this._documentMouseMovedEventListener;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to