| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 layer_quad: Array.<number>, | 37 layer_quad: Array.<number>, |
| 38 draws_content: number, | 38 draws_content: number, |
| 39 transform: Array.<number>, | 39 transform: Array.<number>, |
| 40 owner_node: number | 40 owner_node: number |
| 41 }} | 41 }} |
| 42 */ | 42 */ |
| 43 WebInspector.TracingLayerPayload; | 43 WebInspector.TracingLayerPayload; |
| 44 | 44 |
| 45 /** | 45 /** |
| 46 * @constructor | 46 * @constructor |
| 47 * @extends {WebInspector.TargetAwareObject} | 47 * @extends {WebInspector.SDKObject} |
| 48 */ | 48 */ |
| 49 WebInspector.LayerTreeModel = function(target) | 49 WebInspector.LayerTreeModel = function(target) |
| 50 { | 50 { |
| 51 WebInspector.TargetAwareObject.call(this, target); | 51 WebInspector.SDKObject.call(this, target); |
| 52 InspectorBackend.registerLayerTreeDispatcher(new WebInspector.LayerTreeDispa
tcher(this)); | 52 InspectorBackend.registerLayerTreeDispatcher(new WebInspector.LayerTreeDispa
tcher(this)); |
| 53 target.domModel.addEventListener(WebInspector.DOMModel.Events.DocumentUpdate
d, this._onDocumentUpdated, this); | 53 target.domModel.addEventListener(WebInspector.DOMModel.Events.DocumentUpdate
d, this._onDocumentUpdated, this); |
| 54 /** @type {?WebInspector.LayerTreeBase} */ | 54 /** @type {?WebInspector.LayerTreeBase} */ |
| 55 this._layerTree = null; | 55 this._layerTree = null; |
| 56 } | 56 } |
| 57 | 57 |
| 58 WebInspector.LayerTreeModel.Events = { | 58 WebInspector.LayerTreeModel.Events = { |
| 59 LayerTreeChanged: "LayerTreeChanged", | 59 LayerTreeChanged: "LayerTreeChanged", |
| 60 LayerPainted: "LayerPainted", | 60 LayerPainted: "LayerPainted", |
| 61 } | 61 } |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 }, | 151 }, |
| 152 | 152 |
| 153 _onDocumentUpdated: function() | 153 _onDocumentUpdated: function() |
| 154 { | 154 { |
| 155 if (!this._enabled) | 155 if (!this._enabled) |
| 156 return; | 156 return; |
| 157 this.disable(); | 157 this.disable(); |
| 158 this.enable(); | 158 this.enable(); |
| 159 }, | 159 }, |
| 160 | 160 |
| 161 __proto__: WebInspector.TargetAwareObject.prototype | 161 __proto__: WebInspector.SDKObject.prototype |
| 162 } | 162 } |
| 163 | 163 |
| 164 /** | 164 /** |
| 165 * @constructor | 165 * @constructor |
| 166 * @extends {WebInspector.TargetAwareObject} | 166 * @extends {WebInspector.SDKObject} |
| 167 * @param {!WebInspector.Target} target | 167 * @param {!WebInspector.Target} target |
| 168 */ | 168 */ |
| 169 WebInspector.LayerTreeBase = function(target) | 169 WebInspector.LayerTreeBase = function(target) |
| 170 { | 170 { |
| 171 WebInspector.TargetAwareObject.call(this, target); | 171 WebInspector.SDKObject.call(this, target); |
| 172 this._layersById = {}; | 172 this._layersById = {}; |
| 173 this._backendNodeIdToNodeId = {}; | 173 this._backendNodeIdToNodeId = {}; |
| 174 this._reset(); | 174 this._reset(); |
| 175 } | 175 } |
| 176 | 176 |
| 177 WebInspector.LayerTreeBase.prototype = { | 177 WebInspector.LayerTreeBase.prototype = { |
| 178 _reset: function() | 178 _reset: function() |
| 179 { | 179 { |
| 180 this._root = null; | 180 this._root = null; |
| 181 this._contentRoot = null; | 181 this._contentRoot = null; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 }, | 260 }, |
| 261 | 261 |
| 262 /** | 262 /** |
| 263 * @return {!Object | undefined} | 263 * @return {!Object | undefined} |
| 264 */ | 264 */ |
| 265 viewportSize: function() | 265 viewportSize: function() |
| 266 { | 266 { |
| 267 return this._viewportSize; | 267 return this._viewportSize; |
| 268 }, | 268 }, |
| 269 | 269 |
| 270 __proto__: WebInspector.TargetAwareObject.prototype | 270 __proto__: WebInspector.SDKObject.prototype |
| 271 }; | 271 }; |
| 272 | 272 |
| 273 /** | 273 /** |
| 274 * @constructor | 274 * @constructor |
| 275 * @extends {WebInspector.LayerTreeBase} | 275 * @extends {WebInspector.LayerTreeBase} |
| 276 * @param {!WebInspector.Target} target | 276 * @param {!WebInspector.Target} target |
| 277 */ | 277 */ |
| 278 WebInspector.TracingLayerTree = function(target) | 278 WebInspector.TracingLayerTree = function(target) |
| 279 { | 279 { |
| 280 WebInspector.LayerTreeBase.call(this, target); | 280 WebInspector.LayerTreeBase.call(this, target); |
| (...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1178 | 1178 |
| 1179 /** | 1179 /** |
| 1180 * @param {!LayerTreeAgent.LayerId} layerId | 1180 * @param {!LayerTreeAgent.LayerId} layerId |
| 1181 * @param {!DOMAgent.Rect} clipRect | 1181 * @param {!DOMAgent.Rect} clipRect |
| 1182 */ | 1182 */ |
| 1183 layerPainted: function(layerId, clipRect) | 1183 layerPainted: function(layerId, clipRect) |
| 1184 { | 1184 { |
| 1185 this._layerTreeModel._layerPainted(layerId, clipRect); | 1185 this._layerTreeModel._layerPainted(layerId, clipRect); |
| 1186 } | 1186 } |
| 1187 } | 1187 } |
| OLD | NEW |