Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Unified Diff: third_party/WebKit/Source/devtools/front_end/source_frame/SourcesTextEditor.js

Issue 2849973003: DevTools: remove continue to location from behind experiment. (Closed)
Patch Set: same? Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/source_frame/SourcesTextEditor.js
diff --git a/third_party/WebKit/Source/devtools/front_end/source_frame/SourcesTextEditor.js b/third_party/WebKit/Source/devtools/front_end/source_frame/SourcesTextEditor.js
index acb4c94269234ca641356e1ec9b74465d387990a..9777b4cba1e9d32d79f48b80ad99517623a191d8 100644
--- a/third_party/WebKit/Source/devtools/front_end/source_frame/SourcesTextEditor.js
+++ b/third_party/WebKit/Source/devtools/front_end/source_frame/SourcesTextEditor.js
@@ -215,17 +215,37 @@ SourceFrame.SourcesTextEditor = class extends TextEditor.CodeMirrorTextEditor {
if (!this._executionLine)
return;
- this.codeMirror().addLineClass(this._executionLine, 'wrap', 'cm-execution-line');
+ this.showExecutionLineBackground();
+ this.codeMirror().addLineClass(this._executionLine, 'wrap', 'cm-execution-line-outline');
+ var token = this.tokenAtTextPosition(lineNumber, columnNumber);
+ var endColumn;
+ if (token && token.type)
+ endColumn = token.endColumn;
+ else
+ endColumn = this.codeMirror().getLine(lineNumber).length;
+
+
this._executionLineTailMarker = this.codeMirror().markText(
- {line: lineNumber, ch: columnNumber}, {line: lineNumber, ch: this.codeMirror().getLine(lineNumber).length},
- {className: 'cm-execution-line-tail'});
+ {line: lineNumber, ch: columnNumber}, {line: lineNumber, ch: endColumn}, {className: 'cm-execution-line-tail'});
}
- clearExecutionLine() {
- this.clearPositionHighlight();
+ showExecutionLineBackground() {
+ if (this._executionLine)
+ this.codeMirror().addLineClass(this._executionLine, 'wrap', 'cm-execution-line');
+ }
+ hideExecutionLineBackground() {
if (this._executionLine)
this.codeMirror().removeLineClass(this._executionLine, 'wrap', 'cm-execution-line');
+ }
+
+ clearExecutionLine() {
+ this.clearPositionHighlight();
+
+ if (this._executionLine) {
+ this.hideExecutionLineBackground();
+ this.codeMirror().removeLineClass(this._executionLine, 'wrap', 'cm-execution-line-outline');
+ }
delete this._executionLine;
if (this._executionLineTailMarker)

Powered by Google App Engine
This is Rietveld 408576698