Commit 8ce2958e authored by pkotwicz@chromium.org's avatar pkotwicz@chromium.org

Fix sad tab in native_widget_views

Review URL: http://codereview.chromium.org/8524020

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110112 0039d316-1c4b-4281-b951-d872f2087c98
parent 22711d6c
......@@ -153,8 +153,8 @@ void NativeWidgetViews::InitNativeWidget(const Widget::InitParams& params) {
parent_view = widget->GetChildViewParent();
}
gfx::Rect bounds = AdjustRectOriginForParentWidget(params.bounds,
parent_);
gfx::Rect bounds = GetWidget()->is_top_level() ?
AdjustRectOriginForParentWidget(params.bounds, parent_) : params.bounds;
view_ = new internal::NativeWidgetView(this);
view_->SetBoundsRect(bounds);
view_->SetVisible(params.type == Widget::InitParams::TYPE_CONTROL);
......@@ -352,7 +352,10 @@ gfx::Rect NativeWidgetViews::GetRestoredBounds() const {
void NativeWidgetViews::SetBounds(const gfx::Rect& bounds) {
// |bounds| are supplied in the coordinates of the parent.
view_->SetBoundsRect(AdjustRectOriginForParentWidget(bounds, parent_));
if (GetWidget()->is_top_level())
view_->SetBoundsRect(AdjustRectOriginForParentWidget(bounds, parent_));
else
view_->SetBoundsRect(bounds);
}
void NativeWidgetViews::SetSize(const gfx::Size& size) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment