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

Unified Diff: content/browser/web_contents/web_contents_view_aura.cc

Issue 10984032: Makes wm2 reset the bounds immediately after cloning the layer for (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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: content/browser/web_contents/web_contents_view_aura.cc
diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
index 01460c7fd2a3213ad28dea9a3a6d82ee86f68c7c..ddb410fc1ff5ad02f1cd429e8a49a2b6c0ef6f62 100644
--- a/content/browser/web_contents/web_contents_view_aura.cc
+++ b/content/browser/web_contents/web_contents_view_aura.cc
@@ -498,8 +498,9 @@ void WebContentsViewAura::OnBoundsChanged(const gfx::Rect& old_bounds,
if (window_->children()[i]->GetProperty(
aura::client::kConstrainedWindowKey)) {
gfx::Rect bounds = window_->children()[i]->bounds();
- bounds.Offset((new_bounds.width() - old_bounds.width()) / 2,
- (new_bounds.height() - old_bounds.height()) / 2);
+ bounds.set_origin(
+ gfx::Point((new_bounds.width() - bounds.width()) / 2,
+ (new_bounds.height() - bounds.height()) / 2));
window_->children()[i]->SetBounds(bounds);
}
}

Powered by Google App Engine
This is Rietveld 408576698