Chromium Code Reviews| Index: base/i18n/rtl.cc |
| diff --git a/base/i18n/rtl.cc b/base/i18n/rtl.cc |
| index 1cccae289375f92495963cee7bbc9341167a8a48..1c873a60e622e386e04603fc2dccc6a21eb71aae 100644 |
| --- a/base/i18n/rtl.cc |
| +++ b/base/i18n/rtl.cc |
| @@ -14,6 +14,10 @@ |
| #include "third_party/icu/source/common/unicode/uscript.h" |
| #include "third_party/icu/source/i18n/unicode/coll.h" |
| +#if defined(OS_IOS) |
| +#include "base/ios/ios_util.h" |
| +#endif |
| + |
| namespace { |
| // Extract language, country and variant, but ignore keywords. For example, |
| @@ -131,6 +135,11 @@ bool ICUIsRTL() { |
| } |
| TextDirection GetTextDirectionForLocale(const char* locale_name) { |
| + // On iOS, check for RTL forcing. |
| +#if defined(OS_IOS) |
| + if (ios::IsForcingRTL()) |
|
jungshik at Google
2015/08/07 17:32:22
nit: How about IsInForcedRTL ?
marq (ping after 24h)
2015/08/10 07:28:37
Done.
|
| + return RIGHT_TO_LEFT; |
| +#endif |
| UErrorCode status = U_ZERO_ERROR; |
| ULayoutType layout_dir = uloc_getCharacterOrientation(locale_name, &status); |
| DCHECK(U_SUCCESS(status)); |