Bug 889621 - Rename setUrlEditContainerVisibility's argument for better readability (r=sriram)
authorLucas Rocha <lucasr@mozilla.com>
Fri, 26 Jul 2013 14:19:36 +0100
changeset 143453 7136d73be7a32490a76238c3bde5d121d4f1be2e
parent 143452 423ebd7660dc3b858f9ff9bf4a7221fc18155f64
child 143454 a3798b8464f3c998a529eb892bdc5aec7c73ad1d
push id25130
push userlrocha@mozilla.com
push dateWed, 21 Aug 2013 09:41:27 +0000
treeherdermozilla-central@b2486721572e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssriram
bugs889621
milestone25.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 889621 - Rename setUrlEditContainerVisibility's argument for better readability (r=sriram)
mobile/android/base/BrowserToolbar.java
--- a/mobile/android/base/BrowserToolbar.java
+++ b/mobile/android/base/BrowserToolbar.java
@@ -1199,25 +1199,25 @@ public class BrowserToolbar extends Geck
     private void hideUrlEditContainer() {
         setUrlEditContainerVisibility(false, null);
     }
 
     private void hideUrlEditContainer(PropertyAnimator animator) {
         setUrlEditContainerVisibility(false, animator);
     }
 
-    private void setUrlEditContainerVisibility(final boolean visible, PropertyAnimator animator) {
-        final View viewToShow = (visible ? mUrlEditContainer : mUrlDisplayContainer);
-        final View viewToHide = (visible ? mUrlDisplayContainer : mUrlEditContainer);
+    private void setUrlEditContainerVisibility(final boolean showEditContainer, PropertyAnimator animator) {
+        final View viewToShow = (showEditContainer ? mUrlEditContainer : mUrlDisplayContainer);
+        final View viewToHide = (showEditContainer ? mUrlDisplayContainer : mUrlEditContainer);
 
         if (animator == null) {
             viewToHide.setVisibility(View.GONE);
             viewToShow.setVisibility(View.VISIBLE);
 
-            if (visible) {
+            if (showEditContainer) {
                 mUrlEditText.requestFocus();
                 showSoftInput();
             }
 
             return;
         }
 
         ViewHelper.setAlpha(viewToShow, 0.0f);
@@ -1229,28 +1229,28 @@ public class BrowserToolbar extends Geck
                         PropertyAnimator.Property.ALPHA,
                         0.0f);
 
         animator.addPropertyAnimationListener(new PropertyAnimator.PropertyAnimationListener() {
             @Override
             public void onPropertyAnimationStart() {
                 viewToShow.setVisibility(View.VISIBLE);
 
-                if (visible) {
+                if (showEditContainer) {
                     ViewHelper.setAlpha(mGo, 0.0f);
                     mUrlEditText.requestFocus();
                 }
             }
 
             @Override
             public void onPropertyAnimationEnd() {
                 ViewHelper.setAlpha(viewToHide, 1.0f);
                 viewToHide.setVisibility(View.GONE);
 
-                if (visible) {
+                if (showEditContainer) {
                     ViewHelper.setAlpha(mGo, 1.0f);
                     showSoftInput();
                 }
             }
         });
     }
 
     public boolean isEditing() {