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

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

Issue 2586363002: [Mac] RTL aware drawing for the security bubble hover background (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
« 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/location_bar/bubble_decoration.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/bubble_decoration.mm b/chrome/browser/ui/cocoa/location_bar/bubble_decoration.mm
index da2d46ffc062ef55466c4ca5b004f249924213ab..0d64f4b5c6bf1052c2f5fe5b8272f4a4f003c53b 100644
--- a/chrome/browser/ui/cocoa/location_bar/bubble_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/bubble_decoration.mm
@@ -102,8 +102,13 @@ CGFloat BubbleDecoration::GetWidthForSpace(CGFloat width) {
NSRect BubbleDecoration::GetBackgroundFrame(NSRect frame) {
NSRect background_frame = NSInsetRect(frame, 0.0, kBackgroundFrameYInset);
- background_frame.origin.x += kBackgroundFrameLeftMargin;
- background_frame.size.width -= kDividerPadding;
+ if (cocoa_l10n_util::ShouldDoExperimentalRTLLayout()) {
+ background_frame.origin.x += kDividerPadding;
+ background_frame.size.width -= kDividerPadding + kBackgroundFrameLeftMargin;
+ } else {
+ background_frame.origin.x += kBackgroundFrameLeftMargin;
+ background_frame.size.width -= kDividerPadding;
+ }
return background_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