| OLD | NEW |
| 1 var initialize_SassTest = function() { | 1 var initialize_SassTest = function() { |
| 2 | 2 |
| 3 InspectorTest.preloadModule("sass"); | 3 InspectorTest.preloadModule("sass"); |
| 4 | 4 |
| 5 var cssParserService = null; | |
| 6 | |
| 7 InspectorTest.cssParserService = function() | |
| 8 { | |
| 9 if (!cssParserService) | |
| 10 cssParserService = new WebInspector.CSSParserService(); | |
| 11 return cssParserService; | |
| 12 } | |
| 13 | |
| 14 var sassSourceMapFactory = null; | 5 var sassSourceMapFactory = null; |
| 15 InspectorTest.sassSourceMapFactory = function() | 6 InspectorTest.sassSourceMapFactory = function() |
| 16 { | 7 { |
| 17 if (!sassSourceMapFactory) | 8 if (!sassSourceMapFactory) |
| 18 sassSourceMapFactory = new WebInspector.SASSSourceMapFactory(); | 9 sassSourceMapFactory = new WebInspector.SASSSourceMapFactory(); |
| 19 return sassSourceMapFactory; | 10 return sassSourceMapFactory; |
| 20 } | 11 } |
| 21 | 12 |
| 22 InspectorTest.parseCSS = function(url, text) | |
| 23 { | |
| 24 return WebInspector.SASSSupport.parseCSS(url, text); | |
| 25 } | |
| 26 | |
| 27 InspectorTest.parseSCSS = function(url, text) | 13 InspectorTest.parseSCSS = function(url, text) |
| 28 { | 14 { |
| 29 return WebInspector.SASSSupport.parseSCSS(url, text); | 15 return WebInspector.SASSSupport.parseSCSS(url, text); |
| 30 } | 16 } |
| 17 InspectorTest.parseCSS = InspectorTest.parseSCSS; |
| 31 | 18 |
| 32 InspectorTest.loadASTMapping = function(header, callback) | 19 InspectorTest.loadASTMapping = function(header, callback) |
| 33 { | 20 { |
| 34 var completeSourceMapURL = WebInspector.ParsedURL.completeURL(header.sourceU
RL, header.sourceMapURL); | 21 var completeSourceMapURL = WebInspector.ParsedURL.completeURL(header.sourceU
RL, header.sourceMapURL); |
| 35 WebInspector.TextSourceMap.load(completeSourceMapURL, header.sourceURL).then
(onSourceMapLoaded); | 22 WebInspector.TextSourceMap.load(completeSourceMapURL, header.sourceURL).then
(onSourceMapLoaded); |
| 36 | 23 |
| 37 function onSourceMapLoaded(sourceMap) | 24 function onSourceMapLoaded(sourceMap) |
| 38 { | 25 { |
| 39 InspectorTest.sassSourceMapFactory().editableSourceMap(header.cssModel()
.target(), sourceMap) | 26 InspectorTest.sassSourceMapFactory().editableSourceMap(header.cssModel()
.target(), sourceMap) |
| 40 .then(map => callback(map)); | 27 .then(map => callback(map)); |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 } | 291 } |
| 305 if (!match) | 292 if (!match) |
| 306 return null; | 293 return null; |
| 307 var sourceRange = new WebInspector.SourceRange(match.index, match[0].length)
; | 294 var sourceRange = new WebInspector.SourceRange(match.index, match[0].length)
; |
| 308 var textRange = sourceRange.toTextRange(new WebInspector.Text(source)); | 295 var textRange = sourceRange.toTextRange(new WebInspector.Text(source)); |
| 309 return new WebInspector.SourceEdit("", textRange, newText); | 296 return new WebInspector.SourceEdit("", textRange, newText); |
| 310 } | 297 } |
| 311 | 298 |
| 312 } | 299 } |
| 313 | 300 |
| OLD | NEW |