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

Unified Diff: views/view.cc

Issue 2883022: Re-land r51526 (Closed)
Patch Set: Created 10 years, 6 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
Index: views/view.cc
diff --git a/views/view.cc b/views/view.cc
index 90fb2bc34b344bcc9acaa4a30b718eff2df6a9c9..22b048b88485b59188a3718016ee36828cb01b2a 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();

Powered by Google App Engine
This is Rietveld 408576698