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

Unified Diff: trunk/src/ui/views/widget/desktop_aura/desktop_screen_position_client.cc

Issue 22356003: Revert 215772 "Don't assume that widgets of TYPE_CONTROL are par..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 4 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 | trunk/src/ui/views/widget/desktop_aura/desktop_screen_position_client_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/ui/views/widget/desktop_aura/desktop_screen_position_client.cc
===================================================================
--- trunk/src/ui/views/widget/desktop_aura/desktop_screen_position_client.cc (revision 215791)
+++ trunk/src/ui/views/widget/desktop_aura/desktop_screen_position_client.cc (working copy)
@@ -68,16 +68,19 @@
const gfx::Rect& bounds,
const gfx::Display& display) {
// TODO: Use the 3rd parameter, |display|.
+ gfx::Point origin = bounds.origin();
aura::RootWindow* root = window->GetRootWindow();
+ aura::Window::ConvertPointToTarget(window->parent(), root, &origin);
+ if (window->type() == aura::client::WINDOW_TYPE_CONTROL) {
+ window->SetBounds(gfx::Rect(origin, bounds.size()));
+ return;
+ }
+
if (PositionWindowInScreenCoordinates(window)) {
// The caller expects windows we consider "embedded" to be placed in the
// screen coordinate system. So we need to offset the root window's
// position (which is in screen coordinates) from these bounds.
-
- gfx::Point origin = bounds.origin();
- aura::Window::ConvertPointToTarget(window->parent(), root, &origin);
-
gfx::Point host_origin = GetOrigin(root);
origin.Offset(-host_origin.x(), -host_origin.y());
window->SetBounds(gfx::Rect(origin, bounds.size()));
« no previous file with comments | « no previous file | trunk/src/ui/views/widget/desktop_aura/desktop_screen_position_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698