diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-17 00:48:51 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-17 00:48:51 +0000 |
commit | 361dc4ac64a5fd065988b432597efd388c91bc1d (patch) | |
tree | 3509d9ca2e30acfbedd6c14ca01722e6bc5d576c /ui | |
parent | cfa18c21cd18866988fcca9597c5dd67f94ea4cf (diff) | |
download | chromium_src-361dc4ac64a5fd065988b432597efd388c91bc1d.zip chromium_src-361dc4ac64a5fd065988b432597efd388c91bc1d.tar.gz chromium_src-361dc4ac64a5fd065988b432597efd388c91bc1d.tar.bz2 |
Create the Tooltip widget in Aura as needed instead of just creating it in the timer.
Currently the Tooltip widget is created in the tooltip timer which also handles setting the tooltip text on
the Tooltip object. There is a timing window between this and the mouse event coming in, which ends up causing
the tooltips to not show up if the underlying root changes in between.
Fixes bug https://code.google.com/p/chromium/issues/detail?id=292530
BUG=292530
R=sky@chromium.org, sky
Review URL: https://codereview.chromium.org/23958012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223492 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/views/corewm/tooltip_controller.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ui/views/corewm/tooltip_controller.cc b/ui/views/corewm/tooltip_controller.cc index 3d9199c..014a92a 100644 --- a/ui/views/corewm/tooltip_controller.cc +++ b/ui/views/corewm/tooltip_controller.cc @@ -278,8 +278,13 @@ void TooltipController::OnMouseEvent(ui::MouseEvent* event) { if (tooltip_window_) tooltip_window_->RemoveObserver(this); tooltip_window_ = target; - if (tooltip_window_) + if (tooltip_window_) { tooltip_window_->AddObserver(this); + } else { + // If the tooltip_window_ is reparented then we need to recreate the + // tooltip to ensure that it shows up correctly. + tooltip_.reset(NULL); + } } curr_mouse_loc_ = event->location(); if (tooltip_timer_.IsRunning()) |