summaryrefslogtreecommitdiffstats
path: root/views/focus/focus_search.cc
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-21 15:41:09 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-21 15:41:09 +0000
commit59461d2076ab5bbe6274d07d7e7855643f64862c (patch)
treed2da836b8b24b851d399433720312ea0d6548f9b /views/focus/focus_search.cc
parent8ea4b5e6df7865892a40fbe304e44d67a34b8e46 (diff)
downloadchromium_src-59461d2076ab5bbe6274d07d7e7855643f64862c.zip
chromium_src-59461d2076ab5bbe6274d07d7e7855643f64862c.tar.gz
chromium_src-59461d2076ab5bbe6274d07d7e7855643f64862c.tar.bz2
Fixes regression in links ending up too small. The problem is that we
changed IsFocusable to check IsVisibleInRootView. This meant that any views (like label) whose preferred size takes into account focusable and cached the preferred size before they were visible in the root view would end up with the wrong size because they didn't recalculate when IsVisibleInRootView changed. I've separated out the two states so that IsFocusable no longer checks IsVisibleInRootView and is protected. All consumers now call IsFocusableInRootView which checks IsFocusable and IsVisibleInRootView. BUG=49635 TEST=see bug. Review URL: http://codereview.chromium.org/3046008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53187 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/focus/focus_search.cc')
-rw-r--r--views/focus/focus_search.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/views/focus/focus_search.cc b/views/focus/focus_search.cc
index eaeb8ac..f3fac86 100644
--- a/views/focus/focus_search.cc
+++ b/views/focus/focus_search.cc
@@ -102,9 +102,9 @@ bool FocusSearch::IsViewFocusableCandidate(View* v, int skip_group_id) {
bool FocusSearch::IsFocusable(View* v) {
if (accessibility_mode_)
- return v && v->IsAccessibilityFocusable();
- else
- return v && v->IsFocusable();
+ return v && v->IsAccessibilityFocusableInRootView();
+
+ return v && v->IsFocusableInRootView();
}
View* FocusSearch::FindSelectedViewForGroup(View* view) {