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

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

Issue 2180853003: DevTools: follow up to the widget hierarchy change, account for local widget reparending. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/components/widget-events-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/ui/Widget.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/Widget.js b/third_party/WebKit/Source/devtools/front_end/ui/Widget.js
index b572002b46ed8753ca1e848f56e24812e1d2e2a3..8866bcbbb9a657a22e65854575a88dfd4239d2c0 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/Widget.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/Widget.js
@@ -256,11 +256,13 @@ WebInspector.Widget.prototype = {
else
WebInspector.Widget.__assert(currentParent && currentParent.__widget === this._parentWidget, "Attempt to show under node belonging to alien widget");
- if (this._visible)
+ var wasVisible = this._visible;
+ if (wasVisible && this.element.parentElement === parentElement)
return;
+
this._visible = true;
- if (this._parentIsShowing())
+ if (!wasVisible && this._parentIsShowing())
this._processWillShow();
this.element.classList.remove("hidden");
@@ -274,7 +276,7 @@ WebInspector.Widget.prototype = {
WebInspector.Widget._originalAppendChild.call(parentElement, this.element);
}
- if (this._parentIsShowing())
+ if (!wasVisible && this._parentIsShowing())
this._processWasShown();
if (this._parentWidget && this._hasNonZeroConstraints())
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/components/widget-events-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698