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

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

Issue 83123002: DevTools: Move DOMNode.appropriateSelectorFor() into DOMPresentationUtil. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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/LayerTree.js
diff --git a/Source/devtools/front_end/LayerTree.js b/Source/devtools/front_end/LayerTree.js
index e09892c0b8168ea8243392b70c9adf5ecfb1643b..1a6b1d0854317af18c953d7f73883e07989f955c 100644
--- a/Source/devtools/front_end/LayerTree.js
+++ b/Source/devtools/front_end/LayerTree.js
@@ -198,10 +198,10 @@ WebInspector.LayerTreeElement.prototype = {
{
var layer = /** @type {WebInspector.Layer} */ (this.representedObject);
var nodeId = layer.nodeIdForSelfOrAncestor();
- var node = nodeId && WebInspector.domAgent.nodeForId(nodeId);
+ var node = nodeId ? WebInspector.domAgent.nodeForId(nodeId) : null;
var title = document.createDocumentFragment();
title.createChild("div", "selection");
- title.appendChild(document.createTextNode(node ? node.appropriateSelectorFor(false) : "#" + layer.id()));
+ title.appendChild(document.createTextNode(node ? WebInspector.DOMPresentationUtils.appropriateSelectorFor(node, false) : "#" + 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 | « Source/devtools/front_end/EventListenersSidebarPane.js ('k') | Source/devtools/front_end/StylesSidebarPane.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698