| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 807 */ | 807 */ |
| 808 _ensureOriginalStyleSheetText: function(styleSheetId) | 808 _ensureOriginalStyleSheetText: function(styleSheetId) |
| 809 { | 809 { |
| 810 var header = this.styleSheetHeaderForId(styleSheetId); | 810 var header = this.styleSheetHeaderForId(styleSheetId); |
| 811 if (!header) | 811 if (!header) |
| 812 return Promise.resolve(""); | 812 return Promise.resolve(""); |
| 813 var promise = this._originalStyleSheetText.get(header); | 813 var promise = this._originalStyleSheetText.get(header); |
| 814 if (!promise) { | 814 if (!promise) { |
| 815 promise = this.getStyleSheetText(header.id); | 815 promise = this.getStyleSheetText(header.id); |
| 816 this._originalStyleSheetText.set(header, promise); | 816 this._originalStyleSheetText.set(header, promise); |
| 817 this._originalContentRequestedForTest(header); |
| 817 } | 818 } |
| 818 return promise; | 819 return promise; |
| 819 }, | 820 }, |
| 820 | 821 |
| 821 /** | 822 /** |
| 822 * @param {!WebInspector.CSSStyleSheetHeader} header | 823 * @param {!WebInspector.CSSStyleSheetHeader} header |
| 824 */ |
| 825 _originalContentRequestedForTest: function(header) { }, |
| 826 |
| 827 /** |
| 828 * @param {!WebInspector.CSSStyleSheetHeader} header |
| 823 * @return {!Promise<string>} | 829 * @return {!Promise<string>} |
| 824 */ | 830 */ |
| 825 originalStyleSheetText: function(header) | 831 originalStyleSheetText: function(header) |
| 826 { | 832 { |
| 827 return this._ensureOriginalStyleSheetText(header.id); | 833 return this._ensureOriginalStyleSheetText(header.id); |
| 828 }, | 834 }, |
| 829 | 835 |
| 830 /** | 836 /** |
| 831 * @param {!CSSAgent.CSSStyleSheetHeader} header | 837 * @param {!CSSAgent.CSSStyleSheetHeader} header |
| 832 */ | 838 */ |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1201 /** | 1207 /** |
| 1202 * @constructor | 1208 * @constructor |
| 1203 * @param {?WebInspector.CSSStyleDeclaration} inlineStyle | 1209 * @param {?WebInspector.CSSStyleDeclaration} inlineStyle |
| 1204 * @param {?WebInspector.CSSStyleDeclaration} attributesStyle | 1210 * @param {?WebInspector.CSSStyleDeclaration} attributesStyle |
| 1205 */ | 1211 */ |
| 1206 WebInspector.CSSModel.InlineStyleResult = function(inlineStyle, attributesStyle) | 1212 WebInspector.CSSModel.InlineStyleResult = function(inlineStyle, attributesStyle) |
| 1207 { | 1213 { |
| 1208 this.inlineStyle = inlineStyle; | 1214 this.inlineStyle = inlineStyle; |
| 1209 this.attributesStyle = attributesStyle; | 1215 this.attributesStyle = attributesStyle; |
| 1210 } | 1216 } |
| OLD | NEW |