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

Unified Diff: chrome/browser/ui/views/infobars/confirm_infobar.cc

Issue 1700383002: [MD] Fix clipping of infobar child elements (particularly close button). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: adjust comment Created 4 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: chrome/browser/ui/views/infobars/confirm_infobar.cc
diff --git a/chrome/browser/ui/views/infobars/confirm_infobar.cc b/chrome/browser/ui/views/infobars/confirm_infobar.cc
index 5e00bcada88c00d7ce7bd4632fd9850f2e25d042..7deab920a909a4ca9fb773992c4385d3b442ac26 100644
--- a/chrome/browser/ui/views/infobars/confirm_infobar.cc
+++ b/chrome/browser/ui/views/infobars/confirm_infobar.cc
@@ -67,7 +67,7 @@ void ConfirmInfoBar::ViewHierarchyChanged(
if (details.is_add && details.child == this && (label_ == NULL)) {
ConfirmInfoBarDelegate* delegate = GetDelegate();
label_ = CreateLabel(delegate->GetMessageText());
- AddChildView(label_);
+ AddViewToContentArea(label_);
if (delegate->GetButtons() & ConfirmInfoBarDelegate::BUTTON_OK) {
if (delegate->OKButtonTriggersUACPrompt()) {
@@ -82,7 +82,7 @@ void ConfirmInfoBar::ViewHierarchyChanged(
ok_button_ = CreateTextButton(
this, delegate->GetButtonLabel(ConfirmInfoBarDelegate::BUTTON_OK));
}
- AddChildView(ok_button_);
+ AddViewToContentArea(ok_button_);
ok_button_->SizeToPreferredSize();
}
@@ -90,13 +90,13 @@ void ConfirmInfoBar::ViewHierarchyChanged(
cancel_button_ = CreateTextButton(
this,
delegate->GetButtonLabel(ConfirmInfoBarDelegate::BUTTON_CANCEL));
- AddChildView(cancel_button_);
+ AddViewToContentArea(cancel_button_);
cancel_button_->SizeToPreferredSize();
}
base::string16 link_text(delegate->GetLinkText());
link_ = CreateLink(link_text, this);
- AddChildView(link_);
+ AddViewToContentArea(link_);
}
// This must happen after adding all other children so InfoBarView can ensure
« no previous file with comments | « chrome/browser/ui/views/infobars/alternate_nav_infobar_view.cc ('k') | chrome/browser/ui/views/infobars/infobar_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698