Web Inspector: Revealed line not highlighted in TextEditor while debugger paused
authormattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Oct 2016 17:23:07 +0000 (17:23 +0000)
committermattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Oct 2016 17:23:07 +0000 (17:23 +0000)
https://bugs.webkit.org/show_bug.cgi?id=163197

Reviewed by Timothy Hatcher.

* UserInterface/Views/TextEditor.js:
(WebInspector.TextEditor.prototype.revealPosition.revealAndHighlightLine):
Avoid highlighting the execution line while debugging, but allow
other lines to be highlighted.

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

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/TextEditor.js

index 9f0a822..9899231 100644 (file)
@@ -1,3 +1,15 @@
+2016-10-10  Matt Baker  <mattbaker@apple.com>
+
+        Web Inspector: Revealed line not highlighted in TextEditor while debugger paused
+        https://bugs.webkit.org/show_bug.cgi?id=163197
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Views/TextEditor.js:
+        (WebInspector.TextEditor.prototype.revealPosition.revealAndHighlightLine):
+        Avoid highlighting the execution line while debugging, but allow
+        other lines to be highlighted.
+
 2016-10-06  Devin Rousso  <dcrousso+webkit@gmail.com>
 
         Inspector exception in `parseTextForRule()` when pasting into CSS rule selector
index 185c359..9b0464a 100644 (file)
@@ -497,9 +497,8 @@ WebInspector.TextEditor = class TextEditor extends WebInspector.View
             if (noHighlight)
                 return;
 
-            // Don't show blue line highlight when debugging.
-            // FIXME: This could be better, we could avoid highlight only when switching for active call frames switches.
-            if (WebInspector.debuggerManager.paused)
+            // Avoid highlighting the execution line while debugging.
+            if (WebInspector.debuggerManager.paused && (!this._executionLineNumber || line === this._executionLineNumber))
                 return;
 
             this._codeMirror.addLineClass(lineHandle, "wrap", WebInspector.TextEditor.HighlightedStyleClassName);