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

Unified Diff: Source/devtools/front_end/ui/View.js

Issue 713053002: DevTools: do not detach views that should be hidden upon detach. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: same with the gyp fix. Created 6 years, 1 month 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
« no previous file with comments | « Source/devtools/front_end/ui/SplitView.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/ui/View.js
diff --git a/Source/devtools/front_end/ui/View.js b/Source/devtools/front_end/ui/View.js
index 95b55ca3d40dfb1b1c55e9d38725971afe634b95..604134c8599f90496abdfb8d0d5cf88c53e458f0 100644
--- a/Source/devtools/front_end/ui/View.js
+++ b/Source/devtools/front_end/ui/View.js
@@ -102,6 +102,20 @@ WebInspector.View.prototype = {
return this._isShowing;
},
+ /**
+ * @return {boolean}
+ */
+ _shouldHideOnDetach: function()
+ {
+ if (this._hideOnDetach)
+ return true;
+ for (var child of this._children) {
+ if (child._shouldHideOnDetach())
+ return true;
+ }
+ return false;
+ },
+
setHideOnDetach: function()
{
this._hideOnDetach = true;
@@ -268,7 +282,7 @@ WebInspector.View.prototype = {
if (this._parentIsShowing())
this._processWillHide();
- if (this._hideOnDetach && !overrideHideOnDetach) {
+ if (!overrideHideOnDetach && this._shouldHideOnDetach()) {
this.element.classList.remove("visible");
this._visible = false;
if (this._parentIsShowing())
« no previous file with comments | « Source/devtools/front_end/ui/SplitView.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698