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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sdk/CSSProperty.js

Issue 1809533003: DevTools: remove illusionary caching from String.prototype.lineEndings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 9 months 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
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))

Powered by Google App Engine
This is Rietveld 408576698