Index: third_party/WebKit/Source/devtools/front_end/ui/treeoutline.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/treeoutline.js b/third_party/WebKit/Source/devtools/front_end/ui/treeoutline.js |
index 8755e42582864edcee8e228bd7b2492e2d2dd1db..00db255fcad1ddc430afa7e4654cdaedbb00a733 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/ui/treeoutline.js |
+++ b/third_party/WebKit/Source/devtools/front_end/ui/treeoutline.js |
@@ -602,7 +602,8 @@ var TreeElement = class { |
this._listItemNode.removeChildren(); |
if (this._iconElement) |
this._listItemNode.appendChild(this._iconElement); |
- |
+ if (this._leadingIconsElement) |
+ this._listItemNode.appendChild(this._leadingIconsElement); |
this._listItemNode.appendChild(this._titleElement); |
if (this._trailingIconsElement) |
this._listItemNode.appendChild(this._trailingIconsElement); |
@@ -639,11 +640,27 @@ var TreeElement = class { |
/** |
* @param {!Array<!UI.Icon>} icons |
*/ |
+ setLeadingIcons(icons) { |
+ if (!this._leadingIconsElement && !icons.length) |
+ return; |
+ if (!this._leadingIconsElement) { |
+ this._leadingIconsElement = createElementWithClass('div', 'leading-icons'); |
+ this._listItemNode.insertBefore(this._leadingIconsElement, this._titleElement); |
+ this._ensureSelection(); |
+ } |
+ this._leadingIconsElement.removeChildren(); |
+ for (var icon of icons) |
+ this._leadingIconsElement.appendChild(icon); |
+ } |
+ |
+ /** |
+ * @param {!Array<!UI.Icon>} icons |
+ */ |
setTrailingIcons(icons) { |
if (!this._trailingIconsElement && !icons.length) |
return; |
if (!this._trailingIconsElement) { |
- this._trailingIconsElement = createElementWithClass('div', 'icons-container'); |
+ this._trailingIconsElement = createElementWithClass('div', 'trailing-icons'); |
this._listItemNode.appendChild(this._trailingIconsElement); |
this._ensureSelection(); |
} |