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

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

Issue 2848953002: [Mac] Fix Omnibox decoration accessibility views in RTL (Closed)
Patch Set: Created 3 years, 8 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 | chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698