diff options
author | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-16 17:54:36 +0000 |
---|---|---|
committer | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-16 17:54:36 +0000 |
commit | 2bcb1168c7616f5d0a34a597457707bc272f8c88 (patch) | |
tree | ac271fd798f950918310c195a2f24113bb0b7dfa /chrome | |
parent | f35393928d0846d9275da5e307c24ef6dbcbc3dd (diff) | |
download | chromium_src-2bcb1168c7616f5d0a34a597457707bc272f8c88.zip chromium_src-2bcb1168c7616f5d0a34a597457707bc272f8c88.tar.gz chromium_src-2bcb1168c7616f5d0a34a597457707bc272f8c88.tar.bz2 |
Don't show tooltips if the window isn't main.
BUG=none
TEST=tooltips shouldn't show if the window isn't the frontmost.
Review URL: http://codereview.chromium.org/125194
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18505 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/renderer_host/render_widget_host_view_mac.mm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/renderer_host/render_widget_host_view_mac.mm b/chrome/browser/renderer_host/render_widget_host_view_mac.mm index d44a7bc..4580c2f 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_mac.mm +++ b/chrome/browser/renderer_host/render_widget_host_view_mac.mm @@ -263,8 +263,11 @@ void RenderWidgetHostViewMac::Destroy() { // Gecko does this automatically in the back-end, hence the ToolTip class not // needing that functionality. We can either modify ToolTip or add this // functionality here with a timer. +// TODO(pinkerton): This code really needs to live at a higher level because +// right now it allows multiple views in multiple tabs to each be displaying +// a tooltip simultaneously (http://crbug.com/14178). void RenderWidgetHostViewMac::SetTooltipText(const std::wstring& tooltip_text) { - if (tooltip_text != tooltip_text_) { + if (tooltip_text != tooltip_text_ && [[cocoa_view_ window] isMainWindow]) { tooltip_text_ = tooltip_text; // Clamp the tooltip length to kMaxTooltipLength. It's a DOS issue on |