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

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: 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
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 611e1ae8c1d900a2defc39fcdb813e7137492c80..1606d72473015cef4d79b448b976a7182e8f569a 100644
--- a/Source/devtools/front_end/ui/View.js
+++ b/Source/devtools/front_end/ui/View.js
@@ -106,6 +106,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;
@@ -272,7 +286,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())
« Source/devtools/front_end/ui/SplitView.js ('K') | « 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