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

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

Issue 2617293002: DevTools: TabbedLocations only materialize tabs when needed (Closed)
Patch Set: DevTools: materialize container widgets only when they are shown Created 3 years, 11 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 | « no previous file | 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/View.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/View.js b/third_party/WebKit/Source/devtools/front_end/ui/View.js
index a0eef03dbb35105eaa0eb06bb677515113e6c789..1e157e93944925775162f6d7471b53d555ab1a87 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/View.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/View.js
@@ -442,6 +442,13 @@ UI.ViewManager._ContainerWidget = class extends UI.VBox {
this._materializePromise = Promise.all(promises);
return this._materializePromise;
}
+
+ /**
+ * @override
+ */
+ wasShown() {
+ this._materialize();
+ }
};
/**
@@ -709,7 +716,8 @@ UI.ViewManager._TabbedLocation = class extends UI.ViewManager._Location {
this.appendView(view, insertBefore);
this._tabbedPane.selectTab(view.viewId());
this._tabbedPane.focus();
- return this._materializeWidget(view);
+ var widget = /** @type {!UI.ViewManager._ContainerWidget} */ (this._tabbedPane.tabView(view.viewId()));
+ return widget._materialize();
}
/**
@@ -737,8 +745,6 @@ UI.ViewManager._TabbedLocation = class extends UI.ViewManager._Location {
if (!view)
return;
- this._materializeWidget(view);
-
if (view.isCloseable()) {
var tabs = this._closeableTabSetting.get();
if (!tabs[tabId]) {
@@ -761,15 +767,6 @@ UI.ViewManager._TabbedLocation = class extends UI.ViewManager._Location {
}
/**
- * @param {!UI.View} view
- * @return {!Promise}
- */
- _materializeWidget(view) {
- var widget = /** @type {!UI.ViewManager._ContainerWidget} */ (this._tabbedPane.tabView(view.viewId()));
- return widget._materialize();
- }
-
- /**
* @param {!Common.Event} event
*/
_persistTabOrder(event) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698