| Index: Source/devtools/front_end/ui/SplitView.js
|
| diff --git a/Source/devtools/front_end/ui/SplitView.js b/Source/devtools/front_end/ui/SplitView.js
|
| index 543991d3187724f7e6ae284c2c935cc067594ada..41cc1de27a127ddb903377a2f8590d124accbc6e 100644
|
| --- a/Source/devtools/front_end/ui/SplitView.js
|
| +++ b/Source/devtools/front_end/ui/SplitView.js
|
| @@ -52,13 +52,8 @@ WebInspector.SplitView = function(isVertical, secondIsSidebar, settingName, defa
|
|
|
| this._resizerElement = this.element.createChild("div", "split-view-resizer");
|
| this._resizerElement.createChild("div", "split-view-resizer-border");
|
| - if (secondIsSidebar) {
|
| - this._mainView.show(this.element);
|
| - this._sidebarView.show(this.element);
|
| - } else {
|
| - this._sidebarView.show(this.element);
|
| - this._mainView.show(this.element);
|
| - }
|
| + this._mainView.show(this.element);
|
| + this._sidebarView.show(this.element);
|
|
|
| this._resizerWidget = new WebInspector.ResizerWidget();
|
| this._resizerWidget.setEnabled(true);
|
| @@ -202,16 +197,7 @@ WebInspector.SplitView.prototype = {
|
| this._mainElement.classList.toggle("split-view-contents-second", !secondIsSidebar);
|
| this._sidebarElement.classList.toggle("split-view-contents-first", !secondIsSidebar);
|
| this._sidebarElement.classList.toggle("split-view-contents-second", secondIsSidebar);
|
| -
|
| - // Make sure second is last in the children array.
|
| - if (secondIsSidebar) {
|
| - if (this._sidebarElement.parentElement && this._sidebarElement.nextSibling)
|
| - this.element.appendChild(this._sidebarElement);
|
| - } else {
|
| - if (this._mainElement.parentElement && this._mainElement.nextSibling)
|
| - this.element.appendChild(this._mainElement);
|
| - }
|
| -
|
| + this.element.classList.toggle("split-view-first-is-sidebar", !secondIsSidebar);
|
| this._secondIsSidebar = secondIsSidebar;
|
| },
|
|
|
| @@ -284,7 +270,11 @@ WebInspector.SplitView.prototype = {
|
| */
|
| function callback()
|
| {
|
| - sideToShow.show(this.element);
|
| + // Make sure main is first in the children list.
|
| + if (sideToShow === this._mainView)
|
| + this._mainView.show(this.element, this._sidebarView.element);
|
| + else
|
| + this._sidebarView.show(this.element);
|
| sideToHide.detach();
|
| sideToShow.element.classList.add("maximized");
|
| sideToHide.element.classList.remove("maximized");
|
| @@ -336,7 +326,8 @@ WebInspector.SplitView.prototype = {
|
| this._sidebarElement.classList.remove("maximized");
|
| this._resizerElement.classList.remove("hidden");
|
|
|
| - this._mainView.show(this.element);
|
| + // Make sure main is the first in the children list.
|
| + this._mainView.show(this.element, this._sidebarView.element);
|
| this._sidebarView.show(this.element);
|
| // Order views in DOM properly.
|
| this.setSecondIsSidebar(this._secondIsSidebar);
|
|
|