OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 * @interface | 6 * @interface |
7 */ | 7 */ |
8 WebInspector.Layer = function() | 8 WebInspector.Layer = function() |
9 { | 9 { |
10 } | 10 }; |
11 | 11 |
12 WebInspector.Layer.prototype = { | 12 WebInspector.Layer.prototype = { |
13 /** | 13 /** |
14 * @return {string} | 14 * @return {string} |
15 */ | 15 */ |
16 id: function() { }, | 16 id: function() { }, |
17 | 17 |
18 /** | 18 /** |
19 * @return {?string} | 19 * @return {?string} |
20 */ | 20 */ |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 | 112 |
113 /** | 113 /** |
114 * @param {function(!Array.<string>)} callback | 114 * @param {function(!Array.<string>)} callback |
115 */ | 115 */ |
116 requestCompositingReasons: function(callback) { }, | 116 requestCompositingReasons: function(callback) { }, |
117 | 117 |
118 /** | 118 /** |
119 * @return {boolean} | 119 * @return {boolean} |
120 */ | 120 */ |
121 drawsContent: function() { } | 121 drawsContent: function() { } |
122 } | 122 }; |
123 | 123 |
124 WebInspector.Layer.ScrollRectType = { | 124 WebInspector.Layer.ScrollRectType = { |
125 NonFastScrollable: "NonFastScrollable", | 125 NonFastScrollable: "NonFastScrollable", |
126 TouchEventHandler: "TouchEventHandler", | 126 TouchEventHandler: "TouchEventHandler", |
127 WheelEventHandler: "WheelEventHandler", | 127 WheelEventHandler: "WheelEventHandler", |
128 RepaintsOnScroll: "RepaintsOnScroll" | 128 RepaintsOnScroll: "RepaintsOnScroll" |
129 } | 129 }; |
130 | 130 |
131 /** | 131 /** |
132 * @constructor | 132 * @constructor |
133 * @param {?WebInspector.Target} target | 133 * @param {?WebInspector.Target} target |
134 */ | 134 */ |
135 WebInspector.LayerTreeBase = function(target) | 135 WebInspector.LayerTreeBase = function(target) |
136 { | 136 { |
137 this._target = target; | 137 this._target = target; |
138 this._domModel = target ? WebInspector.DOMModel.fromTarget(target) : null; | 138 this._domModel = target ? WebInspector.DOMModel.fromTarget(target) : null; |
139 this._layersById = {}; | 139 this._layersById = {}; |
140 this._root = null; | 140 this._root = null; |
141 this._contentRoot = null; | 141 this._contentRoot = null; |
142 /** @type Map<number, ?WebInspector.DOMNode> */ | 142 /** @type Map<number, ?WebInspector.DOMNode> */ |
143 this._backendNodeIdToNode = new Map(); | 143 this._backendNodeIdToNode = new Map(); |
144 } | 144 }; |
145 | 145 |
146 WebInspector.LayerTreeBase.prototype = { | 146 WebInspector.LayerTreeBase.prototype = { |
147 /** | 147 /** |
148 * @return {?WebInspector.Target} | 148 * @return {?WebInspector.Target} |
149 */ | 149 */ |
150 target: function() | 150 target: function() |
151 { | 151 { |
152 return this._target; | 152 return this._target; |
153 }, | 153 }, |
154 | 154 |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 }, | 254 }, |
255 | 255 |
256 /** | 256 /** |
257 * @param {number} id | 257 * @param {number} id |
258 * @return {?WebInspector.DOMNode} | 258 * @return {?WebInspector.DOMNode} |
259 */ | 259 */ |
260 _nodeForId: function(id) | 260 _nodeForId: function(id) |
261 { | 261 { |
262 return this._domModel ? this._domModel.nodeForId(id) : null; | 262 return this._domModel ? this._domModel.nodeForId(id) : null; |
263 } | 263 } |
264 } | 264 }; |
OLD | NEW |