diff options
author | xji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-18 23:32:34 +0000 |
---|---|---|
committer | xji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-18 23:32:34 +0000 |
commit | 3f49b8167ced932005ae75e29adb1f9f7f5908da (patch) | |
tree | e93c4bfe9860bc8c5c3c446da32b80bd6c3bbad7 /ui/gfx/canvas.h | |
parent | 606788603dbb0d5ce1e9eac0e6009b5bcc308b65 (diff) | |
download | chromium_src-3f49b8167ced932005ae75e29adb1f9f7f5908da.zip chromium_src-3f49b8167ced932005ae75e29adb1f9f7f5908da.tar.gz chromium_src-3f49b8167ced932005ae75e29adb1f9f7f5908da.tar.bz2 |
Introduce FORCE_LTR_DIRECTIONALTY in Canvas.
For strings coming from webpage (such as alert in JS), its directionality is set according to the directionality of its first strong character's directionality.
For chrome's UI string, its directionality is set as RTL if the UI is RTL and the string contains strong RTL characters.
BUG=91698
TEST=start chrome in RTL locale, check about:crash, "!" should be displayed at very left. check the directionality of alert() with bidi text in LTR and RTL chrome, the directionality should be determined by its first strong directionality character.
Review URL: http://codereview.chromium.org/7655037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97392 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/canvas.h')
-rw-r--r-- | ui/gfx/canvas.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/gfx/canvas.h b/ui/gfx/canvas.h index 5fdce31..5fa067e 100644 --- a/ui/gfx/canvas.h +++ b/ui/gfx/canvas.h @@ -68,6 +68,10 @@ class UI_EXPORT Canvas { // installed) don't support these characters. Thus, this flag should be // used to render text using RTL directionality when the locale is LTR. FORCE_RTL_DIRECTIONALITY = 2048, + + // Similar to FORCE_RTL_DIRECTIONALITY, but left-to-right. + // See FORCE_RTL_DIRECTIONALITY for details. + FORCE_LTR_DIRECTIONALITY = 4096, }; virtual ~Canvas() {} |