| Index: ui/views/view.cc
|
| diff --git a/ui/views/view.cc b/ui/views/view.cc
|
| index 858248d64d7b457a18daf25d123a4d69cdfd878d..5f81c5ff9fb0edbe32e21b7060ef569c1e856482 100644
|
| --- a/ui/views/view.cc
|
| +++ b/ui/views/view.cc
|
| @@ -107,6 +107,7 @@ View::View()
|
| registered_for_visible_bounds_notification_(false),
|
| clip_insets_(0, 0, 0, 0),
|
| needs_layout_(true),
|
| + focus_border_(FocusBorder::CreateDashedFocusBorder()),
|
| flip_canvas_on_paint_for_rtl_ui_(false),
|
| paint_to_layer_(false),
|
| accelerator_registration_delayed_(false),
|
| @@ -1148,11 +1149,12 @@ void View::OnPaintBorder(gfx::Canvas* canvas) {
|
| }
|
|
|
| void View::OnPaintFocusBorder(gfx::Canvas* canvas) {
|
| - if (HasFocus() && (focusable() || IsAccessibilityFocusable())) {
|
| + if (focus_border_.get() &&
|
| + HasFocus() && (focusable() || IsAccessibilityFocusable())) {
|
| TRACE_EVENT2("views", "views::OnPaintFocusBorder",
|
| "width", canvas->sk_canvas()->getDevice()->width(),
|
| "height", canvas->sk_canvas()->getDevice()->height());
|
| - canvas->DrawFocusRect(GetLocalBounds());
|
| + focus_border_->Paint(*this, canvas);
|
| }
|
| }
|
|
|
|
|