| OLD | NEW |
| 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 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 WebInspector.CSSParser.prototype = { | 22 WebInspector.CSSParser.prototype = { |
| 23 /** | 23 /** |
| 24 * @param {!WebInspector.CSSStyleSheetHeader} styleSheetHeader | 24 * @param {!WebInspector.CSSStyleSheetHeader} styleSheetHeader |
| 25 * @param {function(!Array.<!WebInspector.CSSParser.Rule>)=} callback | 25 * @param {function(!Array.<!WebInspector.CSSParser.Rule>)=} callback |
| 26 */ | 26 */ |
| 27 fetchAndParse: function(styleSheetHeader, callback) | 27 fetchAndParse: function(styleSheetHeader, callback) |
| 28 { | 28 { |
| 29 this._lock(); | 29 this._lock(); |
| 30 this._finishedCallback = callback; | 30 this._finishedCallback = callback; |
| 31 styleSheetHeader.requestContent(this._innerParse.bind(this)); | 31 styleSheetHeader.requestContent().then(this._innerParse.bind(this)); |
| 32 }, | 32 }, |
| 33 | 33 |
| 34 /** | 34 /** |
| 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; |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 this.nameRange; | 158 this.nameRange; |
| 159 /** @type {string} */ | 159 /** @type {string} */ |
| 160 this.value; | 160 this.value; |
| 161 /** @type {!WebInspector.CSSParser.Range} */ | 161 /** @type {!WebInspector.CSSParser.Range} */ |
| 162 this.valueRange; | 162 this.valueRange; |
| 163 /** @type {!WebInspector.CSSParser.Range} */ | 163 /** @type {!WebInspector.CSSParser.Range} */ |
| 164 this.range; | 164 this.range; |
| 165 /** @type {(boolean|undefined)} */ | 165 /** @type {(boolean|undefined)} */ |
| 166 this.disabled; | 166 this.disabled; |
| 167 } | 167 } |
| OLD | NEW |