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

Unified Diff: Source/devtools/front_end/layers/LayersPanel.js

Issue 711423002: DevTools: better visual feedback for hovered objects is Layers3DView (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: addressed review comments, fixed test Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/layers/LayersPanel.js
diff --git a/Source/devtools/front_end/layers/LayersPanel.js b/Source/devtools/front_end/layers/LayersPanel.js
index d00524c440f1b8a8b84feaf806089235eb00b3eb..961e36a06c2923d99a23f0998521d5c24e6472bf 100644
--- a/Source/devtools/front_end/layers/LayersPanel.js
+++ b/Source/devtools/front_end/layers/LayersPanel.js
@@ -163,8 +163,8 @@ WebInspector.LayersPanel.prototype = {
*/
_onObjectSelected: function(event)
{
- var activeObject = /** @type {!WebInspector.Layers3DView.ActiveObject} */ (event.data);
- this._selectObject(activeObject);
+ var selection = /** @type {!WebInspector.Layers3DView.Selection} */ (event.data);
+ this._selectObject(selection);
},
/**
@@ -172,8 +172,8 @@ WebInspector.LayersPanel.prototype = {
*/
_onObjectHovered: function(event)
{
- var activeObject = /** @type {!WebInspector.Layers3DView.ActiveObject} */ (event.data);
- this._hoverObject(activeObject);
+ var selection = /** @type {!WebInspector.Layers3DView.Selection} */ (event.data);
+ this._hoverObject(selection);
},
/**
@@ -187,40 +187,40 @@ WebInspector.LayersPanel.prototype = {
},
/**
- * @param {?WebInspector.Layers3DView.ActiveObject} activeObject
+ * @param {?WebInspector.Layers3DView.Selection} selection
*/
- _selectObject: function(activeObject)
+ _selectObject: function(selection)
{
- var layer = activeObject && activeObject.layer;
- if (this._currentlySelectedLayer === activeObject)
+ var layer = selection && selection.layer;
+ if (this._currentlySelectedLayer === selection)
return;
- this._currentlySelectedLayer = activeObject;
+ this._currentlySelectedLayer = selection;
var node = layer ? layer.nodeForSelfOrAncestor() : null;
if (node)
node.highlightForTwoSeconds();
else if (this._target)
this._target.domModel.hideDOMNodeHighlight();
this._layerTreeOutline.selectLayer(layer);
- this._layers3DView.selectObject(activeObject);
- this._layerDetailsView.setObject(activeObject);
+ this._layers3DView.selectObject(selection);
+ this._layerDetailsView.setObject(selection);
},
/**
- * @param {?WebInspector.Layers3DView.ActiveObject} activeObject
+ * @param {?WebInspector.Layers3DView.Selection} selection
*/
- _hoverObject: function(activeObject)
+ _hoverObject: function(selection)
{
- var layer = activeObject && activeObject.layer;
- if (this._currentlyHoveredLayer === activeObject)
+ var layer = selection && selection.layer;
+ if (this._currentlyHoveredLayer === selection)
return;
- this._currentlyHoveredLayer = activeObject;
+ this._currentlyHoveredLayer = selection;
var node = layer ? layer.nodeForSelfOrAncestor() : null;
if (node)
node.highlight();
else if (this._target)
this._target.domModel.hideDOMNodeHighlight();
this._layerTreeOutline.hoverLayer(layer);
- this._layers3DView.hoverObject(activeObject);
+ this._layers3DView.hoverObject(selection);
},
__proto__: WebInspector.PanelWithSidebarTree.prototype
« no previous file with comments | « LayoutTests/inspector/layers/layers-3d-view-hit-testing.html ('k') | Source/devtools/front_end/timeline/LayerDetailsView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698