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

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

Issue 2173913002: DevTools: Optimize source color picker to analyze changed lines (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@escSpectrum
Patch Set: Cap columns to speed up loading of minified style sheets Created 4 years, 5 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/CodeMirrorTextEditor.js
diff --git a/third_party/WebKit/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js b/third_party/WebKit/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js
index dd724d144d47dfd06fc022f8f70916bc8847cb46..32b9870fbbeb742a6cf329d51d0d469ddfa28966 100644
--- a/third_party/WebKit/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js
+++ b/third_party/WebKit/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js
@@ -1019,6 +1019,17 @@ WebInspector.CodeMirrorTextEditor.prototype = {
},
/**
+ * @param {!WebInspector.TextRange} range
+ * @return {!Array.<!CodeMirror.TextMarker>}
+ */
+ bookmarks: function(range)
+ {
+ var pos = WebInspector.CodeMirrorUtils.toPos(range);
+ var markers = this._codeMirror.findMarks(pos.start, pos.end);
+ return markers.filter(marker => marker.type === "bookmark");
+ },
+
+ /**
* @override
* @return {!Element}
*/

Powered by Google App Engine
This is Rietveld 408576698