diff options
author | johnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-09 22:53:48 +0000 |
---|---|---|
committer | johnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-09 22:53:48 +0000 |
commit | 5b6699d3ed74c9382c5f9a2aa8c8f2500900c7f8 (patch) | |
tree | 8fb3e2746d838e92d63a3a1272a1aca00d4e746b | |
parent | 745adaf46dbebab2e661a80171c2e3f00f781c97 (diff) | |
download | chromium_src-5b6699d3ed74c9382c5f9a2aa8c8f2500900c7f8.zip chromium_src-5b6699d3ed74c9382c5f9a2aa8c8f2500900c7f8.tar.gz chromium_src-5b6699d3ed74c9382c5f9a2aa8c8f2500900c7f8.tar.bz2 |
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
-rw-r--r-- | chrome/browser/notifications/balloon_collection.cc | 9 |
1 files 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); } |