| 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.SharedSidebarModel = function() | 9 WebInspector.SharedSidebarModel = function() |
| 10 { | 10 { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 _updateTarget: function(target) | 64 _updateTarget: function(target) |
| 65 { | 65 { |
| 66 if (this._target === target) | 66 if (this._target === target) |
| 67 return; | 67 return; |
| 68 if (this._target) { | 68 if (this._target) { |
| 69 this._cssModel.removeEventListener(WebInspector.CSSStyleModel.Events
.StyleSheetAdded, this._onComputedStyleChanged, this); | 69 this._cssModel.removeEventListener(WebInspector.CSSStyleModel.Events
.StyleSheetAdded, this._onComputedStyleChanged, this); |
| 70 this._cssModel.removeEventListener(WebInspector.CSSStyleModel.Events
.StyleSheetRemoved, this._onComputedStyleChanged, this); | 70 this._cssModel.removeEventListener(WebInspector.CSSStyleModel.Events
.StyleSheetRemoved, this._onComputedStyleChanged, this); |
| 71 this._cssModel.removeEventListener(WebInspector.CSSStyleModel.Events
.StyleSheetChanged, this._onComputedStyleChanged, this); | 71 this._cssModel.removeEventListener(WebInspector.CSSStyleModel.Events
.StyleSheetChanged, this._onComputedStyleChanged, this); |
| 72 this._cssModel.removeEventListener(WebInspector.CSSStyleModel.Events
.MediaQueryResultChanged, this._onComputedStyleChanged, this); | 72 this._cssModel.removeEventListener(WebInspector.CSSStyleModel.Events
.MediaQueryResultChanged, this._onComputedStyleChanged, this); |
| 73 this._cssModel.removeEventListener(WebInspector.CSSStyleModel.Events
.PseudoStateForced, this._onComputedStyleChanged, this); | 73 this._cssModel.removeEventListener(WebInspector.CSSStyleModel.Events
.PseudoStateForced, this._onComputedStyleChanged, this); |
| 74 this._cssModel.addEventListener(WebInspector.CSSStyleModel.Events.Mo
delWasEnabled, this._onComputedStyleChanged, this); | 74 this._cssModel.removeEventListener(WebInspector.CSSStyleModel.Events
.ModelWasEnabled, this._onComputedStyleChanged, this); |
| 75 this._domModel.removeEventListener(WebInspector.DOMModel.Events.DOMM
utated, this._onComputedStyleChanged, this); | 75 this._domModel.removeEventListener(WebInspector.DOMModel.Events.DOMM
utated, this._onComputedStyleChanged, this); |
| 76 } | 76 } |
| 77 this._target = target; | 77 this._target = target; |
| 78 if (target) { | 78 if (target) { |
| 79 this._cssModel = WebInspector.CSSStyleModel.fromTarget(target); | 79 this._cssModel = WebInspector.CSSStyleModel.fromTarget(target); |
| 80 this._cssModel.addEventListener(WebInspector.CSSStyleModel.Events.St
yleSheetAdded, this._onComputedStyleChanged, this); | 80 this._cssModel.addEventListener(WebInspector.CSSStyleModel.Events.St
yleSheetAdded, this._onComputedStyleChanged, this); |
| 81 this._cssModel.addEventListener(WebInspector.CSSStyleModel.Events.St
yleSheetRemoved, this._onComputedStyleChanged, this); | 81 this._cssModel.addEventListener(WebInspector.CSSStyleModel.Events.St
yleSheetRemoved, this._onComputedStyleChanged, this); |
| 82 this._cssModel.addEventListener(WebInspector.CSSStyleModel.Events.St
yleSheetChanged, this._onComputedStyleChanged, this); | 82 this._cssModel.addEventListener(WebInspector.CSSStyleModel.Events.St
yleSheetChanged, this._onComputedStyleChanged, this); |
| 83 this._cssModel.addEventListener(WebInspector.CSSStyleModel.Events.Me
diaQueryResultChanged, this._onComputedStyleChanged, this); | 83 this._cssModel.addEventListener(WebInspector.CSSStyleModel.Events.Me
diaQueryResultChanged, this._onComputedStyleChanged, this); |
| 84 this._cssModel.addEventListener(WebInspector.CSSStyleModel.Events.Ps
eudoStateForced, this._onComputedStyleChanged, this); | 84 this._cssModel.addEventListener(WebInspector.CSSStyleModel.Events.Ps
eudoStateForced, this._onComputedStyleChanged, this); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 /** | 144 /** |
| 145 * @constructor | 145 * @constructor |
| 146 * @param {!WebInspector.DOMNode} node | 146 * @param {!WebInspector.DOMNode} node |
| 147 * @param {!WebInspector.CSSStyleDeclaration} computedStyle | 147 * @param {!WebInspector.CSSStyleDeclaration} computedStyle |
| 148 */ | 148 */ |
| 149 WebInspector.SharedSidebarModel.ComputedStyle = function(node, computedStyle) | 149 WebInspector.SharedSidebarModel.ComputedStyle = function(node, computedStyle) |
| 150 { | 150 { |
| 151 this.node = node; | 151 this.node = node; |
| 152 this.computedStyle = computedStyle; | 152 this.computedStyle = computedStyle; |
| 153 } | 153 } |
| OLD | NEW |