Chromium Code Reviews| 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..b30ce0a4766c94a82d009b86b119c3347fb0879f 100644 |
| --- a/Source/devtools/front_end/elements/ElementsTreeElement.js |
| +++ b/Source/devtools/front_end/elements/ElementsTreeElement.js |
| @@ -1132,10 +1132,10 @@ WebInspector.ElementsTreeElement.prototype = { |
| return; |
| var colors = new Set(); |
| - var titles = []; |
| + var titles = createElement("div"); |
| for (var decoration of decorations) { |
| - titles.push(decoration.title); |
| + titles.createTextChild(decoration.title); |
|
dgozman
2015/08/28 00:16:32
Should be div, or they would collapse.
samli
2015/08/28 01:32:14
done.
|
| colors.add(decoration.color); |
| } |
| if (this.expanded && !decorations.length) |
| @@ -1143,9 +1143,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 +1157,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 |