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

Unified Diff: WebCore/inspector/front-end/CSSStyleModel.js

Issue 5446003: Merge 72938 - 2010-11-30 Pavel Feldman <pfeldman@chromium.org>... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/597/
Patch Set: Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « WebCore/inspector/InspectorStyleSheet.cpp ('k') | WebCore/inspector/front-end/Resource.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: WebCore/inspector/front-end/CSSStyleModel.js
===================================================================
--- WebCore/inspector/front-end/CSSStyleModel.js (revision 73033)
+++ WebCore/inspector/front-end/CSSStyleModel.js (working copy)
@@ -164,9 +164,18 @@
{
var resource = WebInspector.resourceManager.resourceForURL(href);
if (resource && resource.type === WebInspector.Resource.Type.Stylesheet)
- resource.content = content;
+ resource.setContent(content, this._onRevert.bind(this, styleSheetId));
}
- InspectorBackend.getStyleSheetText2(styleSheetId, callback);
+ InspectorBackend.getStyleSheetText2(styleSheetId, callback.bind(this));
+ },
+
+ _onRevert: function(styleSheetId, contentToRevertTo)
+ {
+ function callback(success)
+ {
+ this._styleSheetChanged(styleSheetId, true);
+ }
+ InspectorBackend.setStyleSheetText2(styleSheetId, contentToRevertTo, callback.bind(this));
}
}
« no previous file with comments | « WebCore/inspector/InspectorStyleSheet.cpp ('k') | WebCore/inspector/front-end/Resource.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698