Skip to content

Commit

Permalink
Correct attribute name in IsInForcedRTL()
Browse files Browse the repository at this point in the history
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}
  • Loading branch information
marq authored and Commit bot committed Sep 21, 2015
1 parent 23b35ce commit b2238de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion base/ios/ios_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion base/ios/ios_util.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b2238de

Please sign in to comment.