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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 this._domModel.addEventListener(WebInspector.DOMModel.Events.UndoRedoComplet
ed, this._undoRedoCompleted, this); | 44 this._domModel.addEventListener(WebInspector.DOMModel.Events.UndoRedoComplet
ed, this._undoRedoCompleted, this); |
45 target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.Eve
ntTypes.MainFrameNavigated, this._mainFrameNavigated, this); | 45 target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.Eve
ntTypes.MainFrameNavigated, this._mainFrameNavigated, this); |
46 target.registerCSSDispatcher(new WebInspector.CSSDispatcher(this)); | 46 target.registerCSSDispatcher(new WebInspector.CSSDispatcher(this)); |
47 this._agent.enable(this._wasEnabled.bind(this)); | 47 this._agent.enable(this._wasEnabled.bind(this)); |
48 /** @type {!StringMap.<!WebInspector.CSSStyleSheetHeader>} */ | 48 /** @type {!StringMap.<!WebInspector.CSSStyleSheetHeader>} */ |
49 this._styleSheetIdToHeader = new StringMap(); | 49 this._styleSheetIdToHeader = new StringMap(); |
50 /** @type {!StringMap.<!Object.<!PageAgent.FrameId, !Array.<!CSSAgent.StyleS
heetId>>>} */ | 50 /** @type {!StringMap.<!Object.<!PageAgent.FrameId, !Array.<!CSSAgent.StyleS
heetId>>>} */ |
51 this._styleSheetIdsForURL = new StringMap(); | 51 this._styleSheetIdsForURL = new StringMap(); |
52 | 52 |
53 if (WebInspector.experimentsSettings.disableAgentsWhenProfile.isEnabled()) | 53 if (WebInspector.experimentsSettings.disableAgentsWhenProfile.isEnabled()) |
54 WebInspector.profilingLock.addEventListener(WebInspector.Lock.Events.Sta
teChanged, this._profilingStateChanged, this); | 54 target.profilingLock.addEventListener(WebInspector.Lock.Events.StateChan
ged, this._profilingStateChanged, this); |
55 } | 55 } |
56 | 56 |
57 WebInspector.CSSStyleModel.PseudoStatePropertyName = "pseudoState"; | 57 WebInspector.CSSStyleModel.PseudoStatePropertyName = "pseudoState"; |
58 | 58 |
59 /** | 59 /** |
60 * @param {!WebInspector.CSSStyleModel} cssModel | 60 * @param {!WebInspector.CSSStyleModel} cssModel |
61 * @param {!Array.<!CSSAgent.RuleMatch>|undefined} matchArray | 61 * @param {!Array.<!CSSAgent.RuleMatch>|undefined} matchArray |
62 * @return {!Array.<!WebInspector.CSSRule>} | 62 * @return {!Array.<!WebInspector.CSSRule>} |
63 */ | 63 */ |
64 WebInspector.CSSStyleModel.parseRuleMatchArrayPayload = function(cssModel, match
Array) | 64 WebInspector.CSSStyleModel.parseRuleMatchArrayPayload = function(cssModel, match
Array) |
(...skipping 13 matching lines...) Expand all Loading... |
78 StyleSheetChanged: "StyleSheetChanged", | 78 StyleSheetChanged: "StyleSheetChanged", |
79 StyleSheetRemoved: "StyleSheetRemoved", | 79 StyleSheetRemoved: "StyleSheetRemoved", |
80 MediaQueryResultChanged: "MediaQueryResultChanged", | 80 MediaQueryResultChanged: "MediaQueryResultChanged", |
81 } | 81 } |
82 | 82 |
83 WebInspector.CSSStyleModel.MediaTypes = ["all", "braille", "embossed", "handheld
", "print", "projection", "screen", "speech", "tty", "tv"]; | 83 WebInspector.CSSStyleModel.MediaTypes = ["all", "braille", "embossed", "handheld
", "print", "projection", "screen", "speech", "tty", "tv"]; |
84 | 84 |
85 WebInspector.CSSStyleModel.prototype = { | 85 WebInspector.CSSStyleModel.prototype = { |
86 _profilingStateChanged: function() | 86 _profilingStateChanged: function() |
87 { | 87 { |
88 if (WebInspector.profilingLock.isAcquired()) { | 88 if (this.target().profilingLock.isAcquired()) { |
89 this._agent.disable(); | 89 this._agent.disable(); |
90 this._isEnabled = false; | 90 this._isEnabled = false; |
91 this._resetStyleSheets(); | 91 this._resetStyleSheets(); |
92 } else { | 92 } else { |
93 this._agent.enable(this._wasEnabled.bind(this)); | 93 this._agent.enable(this._wasEnabled.bind(this)); |
94 } | 94 } |
95 }, | 95 }, |
96 | 96 |
97 /** | 97 /** |
98 * @param {function(!Array.<!WebInspector.CSSMedia>)} userCallback | 98 * @param {function(!Array.<!WebInspector.CSSMedia>)} userCallback |
(...skipping 1543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1642 for (var i = 0; i < callbacks.length; ++i) | 1642 for (var i = 0; i < callbacks.length; ++i) |
1643 callbacks[i](computedStyle); | 1643 callbacks[i](computedStyle); |
1644 } | 1644 } |
1645 } | 1645 } |
1646 } | 1646 } |
1647 | 1647 |
1648 /** | 1648 /** |
1649 * @type {!WebInspector.CSSStyleModel} | 1649 * @type {!WebInspector.CSSStyleModel} |
1650 */ | 1650 */ |
1651 WebInspector.cssModel; | 1651 WebInspector.cssModel; |
OLD | NEW |