| Index: third_party/WebKit/Source/devtools/front_end/source_frame/SourceFrame.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/source_frame/SourceFrame.js b/third_party/WebKit/Source/devtools/front_end/source_frame/SourceFrame.js
|
| index b3b29bce1d166be1a896f6145ea635ca13221aa4..6525405b1551278167d85d7303050b3e6bb7385a 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/source_frame/SourceFrame.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/source_frame/SourceFrame.js
|
| @@ -33,6 +33,7 @@
|
| * @extends {WebInspector.SimpleView}
|
| * @implements {WebInspector.Searchable}
|
| * @implements {WebInspector.Replaceable}
|
| + * @implements {WebInspector.SourcesTextEditorDelegate}
|
| * @param {string} url
|
| * @param {function(): !Promise<?string>} lazyContent
|
| */
|
| @@ -43,9 +44,7 @@ WebInspector.SourceFrame = function(url, lazyContent)
|
| this._url = url;
|
| this._lazyContent = lazyContent;
|
|
|
| - var textEditorDelegate = new WebInspector.TextEditorDelegateForSourceFrame(this);
|
| -
|
| - this._textEditor = new WebInspector.CodeMirrorTextEditor(this._url, textEditorDelegate);
|
| + this._textEditor = new WebInspector.SourcesTextEditor(this);
|
|
|
| this._currentSearchResultIndex = -1;
|
| this._searchResults = [];
|
| @@ -79,6 +78,9 @@ WebInspector.SourceFrame.prototype = {
|
| this._shortcuts[key] = handler;
|
| },
|
|
|
| + /**
|
| + * @override
|
| + */
|
| wasShown: function()
|
| {
|
| this._ensureContentLoaded();
|
| @@ -223,6 +225,7 @@ WebInspector.SourceFrame.prototype = {
|
| },
|
|
|
| /**
|
| + * @override
|
| * @param {!WebInspector.TextRange} oldRange
|
| * @param {!WebInspector.TextRange} newRange
|
| */
|
| @@ -353,7 +356,10 @@ WebInspector.SourceFrame.prototype = {
|
| this._ensureContentLoaded();
|
| },
|
|
|
| - _editorFocused: function()
|
| + /**
|
| + * @override
|
| + */
|
| + editorFocused: function()
|
| {
|
| this._resetCurrentSearchResultIndex();
|
| },
|
| @@ -552,6 +558,7 @@ WebInspector.SourceFrame.prototype = {
|
| },
|
|
|
| /**
|
| + * @override
|
| * @return {!Promise}
|
| */
|
| populateLineGutterContextMenu: function(contextMenu, lineNumber)
|
| @@ -560,6 +567,7 @@ WebInspector.SourceFrame.prototype = {
|
| },
|
|
|
| /**
|
| + * @override
|
| * @return {!Promise}
|
| */
|
| populateTextAreaContextMenu: function(contextMenu, lineNumber, columnNumber)
|
| @@ -568,6 +576,7 @@ WebInspector.SourceFrame.prototype = {
|
| },
|
|
|
| /**
|
| + * @override
|
| * @param {?WebInspector.TextRange} from
|
| * @param {?WebInspector.TextRange} to
|
| */
|
| @@ -588,6 +597,7 @@ WebInspector.SourceFrame.prototype = {
|
| },
|
|
|
| /**
|
| + * @override
|
| * @param {!WebInspector.TextRange} textRange
|
| */
|
| selectionChanged: function(textRange)
|
| @@ -621,6 +631,7 @@ WebInspector.SourceFrame.prototype = {
|
| },
|
|
|
| /**
|
| + * @override
|
| * @param {number} lineNumber
|
| */
|
| scrollChanged: function(lineNumber)
|
| @@ -640,83 +651,3 @@ WebInspector.SourceFrame.prototype = {
|
|
|
| __proto__: WebInspector.SimpleView.prototype
|
| }
|
| -
|
| -/**
|
| - * @implements {WebInspector.TextEditorDelegate}
|
| - * @constructor
|
| - */
|
| -WebInspector.TextEditorDelegateForSourceFrame = function(sourceFrame)
|
| -{
|
| - this._sourceFrame = sourceFrame;
|
| -}
|
| -
|
| -WebInspector.TextEditorDelegateForSourceFrame.prototype = {
|
| - /**
|
| - * @override
|
| - * @param {!WebInspector.TextRange} oldRange
|
| - * @param {!WebInspector.TextRange} newRange
|
| - */
|
| - onTextChanged: function(oldRange, newRange)
|
| - {
|
| - this._sourceFrame.onTextChanged(oldRange, newRange);
|
| - },
|
| -
|
| - /**
|
| - * @override
|
| - * @param {!WebInspector.TextRange} textRange
|
| - */
|
| - selectionChanged: function(textRange)
|
| - {
|
| - this._sourceFrame.selectionChanged(textRange);
|
| - },
|
| -
|
| - /**
|
| - * @override
|
| - * @param {number} lineNumber
|
| - */
|
| - scrollChanged: function(lineNumber)
|
| - {
|
| - this._sourceFrame.scrollChanged(lineNumber);
|
| - },
|
| -
|
| - /**
|
| - * @override
|
| - */
|
| - editorFocused: function()
|
| - {
|
| - this._sourceFrame._editorFocused();
|
| - },
|
| -
|
| - /**
|
| - * @override
|
| - * @param {!WebInspector.ContextMenu} contextMenu
|
| - * @param {number} lineNumber
|
| - * @return {!Promise}
|
| - */
|
| - populateLineGutterContextMenu: function(contextMenu, lineNumber)
|
| - {
|
| - return this._sourceFrame.populateLineGutterContextMenu(contextMenu, lineNumber);
|
| - },
|
| -
|
| - /**
|
| - * @override
|
| - * @param {!WebInspector.ContextMenu} contextMenu
|
| - * @param {number} lineNumber
|
| - * @param {number} columnNumber
|
| - * @return {!Promise}
|
| - */
|
| - populateTextAreaContextMenu: function(contextMenu, lineNumber, columnNumber)
|
| - {
|
| - return this._sourceFrame.populateTextAreaContextMenu(contextMenu, lineNumber, columnNumber);
|
| - },
|
| -
|
| - /**
|
| - * @override
|
| - * @param {?WebInspector.TextRange} from
|
| - * @param {?WebInspector.TextRange} to
|
| - */
|
| - onJumpToPosition: function(from, to)
|
| - {
|
| - this._sourceFrame.onJumpToPosition(from, to);
|
| - }
|
| -}
|
|
|