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

Unified Diff: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.mm

Issue 2576563002: [Mac] Reverse the omnibox in RTL (Closed)
Patch Set: Created 4 years 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
Index: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.mm b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.mm
index 6ba885e04741bd40c68c522c2f9f7110e6799b04..52e63ffac1a5d6ebc81d9e712e7efdad5f0e04c3 100644
--- a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.mm
+++ b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.mm
@@ -11,6 +11,7 @@
#include "chrome/browser/themes/theme_service.h"
#include "chrome/browser/ui/browser_list.h"
#import "chrome/browser/ui/cocoa/browser_window_controller.h"
+#include "chrome/browser/ui/cocoa/l10n_util.h"
#import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.h"
#import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.h"
#import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h"
@@ -93,6 +94,9 @@ NSMenuItem* PasteAndGoMenuItemForObserver(
// Also see http://crbug.com/173405 and http://crbug.com/528014.
NSTextCheckingTypes checkingTypes = 0;
[self setEnabledTextCheckingTypes:checkingTypes];
+ self.alignment = cocoa_l10n_util::ShouldDoExperimentalRTLLayout()
+ ? NSRightTextAlignment
+ : NSLeftTextAlignment;
Sidney San Martín 2016/12/16 00:05:54 The docs suggest that NSNaturalTextAlignment would
lgrey 2016/12/20 19:41:04 At least in forced RTL, this doesn't hold for the
}
return self;
}

Powered by Google App Engine
This is Rietveld 408576698