Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/elements/ComputedStyleModel.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/elements/ComputedStyleModel.js b/third_party/WebKit/Source/devtools/front_end/elements/ComputedStyleModel.js |
| index 022fe4ca607697f1ad77ae3c2f30987aa05485c1..4f606fc0ce50057cc2991928a4d8f013f25c2bcd 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/elements/ComputedStyleModel.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/elements/ComputedStyleModel.js |
| @@ -35,6 +35,14 @@ WebInspector.ComputedStyleModel.prototype = { |
| }, |
| /** |
| + * @return {?WebInspector.ResourceTreeModel} |
| + */ |
| + resourceTreeModel: function() |
| + { |
| + return this._resourceTreeModel || null; |
|
pfeldman
2016/07/27 17:54:35
This does not sound right, css should not need res
eostroukhov-old
2016/08/05 18:32:03
This method was left here by mistake, removed now.
|
| + }, |
| + |
| + /** |
| * @param {!WebInspector.Event} event |
| */ |
| _onNodeChanged: function(event) |
| @@ -58,14 +66,13 @@ WebInspector.ComputedStyleModel.prototype = { |
| this._target = target; |
| var domModel = null; |
| - var resourceTreeModel = null; |
| if (target) { |
| this._cssModel = WebInspector.CSSModel.fromTarget(target); |
| domModel = WebInspector.DOMModel.fromTarget(target); |
| - resourceTreeModel = target.resourceTreeModel; |
| + this._resourceTreeModel = target.resourceTreeModel; |
| } |
| - if (this._cssModel && domModel && resourceTreeModel) { |
| + if (this._cssModel && domModel && this._resourceTreeModel) { |
| this._targetEvents = [ |
| this._cssModel.addEventListener(WebInspector.CSSModel.Events.StyleSheetAdded, this._onComputedStyleChanged, this), |
| this._cssModel.addEventListener(WebInspector.CSSModel.Events.StyleSheetRemoved, this._onComputedStyleChanged, this), |
| @@ -74,7 +81,7 @@ WebInspector.ComputedStyleModel.prototype = { |
| this._cssModel.addEventListener(WebInspector.CSSModel.Events.PseudoStateForced, this._onComputedStyleChanged, this), |
| this._cssModel.addEventListener(WebInspector.CSSModel.Events.ModelWasEnabled, this._onComputedStyleChanged, this), |
| domModel.addEventListener(WebInspector.DOMModel.Events.DOMMutated, this._onDOMModelChanged, this), |
| - resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.FrameResized, this._onFrameResized, this), |
| + this._resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.FrameResized, this._onFrameResized, this), |
| ]; |
| } |
| }, |