Index: ui/views/view.cc |
diff --git a/ui/views/view.cc b/ui/views/view.cc |
index f0745545e08ec15d1035c744286d9a9084792981..035d193baebe7991afb3006ed50e53dd1696cac5 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), |
@@ -1141,11 +1142,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); |
} |
} |