Index: Source/devtools/front_end/StylesSidebarPane.js |
diff --git a/Source/devtools/front_end/StylesSidebarPane.js b/Source/devtools/front_end/StylesSidebarPane.js |
index 2db819ef25f0a260be4b232a5c10eff028d4dc76..247eb6a7033b9fe41fb048441a8ccff0e8565fc1 100644 |
--- a/Source/devtools/front_end/StylesSidebarPane.js |
+++ b/Source/devtools/front_end/StylesSidebarPane.js |
@@ -1697,7 +1697,21 @@ WebInspector.BlankStylePropertiesSection.prototype = { |
if (newContent) |
newContent = newContent.trim(); |
this._parentPane._userOperation = true; |
- WebInspector.cssModel.addRule(this.pane.node.id, newContent, successCallback.bind(this), this.editingSelectorCancelled.bind(this)); |
+ |
+ WebInspector.cssModel.requestViaInspectorStylesheet(this.pane.node, viaInspectorCallback.bind(this)); |
+ |
+ /** |
+ * @this {WebInspector.BlankStylePropertiesSection} |
+ * @param {?WebInspector.CSSStyleSheetHeader} styleSheetHeader |
+ */ |
+ function viaInspectorCallback(styleSheetHeader) |
+ { |
+ if (!styleSheetHeader) { |
+ this.editingSelectorCancelled(); |
+ return; |
+ } |
+ WebInspector.cssModel.addRule(styleSheetHeader.id, this.pane.node, newContent, successCallback.bind(this), this.editingSelectorCancelled.bind(this)); |
+ } |
}, |
editingSelectorCancelled: function() |