Bug 865228 - Don't animate forward button when switching tabs (r=mfinkle)
authorLucas Rocha <lucasr@mozilla.com>
Wed, 01 May 2013 17:32:02 +0100
changeset 137261 eeabfd7af89a701fef27955be6b119f7ed4a263c
parent 137260 8c5e1ae70259b7c0097bdad3136798b4eef5ad7a
child 137262 4ee7589adadd227ae7ff8a56d4a2a2a21cb9218b
push id3752
push userlsblakk@mozilla.com
push dateMon, 13 May 2013 17:21:10 +0000
treeherdermozilla-aurora@1580544aef0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs865228
milestone23.0a1
Bug 865228 - Don't animate forward button when switching tabs (r=mfinkle)
mobile/android/base/BrowserToolbar.java
--- a/mobile/android/base/BrowserToolbar.java
+++ b/mobile/android/base/BrowserToolbar.java
@@ -1058,17 +1058,18 @@ public class BrowserToolbar implements T
 
         // Save the state on the forward button so that we can skip animations
         // when there's nothing to change
         mForward.setEnabled(enabled);
 
         if (mForward.getVisibility() != View.VISIBLE)
             return;
 
-        mForwardAnim = new PropertyAnimator(FORWARD_ANIMATION_DURATION);
+        // We want the forward button to show immediately when switching tabs
+        mForwardAnim = new PropertyAnimator(mSwitchingTabs ? 10 : FORWARD_ANIMATION_DURATION);
         final int width = mForward.getWidth() / 2;
 
         mForwardAnim.setPropertyAnimationListener(new PropertyAnimator.PropertyAnimationListener() {
             @Override
             public void onPropertyAnimationStart() {
                 if (!enabled) {
                     // Set the margin before the transition when hiding the forward button. We
                     // have to do this so that the favicon isn't clipped during the transition