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

Unified Diff: ui/views/controls/focus_ring.cc

Issue 2813353002: Ensure that the focus ring in the bookmarks bar does not paint outside the parent view. (Closed)
Patch Set: Rename layer notification to OnChildLayerChanged() 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 | ui/views/controls/scroll_view.h » ('j') | ui/views/controls/scroll_view.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/focus_ring.cc
diff --git a/ui/views/controls/focus_ring.cc b/ui/views/controls/focus_ring.cc
index b905823817e7bdb568f0a5be6395b953226dec06..70400b8e0c3794247670ad3d1e9ffeb0304e5950 100644
--- a/ui/views/controls/focus_ring.cc
+++ b/ui/views/controls/focus_ring.cc
@@ -40,6 +40,9 @@ views::View* FocusRing::Install(views::View* parent,
if (!ring) {
ring = new FocusRing();
parent->AddChildView(ring);
+ // A layer is necessary to paint beyond the parent's bounds.
sky 2017/04/17 15:24:01 Why are you moving this? Perhaps it's because othe
ananta 2017/04/18 03:04:56 Done.
+ ring->SetPaintToLayer();
+ ring->layer()->SetFillsBoundsOpaquely(false);
}
ring->override_color_id_ = override_color_id;
ring->Layout();
@@ -86,9 +89,6 @@ void FocusRing::OnPaint(gfx::Canvas* canvas) {
FocusRing::FocusRing()
: override_color_id_(ui::NativeTheme::kColorId_NumColors) {
- // A layer is necessary to paint beyond the parent's bounds.
- SetPaintToLayer();
- layer()->SetFillsBoundsOpaquely(false);
}
FocusRing::~FocusRing() {}
« no previous file with comments | « no previous file | ui/views/controls/scroll_view.h » ('j') | ui/views/controls/scroll_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698