diff options
Diffstat (limited to 'Source/WebCore/inspector/front-end/StyleSource.js')
-rw-r--r-- | Source/WebCore/inspector/front-end/StyleSource.js | 60 |
1 files changed, 4 insertions, 56 deletions
diff --git a/Source/WebCore/inspector/front-end/StyleSource.js b/Source/WebCore/inspector/front-end/StyleSource.js index 4d21f518a..9231a260d 100644 --- a/Source/WebCore/inspector/front-end/StyleSource.js +++ b/Source/WebCore/inspector/front-end/StyleSource.js @@ -29,65 +29,13 @@ /** * @constructor * @extends {WebInspector.UISourceCode} - * @param {WebInspector.Resource} resource + * @param {WebInspector.ContentProvider} contentProvider */ -WebInspector.StyleSource = function(resource) +WebInspector.StyleSource = function(contentProvider) { - WebInspector.UISourceCode.call(this, resource.url, resource, resource); + WebInspector.UISourceCode.call(this, contentProvider.contentURL(), contentProvider, true); } -WebInspector.StyleSource.updateTimeout = 200; - WebInspector.StyleSource.prototype = { - /** - * @return {boolean} - */ - isEditable: function() - { - return true; - }, - - /** - * @param {function(?string)} callback - */ - workingCopyCommitted: function(callback) - { - this._commitIncrementalEdit(true, callback); - }, - - workingCopyChanged: function() - { - this._callOrSetTimeout(this._commitIncrementalEdit.bind(this, false, function() {})); - }, - - /** - * @param {function(?string)} callback - */ - _callOrSetTimeout: function(callback) - { - // FIXME: Extensions tests override updateTimeout because extensions don't have any control over applying changes to domain specific bindings. - if (WebInspector.StyleSource.updateTimeout >= 0) - this._incrementalUpdateTimer = setTimeout(callback, WebInspector.StyleSource.updateTimeout); - else - callback(null); - }, - - /** - * @param {boolean} majorChange - * @param {function(?string)} callback - */ - _commitIncrementalEdit: function(majorChange, callback) - { - this._clearIncrementalUpdateTimer(); - WebInspector.cssModel.resourceBinding().setStyleContent(this, this.workingCopy(), majorChange, callback); - }, - - _clearIncrementalUpdateTimer: function() - { - if (this._incrementalUpdateTimer) - clearTimeout(this._incrementalUpdateTimer); - delete this._incrementalUpdateTimer; - } + __proto__: WebInspector.UISourceCode.prototype } - -WebInspector.StyleSource.prototype.__proto__ = WebInspector.UISourceCode.prototype; |