| 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 * @extends {WebInspector.PanelWithSidebarTree} | 37 * @extends {WebInspector.PanelWithSidebarTree} |
| 38 */ | 38 */ |
| 39 WebInspector.LayersPanel = function() | 39 WebInspector.LayersPanel = function() |
| 40 { | 40 { |
| 41 WebInspector.PanelWithSidebarTree.call(this, "layers", 225); | 41 WebInspector.PanelWithSidebarTree.call(this, "layers", 225); |
| 42 this.registerRequiredCSS("layersPanel.css"); | 42 this.registerRequiredCSS("layersPanel.css"); |
| 43 | 43 |
| 44 this.sidebarElement().classList.add("outline-disclosure"); | 44 this.sidebarElement().classList.add("outline-disclosure"); |
| 45 this.sidebarTree.element.classList.remove("sidebar-tree"); | 45 this.sidebarTree.element.classList.remove("sidebar-tree"); |
| 46 | 46 |
| 47 this._target = /** @type {!WebInspector.Target} */ (WebInspector.targetManag
er.activeTarget()); | 47 this._target = /** @type {!WebInspector.Target} */ (WebInspector.targetManag
er.mainTarget()); |
| 48 this._model = new WebInspector.LayerTreeModel(this._target); | 48 this._model = new WebInspector.LayerTreeModel(this._target); |
| 49 this._model.addEventListener(WebInspector.LayerTreeModel.Events.LayerTreeCha
nged, this._onLayerTreeUpdated, this); | 49 this._model.addEventListener(WebInspector.LayerTreeModel.Events.LayerTreeCha
nged, this._onLayerTreeUpdated, this); |
| 50 this._model.addEventListener(WebInspector.LayerTreeModel.Events.LayerPainted
, this._onLayerPainted, this); | 50 this._model.addEventListener(WebInspector.LayerTreeModel.Events.LayerPainted
, this._onLayerPainted, this); |
| 51 this._currentlySelectedLayer = null; | 51 this._currentlySelectedLayer = null; |
| 52 this._currentlyHoveredLayer = null; | 52 this._currentlyHoveredLayer = null; |
| 53 | 53 |
| 54 this._layerTreeOutline = new WebInspector.LayerTreeOutline(this.sidebarTree)
; | 54 this._layerTreeOutline = new WebInspector.LayerTreeOutline(this.sidebarTree)
; |
| 55 this._layerTreeOutline.addEventListener(WebInspector.LayerTreeOutline.Events
.LayerSelected, this._onObjectSelected, this); | 55 this._layerTreeOutline.addEventListener(WebInspector.LayerTreeOutline.Events
.LayerSelected, this._onObjectSelected, this); |
| 56 this._layerTreeOutline.addEventListener(WebInspector.LayerTreeOutline.Events
.LayerHovered, this._onObjectHovered, this); | 56 this._layerTreeOutline.addEventListener(WebInspector.LayerTreeOutline.Events
.LayerHovered, this._onObjectHovered, this); |
| 57 | 57 |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 */ | 214 */ |
| 215 reveal: function(snapshotData) | 215 reveal: function(snapshotData) |
| 216 { | 216 { |
| 217 if (!(snapshotData instanceof WebInspector.DeferredLayerTree)) | 217 if (!(snapshotData instanceof WebInspector.DeferredLayerTree)) |
| 218 return; | 218 return; |
| 219 var panel = /** @type {?WebInspector.LayersPanel} */ (WebInspector.inspe
ctorView.showPanel("layers")); | 219 var panel = /** @type {?WebInspector.LayersPanel} */ (WebInspector.inspe
ctorView.showPanel("layers")); |
| 220 if (panel) | 220 if (panel) |
| 221 panel._showLayerTree(/** @type {!WebInspector.DeferredLayerTree} */
(snapshotData)); | 221 panel._showLayerTree(/** @type {!WebInspector.DeferredLayerTree} */
(snapshotData)); |
| 222 } | 222 } |
| 223 } | 223 } |
| OLD | NEW |