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

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

Issue 2825593002: DevTools: Make timeline screenshots overlay disapper quickly on mouseout (Closed)
Patch Set: addressing comment Created 3 years, 8 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/Source/devtools/front_end/perf_ui/TimelineOverviewPane.js ('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/Popover.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/Popover.js b/third_party/WebKit/Source/devtools/front_end/ui/Popover.js
index fa2262c473b6a291bd673811c0fe81ed31303be5..5ac4910c4f20f2be2582a380c64189fc2198ce56 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/Popover.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/Popover.js
@@ -46,19 +46,18 @@ UI.PopoverHelper = class {
container.addEventListener('mousedown', this._mouseDown.bind(this), false);
container.addEventListener('mousemove', this._mouseMove.bind(this), false);
container.addEventListener('mouseout', this._mouseOut.bind(this), false);
- this.setTimeout(1000, 500);
+ this.setTimeout(1000);
}
/**
- * @param {number} timeout
+ * @param {number} showTimeout
* @param {number=} hideTimeout
+ * @param {boolean=} hideOnAnchorLeave
*/
- setTimeout(timeout, hideTimeout) {
- this._timeout = timeout;
- if (typeof hideTimeout === 'number')
- this._hideTimeout = hideTimeout;
- else
- this._hideTimeout = timeout / 2;
+ setTimeout(showTimeout, hideTimeout, hideOnAnchorLeave) {
+ this._showTimeout = showTimeout;
+ this._hideTimeout = typeof hideTimeout === 'number' ? hideTimeout : showTimeout / 2;
+ this._hideOnAnchorLeave = hideOnAnchorLeave;
}
/**
@@ -111,7 +110,7 @@ UI.PopoverHelper = class {
this._stopShowPopoverTimer();
if (event.which && this._disableOnClick)
return;
- this._startShowPopoverTimer(event, this.isPopoverVisible() ? this._timeout * 0.6 : this._timeout);
+ this._startShowPopoverTimer(event, this.isPopoverVisible() ? this._showTimeout * 0.6 : this._showTimeout);
}
/**
@@ -242,7 +241,7 @@ UI.PopoverHelper = class {
}
_stopHidePopoverTimer() {
- if (!this._hidePopoverTimer)
+ if (!this._hidePopoverTimer || this._hideOnAnchorLeave)
return;
clearTimeout(this._hidePopoverTimer);
delete this._hidePopoverTimer;
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/perf_ui/TimelineOverviewPane.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698