summaryrefslogtreecommitdiffstats
path: root/views/controls/slider
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/controls/slider
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/controls/slider')
-rw-r--r--views/controls/slider/slider.cc6
-rw-r--r--views/controls/slider/slider.h3
2 files changed, 2 insertions, 7 deletions
diff --git a/views/controls/slider/slider.cc b/views/controls/slider/slider.cc
index 581bc9a..00dba0c 100644
--- a/views/controls/slider/slider.cc
+++ b/views/controls/slider/slider.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -68,10 +68,6 @@ gfx::Size Slider::GetPreferredSize() {
return gfx::Size();
}
-bool Slider::IsFocusable() const {
- return IsEnabled();
-}
-
void Slider::SetEnabled(bool enabled) {
View::SetEnabled(enabled);
if (native_wrapper_)
diff --git a/views/controls/slider/slider.h b/views/controls/slider/slider.h
index 531ef05..4850a23 100644
--- a/views/controls/slider/slider.h
+++ b/views/controls/slider/slider.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -69,7 +69,6 @@ class Slider : public View {
// Overridden from View:
virtual void Layout();
virtual gfx::Size GetPreferredSize();
- virtual bool IsFocusable() const;
virtual void SetEnabled(bool enabled);
virtual void PaintFocusBorder(gfx::Canvas* canvas);