From 5b6699d3ed74c9382c5f9a2aa8c8f2500900c7f8 Mon Sep 17 00:00:00 2001 From: "johnnyg@chromium.org" Date: Fri, 9 Apr 2010 22:53:48 +0000 Subject: Make sure small notifications get shown. Previous change to make sure notifications don't shrink caused a regression when the notification is of minimal size (like the one from html5rocks.com), since this is the same as the pre-show size. BUG=40817 TEST=see bug Review URL: http://codereview.chromium.org/1558031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44148 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/notifications/balloon_collection.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/chrome/browser/notifications/balloon_collection.cc b/chrome/browser/notifications/balloon_collection.cc index 74f14dd..1aca3e2 100644 --- a/chrome/browser/notifications/balloon_collection.cc +++ b/chrome/browser/notifications/balloon_collection.cc @@ -86,11 +86,14 @@ void BalloonCollectionImpl::ResizeBalloon(Balloon* balloon, std::max(Layout::min_balloon_height(), std::min(Layout::max_balloon_height(), size.height()))); - // Only allow the balloons to grow in size. This avoids flickering - // on Mac OS which sometimes rapidly reports alternating sizes. + // Don't allow balloons to shrink. This avoids flickering + // on Mac OS which sometimes rapidly reports alternating sizes. Special + // case for setting the minimum value. gfx::Size old_size = balloon->content_size(); if (real_size.width() > old_size.width() || - real_size.height() > old_size.height()) { + real_size.height() > old_size.height() || + real_size == gfx::Size(Layout::min_balloon_width(), + Layout::min_balloon_height())) { balloon->set_content_size(real_size); PositionBalloons(true); } -- cgit v1.1