diff options
author | xji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-23 23:13:05 +0000 |
---|---|---|
committer | xji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-23 23:13:05 +0000 |
commit | 2a5af8a6e448b72044353b691ab7766e989db152 (patch) | |
tree | 3cb7ec6be2f05d7154005e7da87ca08042f2e026 /chrome/browser/renderer_host | |
parent | 1926867a79a6bcf9817b4ddc9d30d3f348e2d2d5 (diff) | |
download | chromium_src-2a5af8a6e448b72044353b691ab7766e989db152.zip chromium_src-2a5af8a6e448b72044353b691ab7766e989db152.tar.gz chromium_src-2a5af8a6e448b72044353b691ab7766e989db152.tar.bz2 |
===================================================
This change list fixes the following 2 chrome bugs:
2821 RTL: Ellipsis appeared at right for RTL locales on "Task Manager - Google Chrome" dialog
(http://crbug.com/2821)
6132: Strings in tables are displayed LTR when they should be RTL
(http://crbug.com/6132)
===================================================
Background:
The above 2 bugs are related to Chrome task manager.
Task manager is a TableView, which is a subclass of NativeControl.
Currently, TableView window is created by using WS_EX_LAYOUTRTL | WS_EX_RTLREADING flag, which is wrong.
WS_EX_LAYOUTRTL | WS_EX_RTLREADING renders a RTL alignment but LTR reading order.
Please see the following blog for detail:
http://blogs.msdn.com/michkap/archive/2007/03/11/1857043.aspx
We need to replace the above flag with WS_EX_LAYOUTRTL only.
Consequently, we need to make sure that the various implementations of TableModel::GetText adjust the
returned text appropriately if need be. For example, if the text in an URL, then the returned text should be explicitly marked as LTR text.
Please note: there are several other places where we create RTL window using WS_EX_LAYOUTRTL | WS_EX_RTLREADING flag, such as AutoCompleteEditView (omnibox), MenuHostWindow,
TextField (for example, text in bookmark dialog), and other NativeControl (including checkbox, combobox, native_button, radio_button, separator, tabbed_pane, and tree view).
They all need to be fixed. And the following bug is filed for tracking.
http://crbug.com/6573
===================================================
The fix is based on Idan's comments on bug 6132
1.create the table view with WS_EX_LAYOUTRTL (rather than WS_EX_LAYOUTRTL | WS_EX_RTLREADING)
2 Make sure that the various implementations of TableModel::GetText adjust the returned text appropriately if need be.
If the text in an URL, then the returned text is explicitly marked as LTR text.
Otherwise, the returned text is marked with LTR if it is RTL environment and there is no strong RTL character in the text. This is to avoid the wrong placement of (or wrong mirrored) ending-punctuation.
===================================================
Since we have quite a few places creating window using WS_EX_LAYOUTRTL | WS_EX_RTLREADING style. We decided to migrate to the right style step to step.
This is the first step, and there is unnecessary function introduced by this change list.
1.
I am using l10n_util::GetExtendedTooltipStyles() for the right style for now. And I marked a TODO there to obsolete this function name, replace with GetExtendedStyles eventually. (the l10n_util.h is no longer in the change list since I've checked it in with another CL).
2.
I introduced native_control::GetAdditionalRTLStyle() which should replace GetAdditionalExStyle() eventually.
===================================================
When wrapping text with LTR format in GetText(),
ideally, we should parse the text to check whether this is a n URL or not (for example, a webpage title could be an URL, or user could add URL as search engine's name or keyword).
I did not do that and only added a TODO there because I think that might be rare case and parsing the text might cause performance degradation.
Review URL: http://codereview.chromium.org/18076
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8593 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host')
0 files changed, 0 insertions, 0 deletions