summaryrefslogtreecommitdiffstats
path: root/ui/views
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-15 21:17:00 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-15 21:17:00 +0000
commit5982d9af360d9298ffa2f7ccf0f1d4216d5ad176 (patch)
tree9c584572bdcef8d76ef8a57b93dece2f02d7b4c9 /ui/views
parent804a3e3f50f841bd953e71c08f1f0520a3700dd6 (diff)
downloadchromium_src-5982d9af360d9298ffa2f7ccf0f1d4216d5ad176.zip
chromium_src-5982d9af360d9298ffa2f7ccf0f1d4216d5ad176.tar.gz
chromium_src-5982d9af360d9298ffa2f7ccf0f1d4216d5ad176.tar.bz2
Respect GetInsets in FillLayout.
BUG=none Review URL: https://chromiumcodereview.appspot.com/12703009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188479 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views')
-rw-r--r--ui/views/layout/fill_layout.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/ui/views/layout/fill_layout.cc b/ui/views/layout/fill_layout.cc
index 65c397b..eec0ed4 100644
--- a/ui/views/layout/fill_layout.cc
+++ b/ui/views/layout/fill_layout.cc
@@ -8,23 +8,23 @@
namespace views {
-FillLayout::FillLayout() {
-}
+FillLayout::FillLayout() {}
-FillLayout::~FillLayout() {
-}
+FillLayout::~FillLayout() {}
void FillLayout::Layout(View* host) {
if (!host->has_children())
return;
View* frame_view = host->child_at(0);
- frame_view->SetBounds(0, 0, host->width(), host->height());
+ frame_view->SetBoundsRect(host->GetContentsBounds());
}
gfx::Size FillLayout::GetPreferredSize(View* host) {
DCHECK_EQ(1, host->child_count());
- return host->child_at(0)->GetPreferredSize();
+ gfx::Rect rect(host->child_at(0)->GetPreferredSize());
+ rect.Inset(-host->GetInsets());
+ return rect.size();
}
} // namespace views