Bug 935473 - Add comment explaining animateForwardButton's behaviour (r=wesj)
authorLucas Rocha <lucasr@mozilla.com>
Thu, 05 Dec 2013 16:26:35 +0000
changeset 174652 1353c0a6159aaa485057604d0aadfd360e4c3836
parent 174651 a2e2a341e543f13c2cf0532ddcad12ee3e151c42
child 174653 fbc58d273b9c92e6b5e72795dbfe12a272bfd86c
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswesj
bugs935473
milestone28.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 935473 - Add comment explaining animateForwardButton's behaviour (r=wesj)
mobile/android/base/toolbar/BrowserToolbar.java
--- a/mobile/android/base/toolbar/BrowserToolbar.java
+++ b/mobile/android/base/toolbar/BrowserToolbar.java
@@ -1381,16 +1381,18 @@ public class BrowserToolbar extends Geck
         button.setEnabled(enabled);
     }
 
     public void updateBackButton(Tab tab) {
         setButtonEnabled(mBack, canDoBack(tab));
     }
 
     private void animateForwardButton(final boolean visible) {
+        // If the forward button is not visible, we must be
+        // in the phone UI.
         if (mForward.getVisibility() != View.VISIBLE)
             return;
 
         // if the forward button's margin is non-zero, this means it has already
         // been animated to be visible¬ł and vice-versa.
         MarginLayoutParams fwdParams = (MarginLayoutParams) mForward.getLayoutParams();
         if ((fwdParams.leftMargin > mDefaultForwardMargin && visible) ||
             (fwdParams.leftMargin == mDefaultForwardMargin && !visible)) {