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

Unified Diff: third_party/WebKit/Source/devtools/front_end/script_formatter_worker/ScriptFormatterWorker.js

Issue 1515733002: DevTools: [SASS] implement CSS AST-builder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sass-module
Patch Set: rebaseline test Created 5 years 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/script_formatter_worker/ScriptFormatterWorker.js
diff --git a/third_party/WebKit/Source/devtools/front_end/script_formatter_worker/ScriptFormatterWorker.js b/third_party/WebKit/Source/devtools/front_end/script_formatter_worker/ScriptFormatterWorker.js
index e0921ba7a4476cd2a09ac4f4710bda51ec514fc7..9af72ef5feda2412d7ab8d5c82b8e070f9e9f80a 100644
--- a/third_party/WebKit/Source/devtools/front_end/script_formatter_worker/ScriptFormatterWorker.js
+++ b/third_party/WebKit/Source/devtools/front_end/script_formatter_worker/ScriptFormatterWorker.js
@@ -286,7 +286,7 @@ FormatterWorker._innerParseCSS = function(text, chunkCallback)
break;
case FormatterWorker.CSSParserStates.PropertyName:
if (tokenValue === ":" && tokenType === UndefTokenType) {
- property.name = property.name.trim();
+ property.name = property.name;
property.nameRange.endLine = lineNumber;
property.nameRange.endColumn = column;
property.valueRange = createRange(lineNumber, newColumn);
@@ -297,7 +297,7 @@ FormatterWorker._innerParseCSS = function(text, chunkCallback)
break;
case FormatterWorker.CSSParserStates.PropertyValue:
if ((tokenValue === ";" || tokenValue === "}") && tokenType === UndefTokenType) {
- property.value = property.value.trim();
+ property.value = property.value;
property.valueRange.endLine = lineNumber;
property.valueRange.endColumn = column;
property.range.endLine = lineNumber;
@@ -328,6 +328,7 @@ FormatterWorker._innerParseCSS = function(text, chunkCallback)
for (lineNumber = 0; lineNumber < lines.length; ++lineNumber) {
var line = lines[lineNumber];
tokenizer(line, processToken);
+ processToken("\n", null, line.length, line.length + 1);
}
chunkCallback({ chunk: rules, isLastChunk: true });

Powered by Google App Engine
This is Rietveld 408576698