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

Unified Diff: ui/views/view.cc

Issue 10933085: Update ConstrainedWindowViews appearance according to mock (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review updates Created 8 years, 3 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: 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);
}
}

Powered by Google App Engine
This is Rietveld 408576698