Index: third_party/WebKit/Source/devtools/front_end/sdk/CSSProperty.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/CSSProperty.js b/third_party/WebKit/Source/devtools/front_end/sdk/CSSProperty.js |
index 47ba177373bdad9ee893d742fe97ee7ca19cba45..45b37c0e81c0c919b36e2c039ebe79cf8a909aa4 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/sdk/CSSProperty.js |
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/CSSProperty.js |
@@ -115,7 +115,8 @@ WebInspector.CSSProperty.prototype = { |
var range = this.range.relativeTo(this.ownerStyle.range.startLine, this.ownerStyle.range.startColumn); |
var indentation = this.ownerStyle.cssText ? this._detectIndentation(this.ownerStyle.cssText) : WebInspector.moduleSetting("textEditorIndent").get(); |
var endIndentation = this.ownerStyle.cssText ? indentation.substring(0, this.ownerStyle.range.endColumn) : ""; |
- var newStyleText = range.replaceInText(this.ownerStyle.cssText || "", String.sprintf(";%s;", propertyText)); |
+ var text = new WebInspector.Text(this.ownerStyle.cssText || ""); |
+ var newStyleText = text.replaceRange(range, String.sprintf(";%s;", propertyText)); |
return self.runtime.instancePromise(WebInspector.TokenizerFactory) |
.then(this._formatStyle.bind(this, newStyleText, indentation, endIndentation)) |