Chromium Code Reviews| 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..e3197a399c39710fbdaffef68f522c6d90ccffb3 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,16 @@ 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 |
| */ |
| - setTimeout(timeout, hideTimeout) { |
| - this._timeout = timeout; |
| - if (typeof hideTimeout === 'number') |
| - this._hideTimeout = hideTimeout; |
| - else |
| - this._hideTimeout = timeout / 2; |
| + setTimeout(showTimeout, hideTimeout) { |
| + this._showTimeout = showTimeout; |
| + this._hideTimeout = typeof hideTimeout === 'number' ? hideTimeout : showTimeout / 2; |
| } |
| /** |
| @@ -111,7 +108,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 +239,7 @@ UI.PopoverHelper = class { |
| } |
| _stopHidePopoverTimer() { |
| - if (!this._hidePopoverTimer) |
| + if (!this._hidePopoverTimer || !this._hideTimeout) |
|
dgozman
2017/04/17 23:16:13
Why this change? It affects ElementsPanel and Anim
|
| return; |
| clearTimeout(this._hidePopoverTimer); |
| delete this._hidePopoverTimer; |