summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorbeng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-25 20:37:11 +0000
committerbeng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-25 20:37:11 +0000
commit4e676cc8c2c9de932162727b2e6a1a31ac176df9 (patch)
tree08782cfc2c8340398bc32dc790aa06cb68ed2ff0 /chrome
parenta33c9895d615ea1580a6e899cfb6f97fb2e0de07 (diff)
downloadchromium_src-4e676cc8c2c9de932162727b2e6a1a31ac176df9.zip
chromium_src-4e676cc8c2c9de932162727b2e6a1a31ac176df9.tar.gz
chromium_src-4e676cc8c2c9de932162727b2e6a1a31ac176df9.tar.bz2
Fix flicker of hover state on mouseover of tabs. The pulsating code was a little convoluted and was accidentally causing the non-highlighted state to be painted for the last frame of the animation.
B=1317898 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1326 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/tabs/tab_renderer.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/chrome/browser/tabs/tab_renderer.cc b/chrome/browser/tabs/tab_renderer.cc
index 3a8e2e2..3437900 100644
--- a/chrome/browser/tabs/tab_renderer.cc
+++ b/chrome/browser/tabs/tab_renderer.cc
@@ -562,13 +562,10 @@ void TabRenderer::PaintTabBackground(ChromeCanvas* canvas) {
PaintActiveTabBackground(canvas);
} else {
// Draw our hover state.
- Animation* animation = NULL;
- if (hover_animation_->IsAnimating()) {
- animation = hover_animation_.get();
- } else if (pulse_animation_->IsAnimating()) {
+ Animation* animation = hover_animation_.get();
+ if (pulse_animation_->IsAnimating())
animation = pulse_animation_.get();
- }
- if (animation && animation->GetCurrentValue() > 0) {
+ if (animation->GetCurrentValue() > 0) {
PaintHoverTabBackground(canvas, animation->GetCurrentValue() *
(win_util::ShouldUseVistaFrame() ?
kHoverOpacityVista : kHoverOpacity));