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

Unified Diff: third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeElement.js

Issue 2770743004: DevTools: improve $0 selected element hint in elements (Closed)
Patch Set: ac Created 3 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
Index: third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeElement.js
diff --git a/third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeElement.js b/third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeElement.js
index d5492c6ad3d960b075018923be879930be00870b..79884d53b03d35f25f25329d985a8430f63f8c41 100644
--- a/third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeElement.js
+++ b/third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeElement.js
@@ -236,6 +236,9 @@ Elements.ElementsTreeElement = class extends UI.TreeElement {
this.selectionElement.className = 'selection fill';
this.selectionElement.style.setProperty('margin-left', (-this._computeLeftIndent()) + 'px');
listItemElement.insertBefore(this.selectionElement, listItemElement.firstChild);
+
+ var hintElement = listItemElement.createChild('div', 'selected-hint');
lushnikov 2017/03/24 22:05:11 you gonna re-create this multiple times on .update
luoe 2017/03/25 01:38:23 I've added a check to make sure a hintElement does
+ hintElement.title = Common.UIString('Use $0 in the console to refer to this element.');
}
}

Powered by Google App Engine
This is Rietveld 408576698