| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 /** @type {!Map<string, !WebInspector.SourceMap>} */ | 56 /** @type {!Map<string, !WebInspector.SourceMap>} */ |
| 57 this._sourceMapByURL = new Map(); | 57 this._sourceMapByURL = new Map(); |
| 58 /** @type {!Multimap<string, !WebInspector.CSSStyleSheetHeader>} */ | 58 /** @type {!Multimap<string, !WebInspector.CSSStyleSheetHeader>} */ |
| 59 this._sourceMapURLToHeaders = new Multimap(); | 59 this._sourceMapURLToHeaders = new Multimap(); |
| 60 WebInspector.moduleSetting("cssSourceMapsEnabled").addChangeListener(this._t
oggleSourceMapSupport, this); | 60 WebInspector.moduleSetting("cssSourceMapsEnabled").addChangeListener(this._t
oggleSourceMapSupport, this); |
| 61 } | 61 } |
| 62 | 62 |
| 63 WebInspector.CSSModel.Events = { | 63 WebInspector.CSSModel.Events = { |
| 64 LayoutEditorChange: "LayoutEditorChange", | 64 LayoutEditorChange: "LayoutEditorChange", |
| 65 FontsUpdated: "FontsUpdated", |
| 65 MediaQueryResultChanged: "MediaQueryResultChanged", | 66 MediaQueryResultChanged: "MediaQueryResultChanged", |
| 66 ModelWasEnabled: "ModelWasEnabled", | 67 ModelWasEnabled: "ModelWasEnabled", |
| 67 PseudoStateForced: "PseudoStateForced", | 68 PseudoStateForced: "PseudoStateForced", |
| 68 StyleSheetAdded: "StyleSheetAdded", | 69 StyleSheetAdded: "StyleSheetAdded", |
| 69 StyleSheetChanged: "StyleSheetChanged", | 70 StyleSheetChanged: "StyleSheetChanged", |
| 70 StyleSheetRemoved: "StyleSheetRemoved", | 71 StyleSheetRemoved: "StyleSheetRemoved", |
| 71 SourceMapAttached: "SourceMapAttached", | 72 SourceMapAttached: "SourceMapAttached", |
| 72 SourceMapDetached: "SourceMapDetached", | 73 SourceMapDetached: "SourceMapDetached", |
| 73 SourceMapChanged: "SourceMapChanged" | 74 SourceMapChanged: "SourceMapChanged" |
| 74 } | 75 } |
| (...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 751 this._agent.createStyleSheet(frameId, innerCallback.bind(this)) | 752 this._agent.createStyleSheet(frameId, innerCallback.bind(this)) |
| 752 .catchException(null) | 753 .catchException(null) |
| 753 .then(userCallback) | 754 .then(userCallback) |
| 754 }, | 755 }, |
| 755 | 756 |
| 756 mediaQueryResultChanged: function() | 757 mediaQueryResultChanged: function() |
| 757 { | 758 { |
| 758 this.dispatchEventToListeners(WebInspector.CSSModel.Events.MediaQueryRes
ultChanged); | 759 this.dispatchEventToListeners(WebInspector.CSSModel.Events.MediaQueryRes
ultChanged); |
| 759 }, | 760 }, |
| 760 | 761 |
| 762 fontsUpdated: function() |
| 763 { |
| 764 this.dispatchEventToListeners(WebInspector.CSSModel.Events.FontsUpdated)
; |
| 765 }, |
| 766 |
| 761 /** | 767 /** |
| 762 * @param {!CSSAgent.StyleSheetId} id | 768 * @param {!CSSAgent.StyleSheetId} id |
| 763 * @return {?WebInspector.CSSStyleSheetHeader} | 769 * @return {?WebInspector.CSSStyleSheetHeader} |
| 764 */ | 770 */ |
| 765 styleSheetHeaderForId: function(id) | 771 styleSheetHeaderForId: function(id) |
| 766 { | 772 { |
| 767 return this._styleSheetIdToHeader.get(id) || null; | 773 return this._styleSheetIdToHeader.get(id) || null; |
| 768 }, | 774 }, |
| 769 | 775 |
| 770 /** | 776 /** |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1093 /** | 1099 /** |
| 1094 * @override | 1100 * @override |
| 1095 */ | 1101 */ |
| 1096 mediaQueryResultChanged: function() | 1102 mediaQueryResultChanged: function() |
| 1097 { | 1103 { |
| 1098 this._cssModel.mediaQueryResultChanged(); | 1104 this._cssModel.mediaQueryResultChanged(); |
| 1099 }, | 1105 }, |
| 1100 | 1106 |
| 1101 /** | 1107 /** |
| 1102 * @override | 1108 * @override |
| 1109 */ |
| 1110 fontsUpdated: function() |
| 1111 { |
| 1112 this._cssModel.fontsUpdated(); |
| 1113 }, |
| 1114 |
| 1115 /** |
| 1116 * @override |
| 1103 * @param {!CSSAgent.StyleSheetId} styleSheetId | 1117 * @param {!CSSAgent.StyleSheetId} styleSheetId |
| 1104 */ | 1118 */ |
| 1105 styleSheetChanged: function(styleSheetId) | 1119 styleSheetChanged: function(styleSheetId) |
| 1106 { | 1120 { |
| 1107 this._cssModel._fireStyleSheetChanged(styleSheetId); | 1121 this._cssModel._fireStyleSheetChanged(styleSheetId); |
| 1108 }, | 1122 }, |
| 1109 | 1123 |
| 1110 /** | 1124 /** |
| 1111 * @override | 1125 * @override |
| 1112 * @param {!CSSAgent.CSSStyleSheetHeader} header | 1126 * @param {!CSSAgent.CSSStyleSheetHeader} header |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1208 /** | 1222 /** |
| 1209 * @constructor | 1223 * @constructor |
| 1210 * @param {?WebInspector.CSSStyleDeclaration} inlineStyle | 1224 * @param {?WebInspector.CSSStyleDeclaration} inlineStyle |
| 1211 * @param {?WebInspector.CSSStyleDeclaration} attributesStyle | 1225 * @param {?WebInspector.CSSStyleDeclaration} attributesStyle |
| 1212 */ | 1226 */ |
| 1213 WebInspector.CSSModel.InlineStyleResult = function(inlineStyle, attributesStyle) | 1227 WebInspector.CSSModel.InlineStyleResult = function(inlineStyle, attributesStyle) |
| 1214 { | 1228 { |
| 1215 this.inlineStyle = inlineStyle; | 1229 this.inlineStyle = inlineStyle; |
| 1216 this.attributesStyle = attributesStyle; | 1230 this.attributesStyle = attributesStyle; |
| 1217 } | 1231 } |
| OLD | NEW |