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

Unified Diff: ui/views/bubble/bubble_dialog_delegate.cc

Issue 2692113002: harmony: fix sizing on webusb chooser dialog (Closed)
Patch Set: const -> constexpr Created 3 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/website_settings/chooser_bubble_ui_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/bubble/bubble_dialog_delegate.cc
diff --git a/ui/views/bubble/bubble_dialog_delegate.cc b/ui/views/bubble/bubble_dialog_delegate.cc
index 735a2237bcb536fb0bb272a2fa06b6abff199ae6..c79301f31af25aec49f0151b2c027b8eefdcf1ef 100644
--- a/ui/views/bubble/bubble_dialog_delegate.cc
+++ b/ui/views/bubble/bubble_dialog_delegate.cc
@@ -231,9 +231,10 @@ gfx::Rect BubbleDialogDelegateView::GetBubbleBounds() {
// The argument rect has its origin at the bubble's arrow anchor point;
// its size is the preferred size of the bubble's client view (this view).
bool anchor_minimized = anchor_widget() && anchor_widget()->IsMinimized();
+ gfx::Size size = GetWidget()->client_view()->GetPreferredSize();
sky 2017/02/14 21:24:35 Can you write test coverage of this?
Elly Fong-Jones 2017/02/15 17:43:39 Done.
+ size.SetToMax(GetMinimumSize());
return GetBubbleFrameView()->GetUpdatedWindowBounds(
- GetAnchorRect(), GetWidget()->client_view()->GetPreferredSize(),
- adjust_if_offscreen_ && !anchor_minimized);
+ GetAnchorRect(), size, adjust_if_offscreen_ && !anchor_minimized);
}
const gfx::FontList& BubbleDialogDelegateView::GetTitleFontList() const {
« no previous file with comments | « chrome/browser/ui/views/website_settings/chooser_bubble_ui_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698