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

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

Issue 1318903007: Devtools UI: Fix tooltip issues (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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: Source/devtools/front_end/elements/ElementsTreeElement.js
diff --git a/Source/devtools/front_end/elements/ElementsTreeElement.js b/Source/devtools/front_end/elements/ElementsTreeElement.js
index 4955094d33c9dcf6ce32dcae93aac5e2c8241372..c6f60faa8644f54f6904a82e14941643f3fac9b6 100644
--- a/Source/devtools/front_end/elements/ElementsTreeElement.js
+++ b/Source/devtools/front_end/elements/ElementsTreeElement.js
@@ -1132,10 +1132,11 @@ WebInspector.ElementsTreeElement.prototype = {
return;
var colors = new Set();
- var titles = [];
+ var titles = createElement("div");
for (var decoration of decorations) {
- titles.push(decoration.title);
+ var titleElement = titles.createChild("div");
+ titleElement.textContent = decoration.title;
colors.add(decoration.color);
}
if (this.expanded && !decorations.length)
@@ -1143,9 +1144,12 @@ WebInspector.ElementsTreeElement.prototype = {
var descendantColors = new Set();
if (descendantDecorations.length) {
- titles.push(WebInspector.UIString("Children:"));
+ var element = titles.createChild("div");
+ element.textContent = WebInspector.UIString("Children:");
for (var decoration of descendantDecorations) {
- titles.push(decoration.title);
+ element = titles.createChild("div");
+ element.style.marginLeft = "15px";
+ element.textContent = decoration.title;
descendantColors.add(decoration.color);
}
}
@@ -1154,7 +1158,7 @@ WebInspector.ElementsTreeElement.prototype = {
processColors.call(this, colors, "elements-gutter-decoration");
if (!this.expanded)
processColors.call(this, descendantColors, "elements-gutter-decoration elements-has-decorated-children");
- WebInspector.Tooltip.install(this._decorationsElement, titles.join("\n"));
+ WebInspector.Tooltip.install(this._decorationsElement, titles);
/**
* @param {!Set<string>} colors

Powered by Google App Engine
This is Rietveld 408576698