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

Side by Side Diff: chrome/browser/ui/views/autofill/autofill_dialog_views.cc

Issue 23653015: rAc: take footnote view into account when calculating dialog height. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/autofill/autofill_dialog_views.h" 5 #include "chrome/browser/ui/views/autofill/autofill_dialog_views.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 1782 matching lines...) Expand 10 before | Expand all | Expand 10 after
1793 // Show as much of the scroll view as is possible without going past the 1793 // Show as much of the scroll view as is possible without going past the
1794 // bottom of the browser window. 1794 // bottom of the browser window.
1795 views::Widget* widget = 1795 views::Widget* widget =
1796 views::Widget::GetTopLevelWidgetForNativeView( 1796 views::Widget::GetTopLevelWidgetForNativeView(
1797 delegate_->GetWebContents()->GetView()->GetNativeView()); 1797 delegate_->GetWebContents()->GetView()->GetNativeView());
1798 int browser_window_height = 1798 int browser_window_height =
1799 widget ? widget->GetContentsView()->bounds().height() : INT_MAX; 1799 widget ? widget->GetContentsView()->bounds().height() : INT_MAX;
1800 const int kWindowDecorationHeight = 200; 1800 const int kWindowDecorationHeight = 200;
1801 int browser_constrained_height = 1801 int browser_constrained_height =
1802 browser_window_height - height - kWindowDecorationHeight; 1802 browser_window_height - height - kWindowDecorationHeight;
1803 if (footnote_view_->visible())
1804 browser_constrained_height -= footnote_view_->GetHeightForWidth(width);
1805
1803 int scroll_height = std::min( 1806 int scroll_height = std::min(
1804 scroll_size.height(), 1807 scroll_size.height(),
1805 std::max(kMinimumContentsHeight, browser_constrained_height)); 1808 std::max(kMinimumContentsHeight, browser_constrained_height));
1806 1809
1807 height += scroll_height; 1810 height += scroll_height;
1808 } 1811 }
1809 1812
1810 return gfx::Size(width + insets.width(), height + insets.height()); 1813 return gfx::Size(width + insets.width(), height + insets.height());
1811 } 1814 }
1812 1815
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
2348 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) 2351 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section)
2349 : section(section), 2352 : section(section),
2350 container(NULL), 2353 container(NULL),
2351 manual_input(NULL), 2354 manual_input(NULL),
2352 suggested_info(NULL), 2355 suggested_info(NULL),
2353 suggested_button(NULL) {} 2356 suggested_button(NULL) {}
2354 2357
2355 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} 2358 AutofillDialogViews::DetailsGroup::~DetailsGroup() {}
2356 2359
2357 } // namespace autofill 2360 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698