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

Unified Diff: chrome/browser/ui/views/frame/browser_view_layout.cc

Issue 13974003: alternate ntp: fix content origin when overlay shrinks to shorter than top bars (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed scott's comment Created 7 years, 8 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 | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/views/frame/contents_container.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/browser_view_layout.cc
diff --git a/chrome/browser/ui/views/frame/browser_view_layout.cc b/chrome/browser/ui/views/frame/browser_view_layout.cc
index 97538653e1a2fbc6eb66198d8842d73ce37888b6..52432b3e850f67885c2566b392bd0a19ee7a4968 100644
--- a/chrome/browser/ui/views/frame/browser_view_layout.cc
+++ b/chrome/browser/ui/views/frame/browser_view_layout.cc
@@ -339,6 +339,10 @@ void BrowserViewLayout::Layout(views::View* host) {
// Now set the contents to display at their previous origin if we just hid the
// bookmark and/or infobars.
if (active_top_margin == 0 && !old_contents_origin.IsOrigin()) {
+ // Retrieve the overlay height again since it may have changed in layouts
+ // triggered in LayoutTabContents().
+ overlay_height = contents_container_->overlay_height();
+ // Get the new origin of contents.
gfx::Point new_contents_origin(contents->bounds().origin());
views::View::ConvertPointToTarget(contents->parent(), browser_view_,
&new_contents_origin);
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/views/frame/contents_container.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698