Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/elements/ComputedStyleModel.js

Issue 2168323002: [DevTools] Explicitly require ResourceTreeModel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [DevTools] Explicitly require ResourceTreeModel Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 WebInspector.EventTarget.removeEventListeners(this._targetEvents); 55 WebInspector.EventTarget.removeEventListeners(this._targetEvents);
56 this._targetEvents = null; 56 this._targetEvents = null;
57 } 57 }
58 this._target = target; 58 this._target = target;
59 59
60 var domModel = null; 60 var domModel = null;
61 var resourceTreeModel = null; 61 var resourceTreeModel = null;
62 if (target) { 62 if (target) {
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 = WebInspector.ResourceTreeModel.fromTarget(target );
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.Fon tsUpdated, this._onComputedStyleChanged, this),
74 this._cssModel.addEventListener(WebInspector.CSSModel.Events.Med iaQueryResultChanged, this._onComputedStyleChanged, this), 74 this._cssModel.addEventListener(WebInspector.CSSModel.Events.Med iaQueryResultChanged, this._onComputedStyleChanged, this),
75 this._cssModel.addEventListener(WebInspector.CSSModel.Events.Pse udoStateForced, this._onComputedStyleChanged, this), 75 this._cssModel.addEventListener(WebInspector.CSSModel.Events.Pse udoStateForced, this._onComputedStyleChanged, this),
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 /** 162 /**
163 * @constructor 163 * @constructor
164 * @param {!WebInspector.DOMNode} node 164 * @param {!WebInspector.DOMNode} node
165 * @param {!Map.<string, string>} computedStyle 165 * @param {!Map.<string, string>} computedStyle
166 */ 166 */
167 WebInspector.ComputedStyleModel.ComputedStyle = function(node, computedStyle) 167 WebInspector.ComputedStyleModel.ComputedStyle = function(node, computedStyle)
168 { 168 {
169 this.node = node; 169 this.node = node;
170 this.computedStyle = computedStyle; 170 this.computedStyle = computedStyle;
171 } 171 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698