diff options
author | twiz@chromium.org <twiz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-12 20:27:10 +0000 |
---|---|---|
committer | twiz@chromium.org <twiz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-12 20:27:10 +0000 |
commit | c7bf140b32a1a6504e48716b90c6a13fd5c421d3 (patch) | |
tree | 876ada1f8ca6320060aab4db3790522989829d31 /views/controls/native | |
parent | 1be7eadb032256687abda35ae4b2ba4770757c70 (diff) | |
download | chromium_src-c7bf140b32a1a6504e48716b90c6a13fd5c421d3.zip chromium_src-c7bf140b32a1a6504e48716b90c6a13fd5c421d3.tar.gz chromium_src-c7bf140b32a1a6504e48716b90c6a13fd5c421d3.tar.bz2 |
Clone of issue 577015.
See http://codereview.chromium.org/577015 for the review status of this CL.
BUG=None
TEST=ExtensionApiTest.Popup
Review URL: http://codereview.chromium.org/600101
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38927 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/native')
-rw-r--r-- | views/controls/native/native_view_host.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/views/controls/native/native_view_host.cc b/views/controls/native/native_view_host.cc index 79abc1d..463f149 100644 --- a/views/controls/native/native_view_host.cc +++ b/views/controls/native/native_view_host.cc @@ -98,10 +98,15 @@ void NativeViewHost::Layout() { // Since widgets know nothing about the View hierarchy (they are direct // children of the Widget that hosts our View hierarchy) they need to be // positioned in the coordinate system of the Widget, not the current - // view. - gfx::Point top_left; + // view. Also, they should be positioned respecting the border insets + // of the native view. + gfx::Insets insets = GetInsets(); + gfx::Point top_left(insets.left(), insets.top()); ConvertPointToWidget(this, &top_left); - native_wrapper_->ShowWidget(top_left.x(), top_left.y(), width(), height()); + gfx::Rect local_bounds = GetLocalBounds(false); + native_wrapper_->ShowWidget(top_left.x(), top_left.y(), + local_bounds.width(), + local_bounds.height()); } else { native_wrapper_->HideWidget(); } |