| 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_) {
|
|
|