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

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: Browser test fixes Created 8 years, 2 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 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);
}
}

Powered by Google App Engine
This is Rietveld 408576698