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

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: . 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
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..4b75ef47bc77154fb83ea4b6fc7a4e49a8c7cd49 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,7 +494,8 @@ 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() {
@@ -502,7 +503,7 @@ void DialogClientView::LayoutDialogButtons() {
gfx::Rect extra_bounds;
int bottom_y = lb.bottom() - style_params_.button_vedge_margin;
if (footnote_view_)
sky 2013/02/14 22:47:10 I think you can remove the if.
Dan Beam 2013/02/15 01:48:31 Done.
- bottom_y -= footnote_view_->GetPreferredSize().height();
+ bottom_y -= GetFootnoteViewHeight();
int button_height = GetButtonsHeight();
if (cancel_button_) {

Powered by Google App Engine
This is Rietveld 408576698