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

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

Issue 399343003: Make WebContents get the correct screen coordinates when initially added. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: set kHostViewKey earlier 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
« no previous file with comments | « no previous file | ui/views/controls/native/native_view_host_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..2e06f50c42a2fee1d77423eb6d6d59c410f8398b 100644
--- a/ui/views/controls/native/native_view_host_aura.cc
+++ b/ui/views/controls/native/native_view_host_aura.cc
@@ -147,14 +147,14 @@ void NativeViewHostAura::AddClippingWindow() {
RemoveClippingWindow();
gfx::Rect bounds = host_->native_view()->bounds();
+ host_->native_view()->SetProperty(aura::client::kHostWindowKey,
+ host_->GetWidget()->GetNativeView());
+ Widget::ReparentNativeView(host_->native_view(),
+ &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);
« no previous file with comments | « no previous file | ui/views/controls/native/native_view_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698