Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(444)

Unified Diff: ui/views/controls/native/native_view_host_aura.cc

Issue 397293005: Fix positioning of children of NativeViewHostAura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: delete test Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/views/controls/native/native_view_host_aura.cc
diff --git a/ui/views/controls/native/native_view_host_aura.cc b/ui/views/controls/native/native_view_host_aura.cc
index f690f0574fae9569ff7a6eb73c9470770e691d34..748b6cf3a22442bd538c8799792229d26b96fa0a 100644
--- a/ui/views/controls/native/native_view_host_aura.cc
+++ b/ui/views/controls/native/native_view_host_aura.cc
@@ -18,6 +18,7 @@ namespace views {
NativeViewHostAura::NativeViewHostAura(NativeViewHost* host)
: host_(host),
clipping_window_(NULL) {
+ clipping_window_.SetType(ui::wm::WINDOW_TYPE_CONTROL);
sky 2014/07/22 22:36:59 As this is so subtle I was hoping for a comment he
Evan Stade 2014/07/22 22:41:19 I will add one.
clipping_window_.Init(aura::WINDOW_LAYER_NOT_DRAWN);
clipping_window_.set_owned_by_parent(false);
clipping_window_.SetName("NativeViewHostAuraClip");
@@ -147,14 +148,14 @@ void NativeViewHostAura::AddClippingWindow() {
RemoveClippingWindow();
gfx::Rect bounds = host_->native_view()->bounds();
+ Widget::ReparentNativeView(host_->native_view(),
sky 2014/07/22 22:36:59 Did you intend to include this?
Evan Stade 2014/07/22 22:41:19 no
+ &clipping_window_);
if (host_->GetWidget()->GetNativeView()) {
Widget::ReparentNativeView(&clipping_window_,
host_->GetWidget()->GetNativeView());
}
host_->native_view()->SetProperty(aura::client::kHostWindowKey,
host_->GetWidget()->GetNativeView());
- Widget::ReparentNativeView(host_->native_view(),
- &clipping_window_);
clipping_window_.SetBounds(bounds);
bounds.set_origin(gfx::Point(0, 0));
host_->native_view()->SetBounds(bounds);

Powered by Google App Engine
This is Rietveld 408576698