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

Unified Diff: ui/views/window/dialog_client_view.cc

Issue 12225095: Interactive autofill: Adds footnote view to accept legal documents in the UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sky@ review Created 7 years, 10 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/autofill/autofill_dialog_views.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/window/dialog_client_view.cc
diff --git a/ui/views/window/dialog_client_view.cc b/ui/views/window/dialog_client_view.cc
index ba1698812e6e3c5b2bfad31c089d5eb218ff3496..2a8064714150be13028d23a9725d944dcf7a5b46 100644
--- a/ui/views/window/dialog_client_view.cc
+++ b/ui/views/window/dialog_client_view.cc
@@ -371,8 +371,8 @@ gfx::Size DialogClientView::GetPreferredSize() {
}
prefsize.Enlarge(0, button_height);
- if (footnote_view_) {
- gfx::Size footnote_size = footnote_view_->GetPreferredSize();
+ if (footnote_view_ && footnote_view_->visible()) {
+ const gfx::Size& footnote_size = footnote_view_->GetPreferredSize();
prefsize.Enlarge(0, footnote_size.height());
prefsize.set_width(std::max(prefsize.width(), footnote_size.width()));
}
@@ -494,15 +494,15 @@ int DialogClientView::GetDialogButtonsAreaHeight() const {
}
int DialogClientView::GetFootnoteViewHeight() const {
- return footnote_view_ ? footnote_view_->GetPreferredSize().height() : 0;
+ return footnote_view_ && footnote_view_->visible() ?
+ footnote_view_->GetPreferredSize().height() : 0;
}
void DialogClientView::LayoutDialogButtons() {
gfx::Rect lb = GetContentsBounds();
gfx::Rect extra_bounds;
- int bottom_y = lb.bottom() - style_params_.button_vedge_margin;
- if (footnote_view_)
- bottom_y -= footnote_view_->GetPreferredSize().height();
+ int bottom_y = lb.bottom() - style_params_.button_vedge_margin -
+ GetFootnoteViewHeight();
int button_height = GetButtonsHeight();
if (cancel_button_) {
« no previous file with comments | « chrome/browser/ui/views/autofill/autofill_dialog_views.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698