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

Unified Diff: third_party/WebKit/Source/devtools/front_end/perf_ui/TimelineOverviewPane.js

Issue 2888683002: DevTools: Fix timeline overview popover sticking at last (Closed)
Patch Set: Created 3 years, 7 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 | third_party/WebKit/Source/devtools/front_end/perf_ui/timelineOverviewInfo.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/perf_ui/TimelineOverviewPane.js
diff --git a/third_party/WebKit/Source/devtools/front_end/perf_ui/TimelineOverviewPane.js b/third_party/WebKit/Source/devtools/front_end/perf_ui/TimelineOverviewPane.js
index f517e655f16a5a3090d8bb0e7aacaeebde2ac8d6..b175fba414cfce67cdb5c4aca42e7bccaab6aaee 100644
--- a/third_party/WebKit/Source/devtools/front_end/perf_ui/TimelineOverviewPane.js
+++ b/third_party/WebKit/Source/devtools/front_end/perf_ui/TimelineOverviewPane.js
@@ -70,7 +70,7 @@ PerfUI.TimelineOverviewPane = class extends UI.VBox {
this._cursorPosition = event.offsetX + event.target.offsetLeft;
this._cursorElement.style.left = this._cursorPosition + 'px';
this._cursorElement.style.visibility = 'visible';
- this._buildOverviewInfo().then(content => this._overviewInfo.setContent(content));
+ this._overviewInfo.setContent(this._buildOverviewInfo());
}
/**
@@ -482,15 +482,20 @@ PerfUI.TimelineOverviewPane.OverviewInfo = class {
this._glassPane.setPointerEventsBehavior(UI.GlassPane.PointerEventsBehavior.PierceContents);
this._glassPane.setMarginBehavior(UI.GlassPane.MarginBehavior.Arrow);
this._glassPane.setSizeBehavior(UI.GlassPane.SizeBehavior.MeasureContent);
+ this._visible = false;
this._element =
UI.createShadowRootWithCoreStyles(this._glassPane.contentElement, 'perf_ui/timelineOverviewInfo.css')
.createChild('div', 'overview-info');
}
/**
- * @param {!DocumentFragment} content
+ * @param {!Promise<!DocumentFragment>} contentPromise
*/
- setContent(content) {
+ async setContent(contentPromise) {
+ this._visible = true;
+ var content = await contentPromise;
+ if (!this._visible)
+ return;
this._element.removeChildren();
this._element.appendChild(content);
this._glassPane.setContentAnchorBox(this._anchorElement.boxInWindow());
@@ -499,6 +504,7 @@ PerfUI.TimelineOverviewPane.OverviewInfo = class {
}
hide() {
+ this._visible = false;
this._glassPane.hide();
}
};
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/perf_ui/timelineOverviewInfo.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698