Chromium Code Reviews| 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() {} |