Index: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm |
diff --git a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm |
index e09ee0d517737e9da1027f40134298b071d15dad..373f11db84c8a351f07e5f95be133ac9b0925588 100644 |
--- a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm |
+++ b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm |
@@ -159,9 +159,10 @@ size_t CalculatePositionsInFrame( |
// Flip all frames in RTL. |
if (cocoa_l10n_util::ShouldDoExperimentalRTLLayout()) { |
for (NSRect& rect : *decoration_frames) |
- rect.origin.x = NSWidth(frame) - NSWidth(rect) - NSMinX(rect); |
- text_frame->origin.x = |
- NSWidth(frame) - NSWidth(*text_frame) - NSMinX(*text_frame); |
+ rect.origin.x = |
+ NSMinX(frame) + NSMaxX(frame) - NSWidth(rect) - NSMinX(rect); |
+ text_frame->origin.x = NSMinX(frame) + NSMaxX(frame) - |
+ NSWidth(*text_frame) - NSMinX(*text_frame); |
leading_count = decorations->size() - leading_count; |
} |