Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Unified Diff: ui/views/cocoa/bridged_content_view.mm

Issue 2050583002: BridgedContentView: Modify IsTextRTL to use GetFirstStrongCharacterDirection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/views/controls/textfield/textfield_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/cocoa/bridged_content_view.mm
diff --git a/ui/views/cocoa/bridged_content_view.mm b/ui/views/cocoa/bridged_content_view.mm
index 6ac88de64c72dcb1373ce97d30a78853c51cc7cf..7fe03cabdef92cc789699397a56e080bc203f291 100644
--- a/ui/views/cocoa/bridged_content_view.mm
+++ b/ui/views/cocoa/bridged_content_view.mm
@@ -88,7 +88,8 @@ bool IsTextRTL(const ui::TextInputClient* client) {
base::string16 text;
return client && client->GetTextRange(&text_range) &&
client->GetTextFromRange(text_range, &text) &&
- base::i18n::GetStringDirection(text) == base::i18n::RIGHT_TO_LEFT;
+ base::i18n::GetFirstStrongCharacterDirection(text) ==
+ base::i18n::RIGHT_TO_LEFT;
}
// Returns the boundary rectangle for composition characters in the
« no previous file with comments | « no previous file | ui/views/controls/textfield/textfield_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698