summaryrefslogtreecommitdiffstats
path: root/views/view.cc
diff options
context:
space:
mode:
authormnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-05 07:57:10 +0000
committermnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-05 07:57:10 +0000
commitf861719588545d92ba979f491f4cd10cbf544016 (patch)
tree5f5a64d4ba48a8d884ee360a562fb08371404ed6 /views/view.cc
parent84aa957953cf6eb36c4e8886a28aede5fd98f748 (diff)
downloadchromium_src-f861719588545d92ba979f491f4cd10cbf544016.zip
chromium_src-f861719588545d92ba979f491f4cd10cbf544016.tar.gz
chromium_src-f861719588545d92ba979f491f4cd10cbf544016.tar.bz2
Re-land r51526
Auto-size the views version of the options dialog. This adds support for auto-sizing tab controls, adjusts the options dialog to use it and takes care of any fallout due to the new layout handling. Also fixes a couple of small bugs in the views Layout() machinery and sanitizes layouting of options pages. BUG=36497 TEST=unit tests in tabbed_pane_unittest.cc and grid_layout_unittest.cc, as well as checking the options dialog in any supported language. original issuse: http://codereview.chromium.org/2812026/show Review URL: http://codereview.chromium.org/2883022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51628 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/view.cc')
-rw-r--r--views/view.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/views/view.cc b/views/view.cc
index 90fb2bc..22b048b 100644
--- a/views/view.cc
+++ b/views/view.cc
@@ -218,17 +218,14 @@ void View::ScrollRectToVisible(const gfx::Rect& rect) {
/////////////////////////////////////////////////////////////////////////////
void View::Layout() {
- // Layout child Views
+ // If we have a layout manager, let it handle the layout for us.
if (layout_manager_.get()) {
layout_manager_->Layout(this);
SchedulePaint();
- // TODO(beng): We believe the right thing to do here is return since the
- // layout manager should be handling things, but it causes
- // regressions (missing options from Options dialog and a hang
- // in interactive_ui_tests).
+ return;
}
- // Lay out contents of child Views
+ // Otherwise, just pass on to the child views.
for (int i = 0, count = GetChildViewCount(); i < count; ++i) {
View* child = GetChildViewAt(i);
child->Layout();