| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 this._onComputedStyleChanged(null); | 45 this._onComputedStyleChanged(null); |
| 46 }, | 46 }, |
| 47 | 47 |
| 48 /** | 48 /** |
| 49 * @param {?WebInspector.Target} target | 49 * @param {?WebInspector.Target} target |
| 50 */ | 50 */ |
| 51 _updateTarget: function(target) | 51 _updateTarget: function(target) |
| 52 { | 52 { |
| 53 if (this._target === target) | 53 if (this._target === target) |
| 54 return; | 54 return; |
| 55 if (this._targetEvents) { | 55 if (this._targetEvents) |
| 56 WebInspector.EventTarget.removeEventListeners(this._targetEvents); | 56 WebInspector.EventTarget.removeEventListeners(this._targetEvents); |
| 57 this._targetEvents = null; | |
| 58 } | |
| 59 this._target = target; | 57 this._target = target; |
| 60 | 58 |
| 61 var domModel = null; | 59 var domModel = null; |
| 62 var resourceTreeModel = null; | 60 var resourceTreeModel = null; |
| 63 if (target) { | 61 if (target) { |
| 64 this._cssModel = WebInspector.CSSModel.fromTarget(target); | 62 this._cssModel = WebInspector.CSSModel.fromTarget(target); |
| 65 domModel = WebInspector.DOMModel.fromTarget(target); | 63 domModel = WebInspector.DOMModel.fromTarget(target); |
| 66 resourceTreeModel = WebInspector.ResourceTreeModel.fromTarget(target
); | 64 resourceTreeModel = WebInspector.ResourceTreeModel.fromTarget(target
); |
| 67 } | 65 } |
| 68 | 66 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 /** | 161 /** |
| 164 * @constructor | 162 * @constructor |
| 165 * @param {!WebInspector.DOMNode} node | 163 * @param {!WebInspector.DOMNode} node |
| 166 * @param {!Map.<string, string>} computedStyle | 164 * @param {!Map.<string, string>} computedStyle |
| 167 */ | 165 */ |
| 168 WebInspector.ComputedStyleModel.ComputedStyle = function(node, computedStyle) | 166 WebInspector.ComputedStyleModel.ComputedStyle = function(node, computedStyle) |
| 169 { | 167 { |
| 170 this.node = node; | 168 this.node = node; |
| 171 this.computedStyle = computedStyle; | 169 this.computedStyle = computedStyle; |
| 172 } | 170 } |
| OLD | NEW |