diff options
author | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-06 15:30:47 +0000 |
---|---|---|
committer | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-06 15:30:47 +0000 |
commit | 3f05f9de010f7a09748477792719ed831fa584a1 (patch) | |
tree | f0732f1a6b8a4b7fb37fadf4dce0d0009ee282ec /views/controls/native | |
parent | 03838e231df0acc3dbcbb4d97198f5b82d13713b (diff) | |
download | chromium_src-3f05f9de010f7a09748477792719ed831fa584a1.zip chromium_src-3f05f9de010f7a09748477792719ed831fa584a1.tar.gz chromium_src-3f05f9de010f7a09748477792719ed831fa584a1.tar.bz2 |
keyboard: Fix visibility.
Fixing View::GetVisibleBounds (http://codereview.chromium.org/6993045/) breaks
the keyboard visibility. So layout the keyboard without any transform first,
then start the animation for sliding in.
Also, update the visibility first, then the size, so that the latter correctly
triggers a size update of the contents.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7112026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87986 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/native')
-rw-r--r-- | views/controls/native/native_view_host_views.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/views/controls/native/native_view_host_views.cc b/views/controls/native/native_view_host_views.cc index 8d28bb0..7d44818 100644 --- a/views/controls/native/native_view_host_views.cc +++ b/views/controls/native/native_view_host_views.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -60,8 +60,11 @@ void NativeViewHostViews::ShowWidget(int x, int y, int w, int h) { // x, y are in the coordinate system of the root view, but we're // already properly positioned by virtue of being an actual views // child of the NativeHostView, so disregard the origin. - host_->views_view()->SetBounds(0, 0, w, h); + // It is important to update the visibility first, so that when the bounds is + // set, the contents get notified of the resize (because resizing a hidden + // views may not actually resize the contents). host_->views_view()->SetVisible(true); + host_->views_view()->SetBounds(0, 0, w, h); } void NativeViewHostViews::HideWidget() { |