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

Unified Diff: Source/devtools/front_end/sdk/CSSStyleModel.js

Issue 1211323008: DevTools: [Regression] setting property text throws exceptions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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
« no previous file with comments | « LayoutTests/inspector/elements/styles-4/styles-formatting-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/sdk/CSSStyleModel.js
diff --git a/Source/devtools/front_end/sdk/CSSStyleModel.js b/Source/devtools/front_end/sdk/CSSStyleModel.js
index d1bf067504dcdea229afc57724777e20ec780ed9..309e7c3f4e0a817ea427a802ffb0da42000ba8f3 100644
--- a/Source/devtools/front_end/sdk/CSSStyleModel.js
+++ b/Source/devtools/front_end/sdk/CSSStyleModel.js
@@ -1329,6 +1329,7 @@ WebInspector.CSSProperty.prototype = {
}
var lastWasSemicolon = true;
+ var lastWasMeta = false;
var insideProperty = false;
/**
* @param {string} token
@@ -1361,11 +1362,13 @@ WebInspector.CSSProperty.prototype = {
if (isSemicolon)
insideProperty = false;
- if (tokenType === "css-tag") {
+ if (tokenType === "css-meta" || (tokenType === "css-tag" && !lastWasMeta)) {
result += "\n" + indentation;
insideProperty = true;
}
result += token;
+
+ lastWasMeta = tokenType === "css-meta";
}
},
« no previous file with comments | « LayoutTests/inspector/elements/styles-4/styles-formatting-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698