| Index: third_party/WebKit/Source/devtools/front_end/ui/ViewContainers.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/ui/ViewContainers.js b/third_party/WebKit/Source/devtools/front_end/ui/ViewContainers.js
|
| index 5f79c4cd59a082013226e3bfc93c03b3108bf816..df45b20703508cc216e4341717710ea5b7099513 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/ui/ViewContainers.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/ui/ViewContainers.js
|
| @@ -44,12 +44,13 @@ WebInspector.View._ExpandableContainerWidget = function(view, expanded)
|
| this._titleElement.addEventListener("click", this._toggleExpanded.bind(this), false);
|
| this._titleElement.addEventListener("keydown", this._onTitleKeyDown.bind(this), false);
|
| this.contentElement.insertBefore(this._titleElement, this.contentElement.firstChild);
|
| +
|
| var toolbarElement = this.contentElement.createChild("div");
|
| var toolbarItems = view.toolbarItems();
|
| if (toolbarItems.length) {
|
| - var toolbar = new WebInspector.Toolbar("", this._titleElement);
|
| + this._toolbar = new WebInspector.Toolbar("");
|
| for (var item of toolbarItems)
|
| - toolbar.appendToolbarItem(item);
|
| + this._toolbar.appendToolbarItem(item);
|
| }
|
|
|
| this.contentElement.createChild("content");
|
| @@ -72,6 +73,8 @@ WebInspector.View._ExpandableContainerWidget.prototype = {
|
| {
|
| if (this._titleElement.classList.contains("expanded"))
|
| return true;
|
| + if (this._toolbar)
|
| + this._titleElement.appendChild(this._toolbar.element);
|
| this._titleElement.classList.add("expanded");
|
| this._view.showWidget(this.element);
|
| return true;
|
| @@ -81,6 +84,8 @@ WebInspector.View._ExpandableContainerWidget.prototype = {
|
| {
|
| if (!this._titleElement.classList.contains("expanded"))
|
| return;
|
| + if (this._toolbar)
|
| + this._toolbar.element.remove();
|
| this._titleElement.classList.remove("expanded");
|
| this._view.hideWidget();
|
| },
|
|
|