| Index: Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js
|
| diff --git a/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js b/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js
|
| index b34e9ef98abc27f547ad7880d2b4285640b0c1cb..da3c3f7f290d9044aed0db9bb10bb538a45d0aae 100644
|
| --- a/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js
|
| +++ b/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js
|
| @@ -1070,6 +1070,8 @@ WebInspector.CodeMirrorTextEditor.prototype = {
|
| */
|
| toggleLineClass: function(lineNumber, className, toggled)
|
| {
|
| + if (this.hasLineClass(lineNumber, className) === toggled)
|
| + return;
|
| var lineHandle = this._codeMirror.getLineHandle(lineNumber);
|
| if (!lineHandle)
|
| return;
|
| @@ -1081,6 +1083,19 @@ WebInspector.CodeMirrorTextEditor.prototype = {
|
|
|
| /**
|
| * @param {number} lineNumber
|
| + * @param {string} className
|
| + * @return {boolean}
|
| + */
|
| + hasLineClass: function(lineNumber, className)
|
| + {
|
| + var lineInfo = this._codeMirror.lineInfo(lineNumber);
|
| + var wrapClass = lineInfo.wrapClass || "";
|
| + var classNames = wrapClass.split(" ");
|
| + return classNames.indexOf(className) !== -1
|
| + },
|
| +
|
| + /**
|
| + * @param {number} lineNumber
|
| * @param {!Element} element
|
| */
|
| addDecoration: function(lineNumber, element)
|
|
|