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

Unified Diff: chrome/browser/ui/cocoa/location_bar/security_state_bubble_decoration.h

Issue 2847903003: cocoa: don't draw focus rings over the URL scheme in the location bar (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
Index: chrome/browser/ui/cocoa/location_bar/security_state_bubble_decoration.h
diff --git a/chrome/browser/ui/cocoa/location_bar/security_state_bubble_decoration.h b/chrome/browser/ui/cocoa/location_bar/security_state_bubble_decoration.h
index 069c6f881c05e52b1c05c58c4292828f7cdf7110..5998b4592496d4125ff970bf20196620221f5973 100644
--- a/chrome/browser/ui/cocoa/location_bar/security_state_bubble_decoration.h
+++ b/chrome/browser/ui/cocoa/location_bar/security_state_bubble_decoration.h
@@ -73,6 +73,7 @@ class SecurityStateBubbleDecoration : public BubbleDecoration,
bool AcceptsMousePress() override;
NSPoint GetBubblePointInFrame(NSRect frame) override;
NSString* GetToolTip() override;
+ NSRect GetRealFocusRingBounds(NSRect apparent_frame) const override;
// BubbleDecoration:
NSColor* GetBackgroundBorderColor() override;
@@ -111,6 +112,11 @@ class SecurityStateBubbleDecoration : public BubbleDecoration,
LocationBarViewMac* owner_; // weak
+ // Distance in points to inset the right edge of the focus ring by. This is
+ // used by |GetRealFocusRingBounds| to prevent the focus ring from including
+ // the divider bar. This is recomputed every time this object is drawn.
+ int focus_ring_right_inset_ = 0;
+
// Used to disable find bar animations when testing.
bool disable_animations_during_testing_;

Powered by Google App Engine
This is Rietveld 408576698