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

Unified Diff: chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm

Issue 2718763002: [Mac] Reverse order of browser actions in RTL (Closed)
Patch Set: Created 3 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm
diff --git a/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm b/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm
index 17cadc014770039093504a2f696bafdcda49599d..94ac7d7b293f77dfb29bd51abbc58828086954f6 100644
--- a/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm
+++ b/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm
@@ -680,6 +680,9 @@ void ToolbarActionsBarBridge::ShowToolbarActionBubble(
NSMakePoint(NSMidX(draggedButtonFrame),
NSMaxY([containerView_ bounds]) - NSMidY(draggedButtonFrame));
+ if (cocoa_l10n_util::ShouldDoExperimentalRTLLayout())
+ midPoint.x = NSWidth([containerView_ frame]) - midPoint.x;
+
// Calculate the row index and the index in the row. We bound the latter
// because the view can go farther right than the right-most icon in the last
// row of the overflow menu.
@@ -719,6 +722,9 @@ void ToolbarActionsBarBridge::ShowToolbarActionBubble(
NSRectFromCGRect(frameRect.ToCGRect());
// We need to flip the y coordinate for Cocoa's view system.
frame.origin.y = NSHeight([containerView_ frame]) - NSMaxY(frame);
+ if (cocoa_l10n_util::ShouldDoExperimentalRTLLayout())
+ frame.origin.x =
+ NSWidth([containerView_ frame]) - NSWidth(frame) - NSMinX(frame);
return frame;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698