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

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

Issue 2435043003: DevTools: restore selection and scrollposition between network and filesystem (Closed)
Patch Set: add testcase Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @extends {WebInspector.CodeMirrorTextEditor} 7 * @extends {WebInspector.CodeMirrorTextEditor}
8 * @param {!WebInspector.SourcesTextEditorDelegate} delegate 8 * @param {!WebInspector.SourcesTextEditorDelegate} delegate
9 */ 9 */
10 WebInspector.SourcesTextEditor = function(delegate) 10 WebInspector.SourcesTextEditor = function(delegate)
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 WebInspector.SourcesTextEditor.prototype = { 61 WebInspector.SourcesTextEditor.prototype = {
62 /** 62 /**
63 * @return {boolean} 63 * @return {boolean}
64 */ 64 */
65 _isSearchActive: function() 65 _isSearchActive: function()
66 { 66 {
67 return !!this._tokenHighlighter.highlightedRegex(); 67 return !!this._tokenHighlighter.highlightedRegex();
68 }, 68 },
69 69
70 /** 70 /**
71 * @override
72 * @param {number} lineNumber
73 */
74 scrollToLine: function(lineNumber)
75 {
76 WebInspector.CodeMirrorTextEditor.prototype.scrollToLine.call(this, line Number);
77 this._scroll();
78 },
79
80 /**
71 * @param {!RegExp} regex 81 * @param {!RegExp} regex
72 * @param {?WebInspector.TextRange} range 82 * @param {?WebInspector.TextRange} range
73 */ 83 */
74 highlightSearchResults: function(regex, range) 84 highlightSearchResults: function(regex, range)
75 { 85 {
76 /** 86 /**
77 * @this {WebInspector.CodeMirrorTextEditor} 87 * @this {WebInspector.CodeMirrorTextEditor}
78 */ 88 */
79 function innerHighlightRegex() 89 function innerHighlightRegex()
80 { 90 {
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 this._codeMirror.addOverlay(overlayMode); 980 this._codeMirror.addOverlay(overlayMode);
971 this._highlightDescriptor = { 981 this._highlightDescriptor = {
972 overlay: overlayMode, 982 overlay: overlayMode,
973 selectionStart: selectionStart 983 selectionStart: selectionStart
974 }; 984 };
975 } 985 }
976 }; 986 };
977 987
978 WebInspector.SourcesTextEditor.LinesToScanForIndentationGuessing = 1000; 988 WebInspector.SourcesTextEditor.LinesToScanForIndentationGuessing = 1000;
979 WebInspector.SourcesTextEditor.MaximumNumberOfWhitespacesPerSingleSpan = 16; 989 WebInspector.SourcesTextEditor.MaximumNumberOfWhitespacesPerSingleSpan = 16;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698