New issue
Advanced search Search tips

Issue 684877 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

Inconsistent delay time for tooltip apprearance

Project Member Reported by chengx@chromium.org, Jan 25 2017

Issue description

Chrome Version: Version 57.0.2979.2 dev
OS: Win10

What steps will reproduce the problem?
(1) Go to https://build.chromium.org/p/chromium/waterfall
(2) Move (and hover) mouse across adjacent green blocks (buttons)
(3)

What is the expected result?
Tooltip for each green block (button) shows up with consistent delay.

What happens instead?
The delay time is inconsistent. Some tooltips even show up instantly.

Please use labels and text to provide additional information.


For graphics-related bugs, please copy/paste the contents of the about:gpu
page at the end of this report.

 

Comment 1 by chengx@chromium.org, Jan 25 2017

Description: Show this description
Project Member

Comment 2 by bugdroid1@chromium.org, Jan 25 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/122326d5ae2407e11a8b7353fd60dcffba5066fa

commit 122326d5ae2407e11a8b7353fd60dcffba5066fa
Author: chengx <chengx@chromium.org>
Date: Wed Jan 25 01:34:01 2017

Remove infinite spin, make tooltip delay consistent

The main motivation for the change is to reduce idle wakeups and
therefore reduce idle power. Another motivation is to make the
UI better, as currently tooltip shows up with random delay time.

ToolTipController has a repeating timer firing 4 times per second
that tries to update itself periodically, while most of the time
there is no change at all.

This CL removes this spin but keeps the same functionality by
1) upgrading OnMouseEvent() in TooltipController;
2) overriding OnWindowPropertyChanged() in TooltipController;
3) overriding OnCursorVisibilityChanged() in TooltipController.

After the change, tooltip is updated on demand via observer pattern,
rather than unnecessary periodic checking.

On UI side, current production version hides tooltip immediately,
but shows it up with a delay of a random few hundreds of ms. This
is because of the RepeatingTimer implementation. One one hand, the
delayed appearance of tooltip is preferred. On the other hand, the
random delay time from instant to a few hundreds of ms doesn't look
good. We improve this by introducing a timer to delay the tooltip's
appearance by 500 ms. This makes the intended delay consistent for
all tooltips.

BUG= 668198 ,  684877 

Review-Url: https://codereview.chromium.org/2615993002
Cr-Commit-Position: refs/heads/master@{#443584}
Committed: https://chromium.googlesource.com/chromium/src/+/6b8312a4903fc6965a64a3835524f1a8f384f26b

patch from issue 2615993002 at patchset 520001 (http://crrev.com/2615993002#ps520001)

Review-Url: https://codereview.chromium.org/2652833002
Cr-Commit-Position: refs/heads/master@{#445902}

[modify] https://crrev.com/122326d5ae2407e11a8b7353fd60dcffba5066fa/ash/tooltips/tooltip_controller_unittest.cc
[modify] https://crrev.com/122326d5ae2407e11a8b7353fd60dcffba5066fa/ui/views/corewm/tooltip_controller.cc
[modify] https://crrev.com/122326d5ae2407e11a8b7353fd60dcffba5066fa/ui/views/corewm/tooltip_controller.h
[modify] https://crrev.com/122326d5ae2407e11a8b7353fd60dcffba5066fa/ui/views/corewm/tooltip_controller_test_helper.cc
[modify] https://crrev.com/122326d5ae2407e11a8b7353fd60dcffba5066fa/ui/views/corewm/tooltip_controller_test_helper.h
[modify] https://crrev.com/122326d5ae2407e11a8b7353fd60dcffba5066fa/ui/views/corewm/tooltip_controller_unittest.cc
[modify] https://crrev.com/122326d5ae2407e11a8b7353fd60dcffba5066fa/ui/wm/public/tooltip_client.cc
[modify] https://crrev.com/122326d5ae2407e11a8b7353fd60dcffba5066fa/ui/wm/public/tooltip_client.h

Comment 3 by chengx@chromium.org, Jan 25 2017

Status: Fixed (was: Assigned)

Sign in to add a comment