Index: third_party/WebKit/Source/devtools/front_end/ui/SplitWidget.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/SplitWidget.js b/third_party/WebKit/Source/devtools/front_end/ui/SplitWidget.js |
index 6a52c0c667567db40dae131251d5d99ebb83c2d0..b21d03e4e858b67f8c4aec2b41a25a4fbe7b8d3c 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/ui/SplitWidget.js |
+++ b/third_party/WebKit/Source/devtools/front_end/ui/SplitWidget.js |
@@ -152,15 +152,18 @@ WebInspector.SplitWidget.prototype = { |
{ |
if (this._mainWidget === widget) |
return; |
+ this.suspendInvalidations(); |
if (this._mainWidget) |
this._mainWidget.detach(); |
this._mainWidget = widget; |
if (widget) { |
widget.element.classList.add("insertion-point-main"); |
widget.element.classList.remove("insertion-point-sidebar"); |
+ widget.attach(this.element, this._sidebarWidget ? this._sidebarWidget.element : null); |
if (this._showMode === WebInspector.SplitWidget.ShowMode.OnlyMain || this._showMode === WebInspector.SplitWidget.ShowMode.Both) |
- widget.show(this.element); |
+ widget.showWidget(); |
} |
+ this.resumeInvalidations(); |
}, |
/** |
@@ -170,15 +173,18 @@ WebInspector.SplitWidget.prototype = { |
{ |
if (this._sidebarWidget === widget) |
return; |
+ this.suspendInvalidations(); |
if (this._sidebarWidget) |
this._sidebarWidget.detach(); |
this._sidebarWidget = widget; |
if (widget) { |
widget.element.classList.add("insertion-point-sidebar"); |
widget.element.classList.remove("insertion-point-main"); |
+ widget.attach(this.element); |
if (this._showMode === WebInspector.SplitWidget.ShowMode.OnlySidebar || this._showMode === WebInspector.SplitWidget.ShowMode.Both) |
- widget.show(this.element); |
+ widget.showWidget(); |
} |
+ this.resumeInvalidations(); |
}, |
/** |
@@ -203,8 +209,6 @@ WebInspector.SplitWidget.prototype = { |
*/ |
childWasDetached: function(widget) |
{ |
- if (this._detaching) |
- return; |
if (this._mainWidget === widget) |
delete this._mainWidget; |
if (this._sidebarWidget === widget) |
@@ -316,15 +320,12 @@ WebInspector.SplitWidget.prototype = { |
if (sideToShow) { |
// Make sure main is first in the children list. |
if (sideToShow === this._mainWidget) |
- this._mainWidget.show(this.element, this._sidebarWidget ? this._sidebarWidget.element : null); |
+ this._mainWidget.showWidget(); |
else |
- this._sidebarWidget.show(this.element); |
- } |
- if (sideToHide) { |
- this._detaching = true; |
- sideToHide.detach(); |
- delete this._detaching; |
+ this._sidebarWidget.showWidget(); |
} |
+ if (sideToHide) |
+ sideToHide.hideWidget(); |
this._resizerElement.classList.add("hidden"); |
shadowToShow.classList.remove("hidden"); |
@@ -379,10 +380,12 @@ WebInspector.SplitWidget.prototype = { |
this.setResizable(true); |
// Make sure main is the first in the children list. |
+ this.suspendInvalidations(); |
if (this._sidebarWidget) |
- this._sidebarWidget.show(this.element); |
+ this._sidebarWidget.showWidget(); |
if (this._mainWidget) |
- this._mainWidget.show(this.element, this._sidebarWidget ? this._sidebarWidget.element : null); |
+ this._mainWidget.showWidget(); |
+ this.resumeInvalidations(); |
// Order widgets in DOM properly. |
this.setSecondIsSidebar(this._secondIsSidebar); |