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

Unified Diff: chrome/browser/ui/panels/panel_bounds_animation.cc

Issue 9117007: Avoid divide by zero when animating panel bounds. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/panels/panel_bounds_animation.cc
diff --git a/chrome/browser/ui/panels/panel_bounds_animation.cc b/chrome/browser/ui/panels/panel_bounds_animation.cc
index cdf5c5abf913c48ffc97a84d6aa987ccd2025654..79af324c9dc0f7141d2a2d3a91dea5863aef42f0 100644
--- a/chrome/browser/ui/panels/panel_bounds_animation.cc
+++ b/chrome/browser/ui/panels/panel_bounds_animation.cc
@@ -29,7 +29,8 @@ PanelBoundsAnimation::PanelBoundsAnimation(ui::AnimationDelegate* target,
// Initialize animation differently in this case, using fast-pause-slow
// method, see below for more details.
int duration = kSetBoundsAnimationMs;
- if (panel_->expansion_state() == Panel::MINIMIZED) {
+ if (initial_bounds.height() > final_bounds.height() &&
+ panel_->expansion_state() == Panel::MINIMIZED) {
double hidden_title_height =
panel_->TitleOnlyHeight() - final_bounds.height();
double distance_y = initial_bounds.height() - final_bounds.height();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698