| 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 57fe30a934b249384b01aab8259953bab35cf143..0a75cb7ed41c56c956da30d8e3cc3827c56af974 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
|
| @@ -49,7 +49,6 @@ WebInspector.SourceFrame = function(url, lazyContent)
|
| this._currentSearchResultIndex = -1;
|
| this._searchResults = [];
|
|
|
| - this._textEditor.setReadOnly(!this.canEditSource());
|
| this._textEditor.addEventListener(WebInspector.SourcesTextEditor.Events.EditorFocused, this._resetCurrentSearchResultIndex, this);
|
| this._textEditor.addEventListener(WebInspector.SourcesTextEditor.Events.SelectionChanged, this._updateSourcePosition, this);
|
| this._textEditor.addEventListener(WebInspector.SourcesTextEditor.Events.TextChanged, event => this.onTextChanged(event.data.oldRange, event.data.newRange));
|
| @@ -63,10 +62,20 @@ WebInspector.SourceFrame = function(url, lazyContent)
|
| * @type {?WebInspector.SearchableView}
|
| */
|
| this._searchableView = null;
|
| + this._editable = false;
|
| };
|
|
|
| WebInspector.SourceFrame.prototype = {
|
| /**
|
| + * @param {boolean} editable
|
| + */
|
| + setEditable: function(editable)
|
| + {
|
| + this._editable = editable;
|
| + this._textEditor.setReadOnly(editable);
|
| + },
|
| +
|
| + /**
|
| * @param {number} key
|
| * @param {function():boolean} handler
|
| */
|
| @@ -568,7 +577,7 @@ WebInspector.SourceFrame.prototype = {
|
| */
|
| canEditSource: function()
|
| {
|
| - return false;
|
| + return this._editable;
|
| },
|
|
|
| _updateSourcePosition: function()
|
|
|