diff options
author | xji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-03 01:55:42 +0000 |
---|---|---|
committer | xji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-03 01:55:42 +0000 |
commit | 99aa2dbf4962fb1a4a52a3eae9bb51ad3113b7be (patch) | |
tree | 38197c68d8eaa4ec1d363b5aef3e266d4c76a397 /chrome | |
parent | 623f2d5a8cc81f5a64d6328e75a85f706409c001 (diff) | |
download | chromium_src-99aa2dbf4962fb1a4a52a3eae9bb51ad3113b7be.zip chromium_src-99aa2dbf4962fb1a4a52a3eae9bb51ad3113b7be.tar.gz chromium_src-99aa2dbf4962fb1a4a52a3eae9bb51ad3113b7be.tar.bz2 |
This CL fix issue 7253 -- tooltip of pure English tab title has wrong directionality.
(http://crbug.com/7253)
Fix: LTR tooltip text need to be marked with LRE-PDF to be displayed correctly in RTL locales.
Test steps:
1. Open Chrome in RTL locales.
2. Open page http://mail.yahoo.com, whose title is "Yahoo! Mail: the best web-based mail!"
3. Mouse over to the tab title to show the completed page title.
Without the fix, tooltip text is: "!Yahoo! Mail: the best web-based mail" (with wrong placement of the ending punctuation).
With the fix, tooltip text is: "Yahoo! Mail: the best web-based mail!"
Review URL: http://codereview.chromium.org/21003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9064 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/views/tooltip_manager.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/chrome/views/tooltip_manager.cc b/chrome/views/tooltip_manager.cc index 095fe32..8e7e75f 100644 --- a/chrome/views/tooltip_manager.cc +++ b/chrome/views/tooltip_manager.cc @@ -174,6 +174,9 @@ LRESULT TooltipManager::OnNotify(int w_param, NMHDR* l_param, bool* handled) { clipped_text_ = tooltip_text_; TrimTooltipToFit(&clipped_text_, &tooltip_width_, &line_count_, last_mouse_x_, last_mouse_y_, tooltip_hwnd_); + // Adjust the clipped tooltip text for locale direction. + l10n_util::AdjustStringForLocaleDirection(clipped_text_, + &clipped_text_); tooltip_info->lpszText = const_cast<WCHAR*>(clipped_text_.c_str()); } else { tooltip_text_.clear(); |