Index: chrome/browser/ui/cocoa/location_bar/security_state_bubble_decoration.mm |
diff --git a/chrome/browser/ui/cocoa/location_bar/security_state_bubble_decoration.mm b/chrome/browser/ui/cocoa/location_bar/security_state_bubble_decoration.mm |
index 14b40ac626da8b2c3809e79c530bbaca5b210288..2a8efd6d0a80757f4b46226debf7ec729781568f 100644 |
--- a/chrome/browser/ui/cocoa/location_bar/security_state_bubble_decoration.mm |
+++ b/chrome/browser/ui/cocoa/location_bar/security_state_bubble_decoration.mm |
@@ -151,6 +151,7 @@ |
CGFloat text_left_offset = NSMinX(decoration_frame); |
CGFloat text_right_offset = NSMaxX(decoration_frame); |
const BOOL is_rtl = cocoa_l10n_util::ShouldDoExperimentalRTLLayout(); |
+ focus_ring_right_inset_ = 0; |
if (image_) { |
// The image should fade in if we're animating in. |
CGFloat image_alpha = |
@@ -247,6 +248,12 @@ |
divider_color = [divider_color colorWithAlphaComponent:divider_alpha]; |
[divider_color set]; |
[line stroke]; |
+ |
+ focus_ring_right_inset_ = DividerPadding() + line_width; |
+ } else { |
+ // When mouse-hovered, the divider isn't drawn, but the padding for it is |
+ // still present to separate the button from the location bar text. |
+ focus_ring_right_inset_ = DividerPadding(); |
} |
} |
} |
@@ -292,6 +299,12 @@ |
stringWithFormat:@"%@. %@", full_label_.get(), tooltip_icon_text]; |
} |
+NSRect SecurityStateBubbleDecoration::GetRealFocusRingBounds( |
+ NSRect bounds) const { |
+ bounds.size.width -= focus_ring_right_inset_; |
+ return bounds; |
+} |
+ |
////////////////////////////////////////////////////////////////// |
// SecurityStateBubbleDecoration::BubbleDecoration: |