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

Unified Diff: views/view.cc

Issue 8359029: ui/gfx: Convert Canvas::DrawFocusRect() to use gfx::Rect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address Peter's review Created 9 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
« no previous file with comments | « views/controls/label.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/view.cc
diff --git a/views/view.cc b/views/view.cc
index e4ffbe893d291461725a40e81b88e1120a7ae320..2d4a60d712628d5c27e70db66090a72f1b17d1a5 100644
--- a/views/view.cc
+++ b/views/view.cc
@@ -299,7 +299,7 @@ gfx::Rect View::GetContentsBounds() const {
}
gfx::Rect View::GetLocalBounds() const {
- return gfx::Rect(0, 0, width(), height());
+ return gfx::Rect(gfx::Point(), size());
}
gfx::Insets View::GetInsets() const {
@@ -1079,7 +1079,7 @@ void View::OnPaintBorder(gfx::Canvas* canvas) {
void View::OnPaintFocusBorder(gfx::Canvas* canvas) {
if ((IsFocusable() || IsAccessibilityFocusableInRootView()) && HasFocus())
- canvas->DrawFocusRect(0, 0, width(), height());
+ canvas->DrawFocusRect(GetLocalBounds());
}
// Accelerated Painting --------------------------------------------------------
« no previous file with comments | « views/controls/label.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698