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

Unified Diff: ui/views/view.cc

Issue 8964001: views: Convert IsFocusable() to just focusable() since it's just a simple accessor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: don't need to override IsFocusableInRootView in omnibox_view_views Created 9 years 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 | « ui/views/view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/view.cc
diff --git a/ui/views/view.cc b/ui/views/view.cc
index ee8be17e8e3c70e3ab0b47b0937e81d5b045f8fa..244f261bc5f14df73204aadc62280b103238f7f5 100644
--- a/ui/views/view.cc
+++ b/ui/views/view.cc
@@ -895,7 +895,7 @@ void View::SetNextFocusableView(View* view) {
}
bool View::IsFocusableInRootView() const {
- return IsFocusable() && IsDrawn();
+ return focusable_ && enabled_ && IsDrawn();
}
bool View::IsAccessibilityFocusableInRootView() const {
@@ -1093,7 +1093,7 @@ void View::OnPaintBorder(gfx::Canvas* canvas) {
}
void View::OnPaintFocusBorder(gfx::Canvas* canvas) {
- if ((IsFocusable() || IsAccessibilityFocusableInRootView()) && HasFocus()) {
+ if ((focusable() || IsAccessibilityFocusableInRootView()) && HasFocus()) {
TRACE_EVENT2("views", "views::OnPaintFocusBorder",
"width", canvas->GetSkCanvas()->getDevice()->width(),
"height", canvas->GetSkCanvas()->getDevice()->height());
@@ -1229,10 +1229,6 @@ void View::GetHitTestMask(gfx::Path* mask) const {
// Focus -----------------------------------------------------------------------
-bool View::IsFocusable() const {
- return focusable_ && enabled_ && visible_;
-}
-
void View::OnFocus() {
// TODO(beng): Investigate whether it's possible for us to move this to
// Focus().
« no previous file with comments | « ui/views/view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698