Bug 865228 - Remove unnecessary views from toolbar animation (r=mfinkle)
authorLucas Rocha <lucasr@mozilla.com>
Wed, 01 May 2013 17:32:01 +0100
changeset 141429 913ae89e272b3629bb20538e1a8301738093bd80
parent 141428 885e0fb3afca0139d326b683f4c9d589bc006ec9
child 141430 6d323a2eef78c08173a4bade366efccfe721c239
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 - Remove unnecessary views from toolbar animation (r=mfinkle)
mobile/android/base/BrowserToolbar.java
--- a/mobile/android/base/BrowserToolbar.java
+++ b/mobile/android/base/BrowserToolbar.java
@@ -585,30 +585,16 @@ public class BrowserToolbar implements T
             proxy.setTranslationX(curveTranslation);
 
             if (mHasSoftMenuButton) {
                 proxy = AnimatorProxy.create(mMenu);
                 proxy.setTranslationX(curveTranslation);
             }
         }
 
-        // Restore opacity of content elements in the toolbar immediatelly
-        // so that the response is immediate from user interaction in the
-        // awesome screen.
-        proxy = AnimatorProxy.create(mFavicon);
-        proxy.setAlpha(1);
-        proxy = AnimatorProxy.create(mSiteSecurity);
-        proxy.setAlpha(1);
-        proxy = AnimatorProxy.create(mTitle);
-        proxy.setAlpha(1);
-        proxy = AnimatorProxy.create(mForward);
-        proxy.setAlpha(mForward.isEnabled() ? 1 : 0);
-        proxy = AnimatorProxy.create(mBack);
-        proxy.setAlpha(1);
-
         final PropertyAnimator contentAnimator = new PropertyAnimator(250);
         contentAnimator.setUseHardwareLayer(false);
 
         // Shrink the awesome entry back to its original size
         contentAnimator.attach(mAwesomeBarRightEdge,
                                PropertyAnimator.Property.TRANSLATION_X,
                                0);
         contentAnimator.attach(mTabs,
@@ -681,35 +667,17 @@ public class BrowserToolbar implements T
         contentAnimator.setUseHardwareLayer(false);
 
         final int entryTranslation = getAwesomeBarEntryTranslation();
         final int curveTranslation = getAwesomeBarCurveTranslation();
 
         // Keep the entry highlighted during the animation
         mLayout.setSelected(true);
 
-        if (mActionItemBar.getVisibility() == View.VISIBLE) {
-            contentAnimator.attach(mFavicon,
-                                   PropertyAnimator.Property.ALPHA,
-                                   0);
-            contentAnimator.attach(mSiteSecurity,
-                                   PropertyAnimator.Property.ALPHA,
-                                   0);
-            contentAnimator.attach(mTitle,
-                                   PropertyAnimator.Property.ALPHA,
-                                   0);
-        }
-
         // Fade out all controls inside the toolbar
-        contentAnimator.attach(mForward,
-                               PropertyAnimator.Property.ALPHA,
-                               0);
-        contentAnimator.attach(mBack,
-                               PropertyAnimator.Property.ALPHA,
-                               0);
         contentAnimator.attach(mReader,
                                PropertyAnimator.Property.ALPHA,
                                0);
         contentAnimator.attach(mStop,
                                PropertyAnimator.Property.ALPHA,
                                0);
 
         // Slide the right side elements of the toolbar