Backed out changesets d8fd745a0095 and 30b7ebdf5c99 (bug 924480) for robocop-3 failures.
authorRyan VanderMeulen <ryanvm@gmail.com>
Fri, 18 Oct 2013 15:36:21 -0400
changeset 165169 565c8f1ba90bc285c2f2c80f2ed6193461920a56
parent 165168 3daff401c7ab231fbd2a4137cbf2fd8ffc7fcf04
child 165170 a38c20a176039cc6e70d7ddcae4eb82d1fd867b3
child 165199 5861a2de43d355d16b1581466d689667ff29027e
child 165218 f1b97193d16237026d14ebabc35d362bede561ce
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs924480
milestone27.0a1
backs outd8fd745a009558dd0226a0a86b0a589390b7af94
30b7ebdf5c99c54f0cb6969f4295e97a9638845a
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
Backed out changesets d8fd745a0095 and 30b7ebdf5c99 (bug 924480) for robocop-3 failures.
mobile/android/base/BrowserApp.java
mobile/android/base/BrowserToolbar.java
mobile/android/base/resources/layout/gecko_app.xml
--- a/mobile/android/base/BrowserApp.java
+++ b/mobile/android/base/BrowserApp.java
@@ -161,22 +161,16 @@ abstract public class BrowserApp extends
     private Integer mPrefObserverId;
 
     private SharedPreferencesHelper mSharedPreferencesHelper;
 
     private OrderedBroadcastHelper mOrderedBroadcastHelper;
 
     private BrowserHealthReporter mBrowserHealthReporter;
 
-    // The animator used to toggle HomePager visibility has a race where if the HomePager is shown
-    // (starting the animation), the HomePager is hidden, and the HomePager animation completes,
-    // both the web content and the HomePager will be hidden. This flag is used to prevent the
-    // race by determining if the web content should be hidden at the animation's end.
-    private boolean mHideWebContentOnAnimationEnd = false;
-
     private SiteIdentityPopup mSiteIdentityPopup;
 
     public SiteIdentityPopup getSiteIdentityPopup() {
         if (mSiteIdentityPopup == null)
             mSiteIdentityPopup = new SiteIdentityPopup(this);
 
         return mSiteIdentityPopup;
     }
@@ -1574,66 +1568,29 @@ abstract public class BrowserApp extends
         if (isDynamicToolbarEnabled() && mLayerView != null) {
             mLayerView.getLayerMarginsAnimator().showMargins(true);
         }
 
         if (mHomePager == null) {
             final ViewStub homePagerStub = (ViewStub) findViewById(R.id.home_pager_stub);
             mHomePager = (HomePager) homePagerStub.inflate();
         }
-
         mHomePager.show(getSupportFragmentManager(), page, animator);
-
-        // Hide the web content so it cannot be focused by screen readers.
-        hideWebContentOnPropertyAnimationEnd(animator);
-    }
-
-    private void hideWebContentOnPropertyAnimationEnd(final PropertyAnimator animator) {
-        if (animator == null) {
-            hideWebContent();
-            return;
-        }
-
-        animator.addPropertyAnimationListener(new PropertyAnimator.PropertyAnimationListener() {
-            @Override
-            public void onPropertyAnimationStart() {
-                mHideWebContentOnAnimationEnd = true;
-            }
-
-            @Override
-            public void onPropertyAnimationEnd() {
-                if (mHideWebContentOnAnimationEnd) {
-                    hideWebContent();
-                }
-            }
-        });
-    }
-
-    private void hideWebContent() {
-        // The view is set to INVISIBLE, rather than GONE, to avoid
-        // the additional requestLayout() call.
-        mLayerView.setVisibility(View.INVISIBLE);
     }
 
     private void hideHomePager() {
         if (!isHomePagerVisible()) {
             return;
         }
 
         final Tab tab = Tabs.getInstance().getSelectedTab();
         if (tab != null && isAboutHome(tab)) {
             return;
         }
 
-        // Prevent race in hiding web content - see declaration for more info.
-        mHideWebContentOnAnimationEnd = false;
-
-        // Display the previously hidden web content (which prevented screen reader access).
-        mLayerView.setVisibility(View.VISIBLE);
-
         if (mHomePager != null) {
             mHomePager.hide();
         }
 
         mBrowserToolbar.setNextFocusDownId(R.id.layer_view);
 
         // Refresh toolbar height to possibly restore the toolbar padding
         refreshToolbarHeight();
--- a/mobile/android/base/BrowserToolbar.java
+++ b/mobile/android/base/BrowserToolbar.java
@@ -382,17 +382,16 @@ public class BrowserToolbar extends Geck
                         if (mCommitListener != null) {
                             mCommitListener.onCommit();
                         }
                         return true;
                     }
                 }
 
                 if (keyCode == KeyEvent.KEYCODE_BACK) {
-                    // Drop the virtual keyboard.
                     clearFocus();
                     return true;
                 }
 
                 return false;
             }
         });
 
--- a/mobile/android/base/resources/layout/gecko_app.xml
+++ b/mobile/android/base/resources/layout/gecko_app.xml
@@ -50,35 +50,30 @@
 
         <RelativeLayout android:id="@+id/camera_layout"
                         android:layout_height="wrap_content"
                         android:layout_width="wrap_content"
                         android:layout_alignParentRight="true"
                         android:layout_alignParentBottom="true">
         </RelativeLayout>
 
-        <FrameLayout android:id="@+id/search_container"
-                     android:layout_width="fill_parent"
-                     android:layout_height="fill_parent"
-                     android:layout_below="@+id/browser_toolbar"
-                     android:background="@android:color/white"
-                     android:visibility="invisible"/>
-
-        <!-- When focus is cleared from from BrowserToolbar's EditText to
-             lower the virtual keyboard, focus will be returned to the root
-             view. To make sure the EditText is not the first focusable view in
-             the root view, BrowserToolbar should be specified as low in the
-             view hierarchy as possible. -->
-        <org.mozilla.gecko.BrowserToolbar android:id="@id/browser_toolbar"
+        <org.mozilla.gecko.BrowserToolbar android:id="@+id/browser_toolbar"
                 style="@style/BrowserToolbar"
                 android:layout_width="fill_parent"
                 android:layout_height="@dimen/browser_toolbar_height"
                 android:clickable="true"
                 android:focusable="true"/>
 
+        <FrameLayout android:id="@+id/search_container"
+                     android:layout_width="fill_parent"
+                     android:layout_height="fill_parent"
+                     android:layout_below="@id/browser_toolbar"
+                     android:background="@android:color/white"
+                     android:visibility="invisible"/>
+
     </view>
 
     <LinearLayout android:id="@+id/toast"
                   style="@style/Toast">
 
         <TextView android:id="@+id/toast_message"
                   style="@style/ToastMessage" />