| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @extends {WebInspector.Object} | 6 * @extends {WebInspector.Object} |
| 7 * @constructor | 7 * @constructor |
| 8 */ | 8 */ |
| 9 WebInspector.ComputedStyleModel = function() | 9 WebInspector.ComputedStyleModel = function() |
| 10 { | 10 { |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 this._cssModel = WebInspector.CSSModel.fromTarget(target); | 63 this._cssModel = WebInspector.CSSModel.fromTarget(target); |
| 64 domModel = WebInspector.DOMModel.fromTarget(target); | 64 domModel = WebInspector.DOMModel.fromTarget(target); |
| 65 resourceTreeModel = target.resourceTreeModel; | 65 resourceTreeModel = target.resourceTreeModel; |
| 66 } | 66 } |
| 67 | 67 |
| 68 if (this._cssModel && domModel && resourceTreeModel) { | 68 if (this._cssModel && domModel && resourceTreeModel) { |
| 69 this._targetEvents = [ | 69 this._targetEvents = [ |
| 70 this._cssModel.addEventListener(WebInspector.CSSModel.Events.Sty
leSheetAdded, this._onComputedStyleChanged, this), | 70 this._cssModel.addEventListener(WebInspector.CSSModel.Events.Sty
leSheetAdded, this._onComputedStyleChanged, this), |
| 71 this._cssModel.addEventListener(WebInspector.CSSModel.Events.Sty
leSheetRemoved, this._onComputedStyleChanged, this), | 71 this._cssModel.addEventListener(WebInspector.CSSModel.Events.Sty
leSheetRemoved, this._onComputedStyleChanged, this), |
| 72 this._cssModel.addEventListener(WebInspector.CSSModel.Events.Sty
leSheetChanged, this._onComputedStyleChanged, this), | 72 this._cssModel.addEventListener(WebInspector.CSSModel.Events.Sty
leSheetChanged, this._onComputedStyleChanged, this), |
| 73 this._cssModel.addEventListener(WebInspector.CSSModel.Events.Fon
tsUpdated, this._onComputedStyleChanged, this), |
| 73 this._cssModel.addEventListener(WebInspector.CSSModel.Events.Med
iaQueryResultChanged, this._onComputedStyleChanged, this), | 74 this._cssModel.addEventListener(WebInspector.CSSModel.Events.Med
iaQueryResultChanged, this._onComputedStyleChanged, this), |
| 74 this._cssModel.addEventListener(WebInspector.CSSModel.Events.Pse
udoStateForced, this._onComputedStyleChanged, this), | 75 this._cssModel.addEventListener(WebInspector.CSSModel.Events.Pse
udoStateForced, this._onComputedStyleChanged, this), |
| 75 this._cssModel.addEventListener(WebInspector.CSSModel.Events.Mod
elWasEnabled, this._onComputedStyleChanged, this), | 76 this._cssModel.addEventListener(WebInspector.CSSModel.Events.Mod
elWasEnabled, this._onComputedStyleChanged, this), |
| 76 domModel.addEventListener(WebInspector.DOMModel.Events.DOMMutate
d, this._onDOMModelChanged, this), | 77 domModel.addEventListener(WebInspector.DOMModel.Events.DOMMutate
d, this._onDOMModelChanged, this), |
| 77 resourceTreeModel.addEventListener(WebInspector.ResourceTreeMode
l.EventTypes.FrameResized, this._onFrameResized, this), | 78 resourceTreeModel.addEventListener(WebInspector.ResourceTreeMode
l.EventTypes.FrameResized, this._onFrameResized, this), |
| 78 ]; | 79 ]; |
| 79 } | 80 } |
| 80 }, | 81 }, |
| 81 | 82 |
| 82 /** | 83 /** |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 /** | 162 /** |
| 162 * @constructor | 163 * @constructor |
| 163 * @param {!WebInspector.DOMNode} node | 164 * @param {!WebInspector.DOMNode} node |
| 164 * @param {!Map.<string, string>} computedStyle | 165 * @param {!Map.<string, string>} computedStyle |
| 165 */ | 166 */ |
| 166 WebInspector.ComputedStyleModel.ComputedStyle = function(node, computedStyle) | 167 WebInspector.ComputedStyleModel.ComputedStyle = function(node, computedStyle) |
| 167 { | 168 { |
| 168 this.node = node; | 169 this.node = node; |
| 169 this.computedStyle = computedStyle; | 170 this.computedStyle = computedStyle; |
| 170 } | 171 } |
| OLD | NEW |