Web Inspector: StyleSource should set content using CSSStyleModelResourceBinding...
authorvsevik@chromium.org <vsevik@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Jul 2012 12:13:19 +0000 (12:13 +0000)
committervsevik@chromium.org <vsevik@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Jul 2012 12:13:19 +0000 (12:13 +0000)
commitc4b84bbb9b17439ff87334970b1391a821f39c06
tree933288902a7a64a38f3d87fdce588a133a357cec
parentf5c8f0b260930deb3faeb461c9d6a96deec21260
Web Inspector: StyleSource should set content using CSSStyleModelResourceBinding directly.
https://bugs.webkit.org/show_bug.cgi?id=89891

Reviewed by Pavel Feldman.

StyleSource now calls CSS resource binding directly.
CSS resource binding now adds resource revision only after setStyleSheetText call returns from backend.
Resource.revertAndClearHistory is now clearing history asynchronously
since Resource.setContent adds revision that should be removed as well.

* inspector/front-end/CSSStyleModel.js:
(WebInspector.CSSStyleModel.prototype.getViaInspectorResourceForRule):
(WebInspector.CSSStyleModel.prototype.resourceBinding):
(WebInspector.CSSStyleModelResourceBinding.prototype.setStyleContent.innerCallback):
(WebInspector.CSSStyleModelResourceBinding.prototype.setStyleContent):
(WebInspector.CSSStyleModelResourceBinding.prototype.setContent):
* inspector/front-end/Resource.js:
(WebInspector.Resource.prototype.revertAndClearHistory):
(WebInspector.Resource.prototype.revertAndClearHistory.clearHistory):
* inspector/front-end/RevisionHistoryView.js:
(WebInspector.RevisionHistoryView.prototype._createResourceItem):
* inspector/front-end/StylesPanel.js:
(WebInspector.StyleSource.prototype.workingCopyCommitted):
(WebInspector.StyleSource.prototype.workingCopyChanged):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121672 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/CSSStyleModel.js
Source/WebCore/inspector/front-end/Resource.js
Source/WebCore/inspector/front-end/RevisionHistoryView.js
Source/WebCore/inspector/front-end/StylesPanel.js