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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sass/SASSSupport.js

Issue 1941283002: DevTools: [SASS] start parsing CSS with SCSS parser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@1-scss
Patch Set: rebaseline Created 4 years, 8 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 | « third_party/WebKit/Source/devtools/front_end/sass/ASTService.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/sass/SASSSupport.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sass/SASSSupport.js b/third_party/WebKit/Source/devtools/front_end/sass/SASSSupport.js
index 34d38ccd3f561a8fb47fae1ffe1bfd82504baf4f..684965faffab3c32c76f5619f69e2fdf1e09d494 100644
--- a/third_party/WebKit/Source/devtools/front_end/sass/SASSSupport.js
+++ b/third_party/WebKit/Source/devtools/front_end/sass/SASSSupport.js
@@ -6,43 +6,6 @@ WebInspector.SASSSupport = {}
/**
* @param {string} url
- * @param {string} text
- * @return {!Promise<!WebInspector.SASSSupport.AST>}
- */
-WebInspector.SASSSupport.parseCSS = function(url, text)
-{
- var cssParser = new WebInspector.CSSParser();
- return cssParser.parsePromise(text)
- .then(onParsed);
-
- /**
- * @param {!Array.<!WebInspector.CSSParser.Rule>} parsedCSS
- * @return {!WebInspector.SASSSupport.AST}
- */
- function onParsed(parsedCSS)
- {
- var document = new WebInspector.SASSSupport.ASTDocument(url, new WebInspector.Text(text));
- var rules = [];
- for (var i = 0; i < parsedCSS.length; ++i) {
- var rule = parsedCSS[i];
- if (!rule.properties)
- continue;
- var properties = [];
- for (var j = 0; j < rule.properties.length; ++j) {
- var cssProperty = rule.properties[j];
- var name = new WebInspector.SASSSupport.TextNode(document, cssProperty.name, WebInspector.TextRange.fromObject(cssProperty.nameRange));
- var value = new WebInspector.SASSSupport.TextNode(document, cssProperty.value, WebInspector.TextRange.fromObject(cssProperty.valueRange));
- var property = new WebInspector.SASSSupport.Property(document, name, value, WebInspector.TextRange.fromObject(cssProperty.range), !!cssProperty.disabled);
- properties.push(property);
- }
- rules.push(new WebInspector.SASSSupport.Rule(document, rule.selectorText, WebInspector.TextRange.fromObject(rule.styleRange), properties));
- }
- return new WebInspector.SASSSupport.AST(document, rules);
- }
-}
-
-/**
- * @param {string} url
* @param {string} content
* @return {!Promise<!WebInspector.SASSSupport.AST>}
*/
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sass/ASTService.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698