Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/SplitWidget.js

Issue 2157363006: DevTools: keep widgets in widget hierarchy upon hide, split attach/detach cycle from show/hide. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lcean Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..fca916b0bcaf6a1ba3ef3e0e3f8b3bd869bd9d9c 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/SplitWidget.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/SplitWidget.js
@@ -158,8 +158,9 @@ WebInspector.SplitWidget.prototype = {
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();
}
},
@@ -176,8 +177,9 @@ WebInspector.SplitWidget.prototype = {
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();
}
},
@@ -316,13 +318,13 @@ 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);
+ this._sidebarWidget.showWidget();
}
if (sideToHide) {
this._detaching = true;
- sideToHide.detach();
+ sideToHide.hideWidget();
delete this._detaching;
}
@@ -380,9 +382,9 @@ WebInspector.SplitWidget.prototype = {
// Make sure main is the first in the children list.
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();
// Order widgets in DOM properly.
this.setSecondIsSidebar(this._secondIsSidebar);

Powered by Google App Engine
This is Rietveld 408576698