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 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1029 } | 1029 } |
1030 }; | 1030 }; |
1031 | 1031 |
1032 SDK.CSSLocation = class { | 1032 SDK.CSSLocation = class { |
1033 /** | 1033 /** |
1034 * @param {!SDK.CSSStyleSheetHeader} header | 1034 * @param {!SDK.CSSStyleSheetHeader} header |
1035 * @param {number} lineNumber | 1035 * @param {number} lineNumber |
1036 * @param {number=} columnNumber | 1036 * @param {number=} columnNumber |
1037 */ | 1037 */ |
1038 constructor(header, lineNumber, columnNumber) { | 1038 constructor(header, lineNumber, columnNumber) { |
1039 this._header = header; | 1039 this._cssModel = header.cssModel(); |
1040 this.styleSheetId = header.id; | 1040 this.styleSheetId = header.id; |
1041 this.url = header.resourceURL(); | 1041 this.url = header.resourceURL(); |
1042 this.lineNumber = lineNumber; | 1042 this.lineNumber = lineNumber; |
1043 this.columnNumber = columnNumber || 0; | 1043 this.columnNumber = columnNumber || 0; |
1044 } | 1044 } |
1045 | 1045 |
1046 /** | 1046 /** |
1047 * @return {!SDK.CSSModel} | 1047 * @return {!SDK.CSSModel} |
1048 */ | 1048 */ |
1049 cssModel() { | 1049 cssModel() { |
1050 return this._header.cssModel(); | 1050 return this._cssModel; |
1051 } | 1051 } |
1052 | 1052 |
1053 /** | 1053 /** |
1054 * @return {!SDK.CSSStyleSheetHeader} | 1054 * @return {?SDK.CSSStyleSheetHeader} |
1055 */ | 1055 */ |
1056 header() { | 1056 header() { |
1057 return this._header; | 1057 return this._cssModel.styleSheetHeaderForId(this.styleSheetId); |
1058 } | 1058 } |
1059 }; | 1059 }; |
1060 | 1060 |
1061 /** | 1061 /** |
1062 * @implements {Protocol.CSSDispatcher} | 1062 * @implements {Protocol.CSSDispatcher} |
1063 * @unrestricted | 1063 * @unrestricted |
1064 */ | 1064 */ |
1065 SDK.CSSDispatcher = class { | 1065 SDK.CSSDispatcher = class { |
1066 /** | 1066 /** |
1067 * @param {!SDK.CSSModel} cssModel | 1067 * @param {!SDK.CSSModel} cssModel |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1167 SDK.CSSModel.InlineStyleResult = class { | 1167 SDK.CSSModel.InlineStyleResult = class { |
1168 /** | 1168 /** |
1169 * @param {?SDK.CSSStyleDeclaration} inlineStyle | 1169 * @param {?SDK.CSSStyleDeclaration} inlineStyle |
1170 * @param {?SDK.CSSStyleDeclaration} attributesStyle | 1170 * @param {?SDK.CSSStyleDeclaration} attributesStyle |
1171 */ | 1171 */ |
1172 constructor(inlineStyle, attributesStyle) { | 1172 constructor(inlineStyle, attributesStyle) { |
1173 this.inlineStyle = inlineStyle; | 1173 this.inlineStyle = inlineStyle; |
1174 this.attributesStyle = attributesStyle; | 1174 this.attributesStyle = attributesStyle; |
1175 } | 1175 } |
1176 }; | 1176 }; |
OLD | NEW |