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 141433 eeabfd7af89a701fef27955be6b119f7ed4a263c
parent 141432 8c5e1ae70259b7c0097bdad3136798b4eef5ad7a
child 141434 4ee7589adadd227ae7ff8a56d4a2a2a21cb9218b
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs865228
milestone23.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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