summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authormarq <marq@chromium.org>2015-09-21 10:06:21 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-21 17:06:53 +0000
commitb2238de29f394a77c618d1d139a272f7c76cf9c7 (patch)
tree1b23d1f28f35a9ddd7c2bbbabae4e030a58f2b02 /base
parent23b35ce2a622310311225679b3dbf47e08f2b238 (diff)
downloadchromium_src-b2238de29f394a77c618d1d139a272f7c76cf9c7.zip
chromium_src-b2238de29f394a77c618d1d139a272f7c76cf9c7.tar.gz
chromium_src-b2238de29f394a77c618d1d139a272f7c76cf9c7.tar.bz2
Correct attribute name in IsInForcedRTL()
AppleTextDirection is set for all RTL languages, whereas NSForceRightToLeftWritingDirection is only set for the RTL psuedolanguage. BUG= 534358 Review URL: https://codereview.chromium.org/1356073002 Cr-Commit-Position: refs/heads/master@{#349948}
Diffstat (limited to 'base')
-rw-r--r--base/ios/ios_util.h5
-rw-r--r--base/ios/ios_util.mm2
2 files changed, 5 insertions, 2 deletions
diff --git a/base/ios/ios_util.h b/base/ios/ios_util.h
index e6248e9..9f65339 100644
--- a/base/ios/ios_util.h
+++ b/base/ios/ios_util.h
@@ -21,7 +21,10 @@ BASE_EXPORT bool IsRunningOnIOS9OrLater();
BASE_EXPORT bool IsRunningOnOrLater(int32 major, int32 minor, int32 bug_fix);
// Returns whether iOS is signalling that an RTL text direction should be used
-// regardless of the current locale.
+// regardless of the current locale. This should not return true if the current
+// language is a "real" RTL language such as Arabic or Urdu; it should only
+// return true in cases where the RTL text direction has been forced (for
+// example by using the "RTL Psuedolanguage" option when launching from XCode).
BASE_EXPORT bool IsInForcedRTL();
} // namespace ios
diff --git a/base/ios/ios_util.mm b/base/ios/ios_util.mm
index 4bb25db..554a202 100644
--- a/base/ios/ios_util.mm
+++ b/base/ios/ios_util.mm
@@ -43,7 +43,7 @@ bool IsRunningOnOrLater(int32 major, int32 minor, int32 bug_fix) {
bool IsInForcedRTL() {
NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
- return [defaults boolForKey:@"AppleTextDirection"];
+ return [defaults boolForKey:@"NSForceRightToLeftWritingDirection"];
}
} // namespace ios