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

Unified Diff: Source/devtools/front_end/LayerTree.js

Issue 206123005: Use simple CSS selectors to identify elements in Layer's panel tree view (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months 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
« no previous file with comments | « no previous file | Source/devtools/front_end/Layers3DView.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/LayerTree.js
diff --git a/Source/devtools/front_end/LayerTree.js b/Source/devtools/front_end/LayerTree.js
index 439c091ef777a45f5cd9fdbf32358b39f717d242..170e5e7c2f194b21efdc9f3011b121c02a3c5718 100644
--- a/Source/devtools/front_end/LayerTree.js
+++ b/Source/devtools/front_end/LayerTree.js
@@ -159,7 +159,7 @@ WebInspector.LayerTree.prototype = {
var layer = /** @type {!WebInspector.Layer} */ (node.representedObject);
if (!layer)
return;
- var nodeId = layer.nodeId();
+ var nodeId = layer.nodeIdForSelfOrAncestor();
if (!nodeId)
return;
var domNode = WebInspector.domAgent.nodeForId(nodeId);
@@ -201,7 +201,7 @@ WebInspector.LayerTreeElement.prototype = {
var node = nodeId ? WebInspector.domAgent.nodeForId(nodeId) : null;
var title = document.createDocumentFragment();
title.createChild("div", "selection");
- title.appendChild(document.createTextNode(node ? WebInspector.DOMPresentationUtils.fullQualifiedSelector(node, false) : "#" + layer.id()));
+ title.appendChild(document.createTextNode(node ? WebInspector.DOMPresentationUtils.simpleSelector(node) : "#" + layer.id()));
var details = title.createChild("span", "dimmed");
details.textContent = WebInspector.UIString(" (%d × %d)", layer.width(), layer.height());
this.title = title;
« no previous file with comments | « no previous file | Source/devtools/front_end/Layers3DView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698