From 80f8b9f5cf620c37e9d1408a114dc90699584d89 Mon Sep 17 00:00:00 2001 From: "ben@chromium.org" Date: Thu, 16 Oct 2008 18:17:47 +0000 Subject: Make View::SetBounds take a const gfx::Rect& instead of a const CRect& Make View::DidChangeBounds call Layout by default, eliminating this function from most places. http://crbug.com/2186 Review URL: http://codereview.chromium.org/7429 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3471 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/views/text_field.cc | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'chrome/views/text_field.cc') diff --git a/chrome/views/text_field.cc b/chrome/views/text_field.cc index 2991040..517968a 100644 --- a/chrome/views/text_field.cc +++ b/chrome/views/text_field.cc @@ -839,17 +839,11 @@ void TextField::ViewHierarchyChanged(bool is_add, View* parent, View* child) { void TextField::Layout() { if (native_view_) { - CRect lb; - GetLocalBounds(&lb, true); - native_view_->SetBounds(0, 0, lb.Width(), lb.Height()); + native_view_->SetBounds(GetLocalBounds(true)); native_view_->UpdateHWNDBounds(); } } -void TextField::DidChangeBounds(const CRect& previous, const CRect& current) { - Layout(); -} - gfx::Size TextField::GetPreferredSize() { gfx::Insets insets; CalculateInsets(&insets); -- cgit v1.1