| 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 /** | 139 /** |
| 140 * @param {?WebInspector.Layer} layer | 140 * @param {?WebInspector.Layer} layer |
| 141 */ | 141 */ |
| 142 _selectLayer: function(layer) | 142 _selectLayer: function(layer) |
| 143 { | 143 { |
| 144 if (this._currentlySelectedLayer === layer) | 144 if (this._currentlySelectedLayer === layer) |
| 145 return; | 145 return; |
| 146 this._currentlySelectedLayer = layer; | 146 this._currentlySelectedLayer = layer; |
| 147 var nodeId = layer && layer.nodeIdForSelfOrAncestor(); | 147 var nodeId = layer && layer.nodeIdForSelfOrAncestor(); |
| 148 if (nodeId) | 148 if (nodeId) |
| 149 WebInspector.domAgent.highlightDOMNodeForTwoSeconds(nodeId); | 149 WebInspector.domModel.highlightDOMNodeForTwoSeconds(nodeId); |
| 150 else | 150 else |
| 151 WebInspector.domAgent.hideDOMNodeHighlight(); | 151 WebInspector.domModel.hideDOMNodeHighlight(); |
| 152 this._layerTree.selectLayer(layer); | 152 this._layerTree.selectLayer(layer); |
| 153 this._layers3DView.selectLayer(layer); | 153 this._layers3DView.selectLayer(layer); |
| 154 this._layerDetailsView.setLayer(layer); | 154 this._layerDetailsView.setLayer(layer); |
| 155 }, | 155 }, |
| 156 | 156 |
| 157 /** | 157 /** |
| 158 * @param {?WebInspector.Layer} layer | 158 * @param {?WebInspector.Layer} layer |
| 159 */ | 159 */ |
| 160 _hoverLayer: function(layer) | 160 _hoverLayer: function(layer) |
| 161 { | 161 { |
| 162 if (this._currentlyHoveredLayer === layer) | 162 if (this._currentlyHoveredLayer === layer) |
| 163 return; | 163 return; |
| 164 this._currentlyHoveredLayer = layer; | 164 this._currentlyHoveredLayer = layer; |
| 165 var nodeId = layer && layer.nodeIdForSelfOrAncestor(); | 165 var nodeId = layer && layer.nodeIdForSelfOrAncestor(); |
| 166 if (nodeId) | 166 if (nodeId) |
| 167 WebInspector.domAgent.highlightDOMNode(nodeId); | 167 WebInspector.domModel.highlightDOMNode(nodeId); |
| 168 else | 168 else |
| 169 WebInspector.domAgent.hideDOMNodeHighlight(); | 169 WebInspector.domModel.hideDOMNodeHighlight(); |
| 170 this._layerTree.hoverLayer(layer); | 170 this._layerTree.hoverLayer(layer); |
| 171 this._layers3DView.hoverLayer(layer); | 171 this._layers3DView.hoverLayer(layer); |
| 172 }, | 172 }, |
| 173 | 173 |
| 174 __proto__: WebInspector.PanelWithSidebarTree.prototype | 174 __proto__: WebInspector.PanelWithSidebarTree.prototype |
| 175 } | 175 } |
| 176 | 176 |
| 177 /** | 177 /** |
| 178 * @constructor | 178 * @constructor |
| 179 * @implements {WebInspector.Revealer} | 179 * @implements {WebInspector.Revealer} |
| 180 */ | 180 */ |
| 181 WebInspector.LayersPanel.LayerTreeRevealer = function() | 181 WebInspector.LayersPanel.LayerTreeRevealer = function() |
| 182 { | 182 { |
| 183 } | 183 } |
| 184 | 184 |
| 185 WebInspector.LayersPanel.LayerTreeRevealer.prototype = { | 185 WebInspector.LayersPanel.LayerTreeRevealer.prototype = { |
| 186 /** | 186 /** |
| 187 * @param {!Object} layerTree | 187 * @param {!Object} layerTree |
| 188 */ | 188 */ |
| 189 reveal: function(layerTree) | 189 reveal: function(layerTree) |
| 190 { | 190 { |
| 191 if (layerTree instanceof WebInspector.LayerTreeSnapshot) | 191 if (layerTree instanceof WebInspector.LayerTreeSnapshot) |
| 192 /** @type {!WebInspector.LayersPanel} */ (WebInspector.inspectorView
.showPanel("layers"))._showSnapshot(layerTree); | 192 /** @type {!WebInspector.LayersPanel} */ (WebInspector.inspectorView
.showPanel("layers"))._showSnapshot(layerTree); |
| 193 } | 193 } |
| 194 } | 194 } |
| OLD | NEW |