Web Inspector: cycle clicked breakpoints between enabled, auto-continue, and disabled
authorbburg@apple.com <bburg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Jan 2014 23:48:54 +0000 (23:48 +0000)
committerbburg@apple.com <bburg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Jan 2014 23:48:54 +0000 (23:48 +0000)
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):

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

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Breakpoint.js
Source/WebInspectorUI/UserInterface/BreakpointTreeElement.css
Source/WebInspectorUI/UserInterface/BreakpointTreeElement.js
Source/WebInspectorUI/UserInterface/SourceCodeTextEditor.js
Source/WebInspectorUI/UserInterface/TextEditor.css
Source/WebInspectorUI/UserInterface/TextEditor.js

index cab2ba2..733c2f5 100644 (file)
@@ -1,3 +1,60 @@
+2014-01-10  Brian Burg  <bburg@apple.com>
+
+        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  <timothy@apple.com>
 
         Clean up some areas of TreeOutline.
index a2a0819..29073d9 100644 (file)
@@ -66,6 +66,7 @@ WebInspector.Breakpoint.PopoverClassName = "edit-breakpoint-popover-content";
 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 @@ WebInspector.Breakpoint.prototype = {
         };
     },
 
+    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 @@ WebInspector.Breakpoint.prototype = {
             this.disabled = !this.disabled;
         }
 
+        function toggleAutoContinue()
+        {
+            this.autoContinue = !this.autoContinue;
+        }
+
         function revealOriginalSourceCodeLocation()
         {
             WebInspector.resourceSidebarPanel.showOriginalOrFormattedSourceCodeLocation(this._sourceCodeLocation);
@@ -231,10 +259,16 @@ WebInspector.Breakpoint.prototype = {
         if (WebInspector.debuggerManager.isBreakpointEditable(this))
             contextMenu.appendItem(WebInspector.UIString("Edit Breakpoint…"), editBreakpoint.bind(this));
 
-        if (this._disabled)
-            contextMenu.appendItem(WebInspector.UIString("Enable Breakpoint"), toggleBreakpoint.bind(this));
-        else
+        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));
+
+        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();
@@ -292,6 +326,9 @@ WebInspector.Breakpoint.prototype = {
 
         this._actions.splice(index, 1);
 
+        if (!this._actions.length)
+            this.autoContinue = false;
+
         this.dispatchEventToListeners(WebInspector.Breakpoint.Event.ActionsDidChange);
     },
 
@@ -396,11 +433,13 @@ WebInspector.Breakpoint.prototype = {
                 }
             }
 
-            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 @@ WebInspector.Breakpoint.prototype = {
         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 @@ WebInspector.Breakpoint.prototype = {
         }
 
         this._popoverActionsInsertBreakpointActionView(newBreakpointActionView, index);
+        this._popoverOptionsRowElement.classList.remove(WebInspector.Breakpoint.HiddenStyleClassName);
 
         this._popover.update();
     },
@@ -471,8 +511,11 @@ WebInspector.Breakpoint.prototype = {
     {
         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 @@ WebInspector.Breakpoint.prototype = {
     {
         console.assert(this._popover === popover);
         delete this._popoverContentElement;
+        delete this._popoverOptionsRowElement;
+        delete this._popoverOptionsCheckboxElement;
         delete this._actionsContainer;
         delete this._popover;
     },
index b5591f2..8e282e7 100644 (file)
     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 {
index adedcad..da39cdb 100644 (file)
@@ -37,6 +37,7 @@ WebInspector.BreakpointTreeElement = function(breakpoint, className, title)
     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.GenericLineIconStyleClassName = "breakpoint-g
 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 @@ WebInspector.BreakpointTreeElement.prototype = {
 
     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 @@ WebInspector.BreakpointTreeElement.prototype = {
         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 @@ WebInspector.BreakpointTreeElement.prototype = {
         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 @@ WebInspector.BreakpointTreeElement.prototype = {
 
     _statusImageElementClicked: function(event)
     {
-        this._breakpoint.disabled = !this._breakpoint.disabled;
+        this._breakpoint.cycleToNextMode();
     }
 };
 
index aeafd3d..7cb354b 100644 (file)
@@ -43,6 +43,7 @@ WebInspector.SourceCodeTextEditor = function(sourceCode)
 
     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 @@ WebInspector.SourceCodeTextEditor.prototype = {
     {
         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 @@ WebInspector.SourceCodeTextEditor.prototype = {
 
     _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 @@ WebInspector.SourceCodeTextEditor.prototype = {
             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 @@ WebInspector.SourceCodeTextEditor.prototype = {
         if (!breakpoint)
             return;
 
-        breakpoint.disabled = disabled;
+        breakpoint.cycleToNextMode();
     },
 
     textEditorUpdatedFormatting: function(textEditor)
index c9dfbb4..a65aea3 100644 (file)
     border-image-source: -webkit-image-set(url(Images/Breakpoint.png) 1x, url(Images/Breakpoint@2x.png) 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;
 }
index 8c0a5a8..0e92eb1 100644 (file)
@@ -76,6 +76,7 @@ WebInspector.TextEditor.HighlightedStyleClassName = "highlighted";
 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 @@ WebInspector.TextEditor.prototype = {
 
         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 @@ WebInspector.TextEditor.prototype = {
                 allDisabled = false;
             if (!breakpointInfo.resolved)
                 allResolved = false;
+            if (!breakpointInfo.autoContinue)
+                allAutoContinue = false;
         }
 
         function updateStyles()
@@ -935,6 +939,11 @@ WebInspector.TextEditor.prototype = {
             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 @@ WebInspector.TextEditor.prototype = {
             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 @@ WebInspector.TextEditor.prototype = {
         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 @@ WebInspector.TextEditor.prototype = {
             // 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;