Chromium Code Reviews| Index: ios/chrome/browser/ui/omnibox/omnibox_text_field_ios.mm |
| diff --git a/ios/chrome/browser/ui/omnibox/omnibox_text_field_ios.mm b/ios/chrome/browser/ui/omnibox/omnibox_text_field_ios.mm |
| index 2be9472a98248f10a6d12cbd4faf200506c6ab25..4210f0757101aa6132142080d7b48127e129d692 100644 |
| --- a/ios/chrome/browser/ui/omnibox/omnibox_text_field_ios.mm |
| +++ b/ios/chrome/browser/ui/omnibox/omnibox_text_field_ios.mm |
| @@ -14,7 +14,9 @@ |
| #include "base/strings/sys_string_conversions.h" |
| #include "components/grit/components_scaled_resources.h" |
| #include "components/omnibox/browser/autocomplete_input.h" |
| +#include "ios/chrome/browser/application_context.h" |
| #include "ios/chrome/browser/autocomplete/autocomplete_scheme_classifier_impl.h" |
| +#include "ios/chrome/browser/experimental_flags.h" |
| #import "ios/chrome/browser/ui/animation_util.h" |
| #include "ios/chrome/browser/ui/omnibox/omnibox_util.h" |
| #import "ios/chrome/browser/ui/reversed_animation.h" |
| @@ -458,7 +460,15 @@ NSString* const kOmniboxFadeAnimationKey = @"OmniboxFadeAnimation"; |
| [self clearAutocompleteText]; |
| } |
| - self.attributedText = fieldText; |
| + BOOL updateText = YES; |
| + if (experimental_flags::IsThirdPartyKeyboardWorkaroundEnabled() && |
| + GetApplicationContext()->GetApplicationLocale() == "ja") { |
|
rohitrao (ping after 24h)
2017/06/27 13:48:47
This should check the primaryLanguage of the curre
|
| + updateText = |
| + (!self.editing || ![self.text isEqualToString:fieldText.string]); |
|
rohitrao (ping after 24h)
2017/06/27 13:48:47
I think I'm ok with this, for two reasons:
1) We s
|
| + } |
| + if (updateText) { |
| + self.attributedText = fieldText; |
| + } |
| // iOS changes the font to .LastResort when some unexpected unicode strings |
| // are used (e.g. 𝗲𝗺𝗽𝗵𝗮𝘀𝗶𝘀). Setting the NSFontAttributeName in the |