Title: [125650] trunk/Source/WebCore
Revision
125650
Author
commit-qu...@webkit.org
Date
2012-08-14 23:25:36 -0700 (Tue, 14 Aug 2012)

Log Message

Web Inspector: CodeMirrorTextEditor doesn't clear execution line
https://bugs.webkit.org/show_bug.cgi?id=94069

Patch by Jan Keromnes <j...@linux.com> on 2012-08-14
Reviewed by Pavel Feldman.

Make CodeMirrorTextEditor use line handles instead of numbers, remove
typeof == "number" checks.

* inspector/front-end/CodeMirrorTextEditor.js:
(WebInspector.CodeMirrorTextEditor.prototype.clearExecutionLine):
(WebInspector.CodeMirrorTextEditor.prototype.highlightLine):
(WebInspector.CodeMirrorTextEditor.prototype.clearLineHighlight):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (125649 => 125650)


--- trunk/Source/WebCore/ChangeLog	2012-08-15 05:53:18 UTC (rev 125649)
+++ trunk/Source/WebCore/ChangeLog	2012-08-15 06:25:36 UTC (rev 125650)
@@ -1,3 +1,18 @@
+2012-08-14  Jan Keromnes  <j...@linux.com>
+
+        Web Inspector: CodeMirrorTextEditor doesn't clear execution line
+        https://bugs.webkit.org/show_bug.cgi?id=94069
+
+        Reviewed by Pavel Feldman.
+
+        Make CodeMirrorTextEditor use line handles instead of numbers, remove
+        typeof == "number" checks.
+
+        * inspector/front-end/CodeMirrorTextEditor.js:
+        (WebInspector.CodeMirrorTextEditor.prototype.clearExecutionLine):
+        (WebInspector.CodeMirrorTextEditor.prototype.highlightLine):
+        (WebInspector.CodeMirrorTextEditor.prototype.clearLineHighlight):
+
 2012-08-14  Yuta Kitamura  <yu...@google.com>
 
         Unreviewed. Fix Chromium-Android builds.

Modified: trunk/Source/WebCore/inspector/front-end/CodeMirrorTextEditor.js (125649 => 125650)


--- trunk/Source/WebCore/inspector/front-end/CodeMirrorTextEditor.js	2012-08-15 05:53:18 UTC (rev 125649)
+++ trunk/Source/WebCore/inspector/front-end/CodeMirrorTextEditor.js	2012-08-15 06:25:36 UTC (rev 125650)
@@ -150,7 +150,7 @@
 
     clearExecutionLine: function()
     {
-        if (typeof this._executionLine == "number")
+        if (this._executionLine)
             this._codeMirror.setLineClass(this._executionLine, null, null);
         delete this._executionLine;
     },
@@ -188,8 +188,8 @@
     highlightLine: function(lineNumber)
     {
         this.clearLineHighlight();
-        this._codeMirror.setLineClass(lineNumber, null, "cm-highlight");
-        this._highlightedLine = lineNumber;
+        this._highlightedLine = this._codeMirror.getLineHandle(lineNumber);
+        this._codeMirror.setLineClass(this._highlightedLine, null, "cm-highlight");
         this._clearHighlightTimeout = setTimeout(this.clearLineHighlight.bind(this), 2000);
     },
 
@@ -199,7 +199,7 @@
             clearTimeout(this._clearHighlightTimeout);
         delete this._clearHighlightTimeout;
 
-        if (typeof this._highlightedLine == "number")
+        if (this._highlightedLine)
             this._codeMirror.setLineClass(this._highlightedLine, null, null);
         delete this._highlightedLine;
     },
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to