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

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

Issue 2372303003: DevTools: introduce external service client (behind experiment). (Closed)
Patch Set: external linter Created 4 years, 3 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/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 bc4af9ba13e484b657ff7ac471fe64203eaaaa76..e01fd5b4fbe56db95b7ddd284983b98bc457d374 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/Widget.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/Widget.js
@@ -153,6 +153,14 @@ WebInspector.Widget.prototype = {
this._callOnVisibleChildren(this._processWasShown);
},
+ _processWasDetachedFromHierarchy: function()
+ {
+ this._notify(this.wasDetachedFromHierarchy);
+ var copy = this._children.slice();
+ for (var widget of copy)
+ widget._processWasDetachedFromHierarchy();
+ },
+
_processWillHide: function()
{
if (this._inNotification())
@@ -200,6 +208,10 @@ WebInspector.Widget.prototype = {
{
},
+ wasDetachedFromHierarchy: function()
+ {
+ },
+
onResize: function()
{
},
@@ -338,6 +350,7 @@ WebInspector.Widget.prototype = {
this._parentWidget.childWasDetached(this);
var parent = this._parentWidget;
this._parentWidget = null;
+ this._processWasDetachedFromHierarchy();
} else {
WebInspector.Widget.__assert(this._isRoot, "Removing non-root widget from DOM");
}

Powered by Google App Engine
This is Rietveld 408576698