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

Side by Side Diff: Source/devtools/front_end/sdk/CSSParser.js

Issue 1307063005: DevTools: edit SASS through SourceMaps. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: improvements Created 5 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /** 1 /**
2 * Copyright 2014 The Chromium Authors. All rights reserved. 2 * Copyright 2014 The Chromium Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 /** 7 /**
8 * @constructor 8 * @constructor
9 * @extends {WebInspector.Object} 9 * @extends {WebInspector.Object}
10 */ 10 */
(...skipping 24 matching lines...) Expand all
35 * @param {string} text 35 * @param {string} text
36 * @param {function(!Array.<!WebInspector.CSSParser.Rule>)=} callback 36 * @param {function(!Array.<!WebInspector.CSSParser.Rule>)=} callback
37 */ 37 */
38 parse: function(text, callback) 38 parse: function(text, callback)
39 { 39 {
40 this._lock(); 40 this._lock();
41 this._finishedCallback = callback; 41 this._finishedCallback = callback;
42 this._innerParse(text); 42 this._innerParse(text);
43 }, 43 },
44 44
45 /**
46 * @param {string} text
47 * @return {!Promise<!Array.<!WebInspector.CSSParser.Rule>>}
48 */
49 parsePromise: function(text)
50 {
51 return new Promise(promiseConstructor.bind(this));
52
53 function promiseConstructor(succ, fail)
54 {
55 this.parse(text, succ);
56 }
57 },
58
45 dispose: function() 59 dispose: function()
46 { 60 {
47 if (this._worker) { 61 if (this._worker) {
48 this._worker.terminate(); 62 this._worker.terminate();
49 delete this._worker; 63 delete this._worker;
50 } 64 }
51 }, 65 },
52 66
53 /** 67 /**
54 * @return {!Array.<!WebInspector.CSSParser.Rule>} 68 * @return {!Array.<!WebInspector.CSSParser.Rule>}
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 * @typedef {{atRule: string, lineNumber: number, columnNumber: number}} 131 * @typedef {{atRule: string, lineNumber: number, columnNumber: number}}
118 */ 132 */
119 WebInspector.CSSParser.AtRule; 133 WebInspector.CSSParser.AtRule;
120 134
121 /** 135 /**
122 * @typedef {(WebInspector.CSSParser.StyleRule|WebInspector.CSSParser.AtRule)} 136 * @typedef {(WebInspector.CSSParser.StyleRule|WebInspector.CSSParser.AtRule)}
123 */ 137 */
124 WebInspector.CSSParser.Rule; 138 WebInspector.CSSParser.Rule;
125 139
126 /** 140 /**
127 * @typedef {{name: string, value: string}} 141 * @typedef {{name: string, value: string, nameRange: !WebInspector.CSSParser.Ra nge, valueRange: !WebInspector.CSSParser.Range, range: !WebInspector.CSSParser.R ange}}
128 */ 142 */
129 WebInspector.CSSParser.Property; 143 WebInspector.CSSParser.Property;
144
145 /**
146 * @typedef {{startLine: number, startColumn: number, endLine: number, endColumn : number}}
147 */
148 WebInspector.CSSParser.Range;
OLDNEW
« no previous file with comments | « Source/devtools/front_end/script_formatter_worker/ScriptFormatterWorker.js ('k') | Source/devtools/front_end/sdk/SourceMap.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698