| Index: ui/views/bubble/bubble_frame_view.cc
|
| diff --git a/ui/views/bubble/bubble_frame_view.cc b/ui/views/bubble/bubble_frame_view.cc
|
| index 2dd002e5a7192c4fa1d47b4089a66f845eb4c08c..ef2e9dd1a1eb1d3c1adf9f1fd58bd407bfd931a2 100644
|
| --- a/ui/views/bubble/bubble_frame_view.cc
|
| +++ b/ui/views/bubble/bubble_frame_view.cc
|
| @@ -132,7 +132,7 @@ Button* BubbleFrameView::CreateCloseButton(ButtonListener* listener) {
|
| gfx::Rect BubbleFrameView::GetBoundsForClientView() const {
|
| gfx::Rect client_bounds = GetContentsBounds();
|
| client_bounds.Inset(GetInsets());
|
| - if (footnote_container_) {
|
| + if (footnote_container_ && footnote_container_->visible()) {
|
| client_bounds.set_height(client_bounds.height() -
|
| footnote_container_->height());
|
| }
|
| @@ -340,7 +340,7 @@ void BubbleFrameView::Layout() {
|
| bounds.set_width(title_->bounds().right() - bounds.x());
|
| bounds.set_height(title_height);
|
|
|
| - if (footnote_container_) {
|
| + if (footnote_container_ && footnote_container_->visible()) {
|
| const int width = contents_bounds.width();
|
| const int height = footnote_container_->GetHeightForWidth(width);
|
| footnote_container_->SetBounds(
|
| @@ -416,6 +416,7 @@ void BubbleFrameView::SetFootnoteView(View* view) {
|
| footnote_container_->SetBorder(
|
| CreateSolidSidedBorder(1, 0, 0, 0, kFootnoteBorderColor));
|
| footnote_container_->AddChildView(view);
|
| + footnote_container_->SetVisible(view->visible());
|
| AddChildView(footnote_container_);
|
| }
|
|
|
| @@ -541,7 +542,10 @@ gfx::Size BubbleFrameView::GetSizeForClientSize(
|
| size.Enlarge(client_insets.width(), client_insets.height());
|
| size.SetToMax(gfx::Size(title_bar_width, 0));
|
|
|
| - if (footnote_container_)
|
| + if (footnote_container_ && footnote_container_->child_count() >= 1)
|
| + footnote_container_->SetVisible(
|
| + footnote_container_->child_at(0)->visible());
|
| + if (footnote_container_ && footnote_container_->visible())
|
| size.Enlarge(0, footnote_container_->GetHeightForWidth(size.width()));
|
|
|
| DialogDelegate* dialog_delegate =
|
|
|