Backed out changesets d8fd745a0095 and 30b7ebdf5c99 (bug 924480) for robocop-3 failures.

This commit is contained in:
Ryan VanderMeulen 2013-10-18 15:36:21 -04:00
parent 06829092ec
commit 948b93f1eb
3 changed files with 8 additions and 57 deletions

View File

@ -166,12 +166,6 @@ abstract public class BrowserApp extends GeckoApp
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() {
@ -1579,38 +1573,7 @@ abstract public class BrowserApp extends GeckoApp
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() {
@ -1623,12 +1586,6 @@ abstract public class BrowserApp extends GeckoApp
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();
}

View File

@ -387,7 +387,6 @@ public class BrowserToolbar extends GeckoRelativeLayout
}
if (keyCode == KeyEvent.KEYCODE_BACK) {
// Drop the virtual keyboard.
clearFocus();
return true;
}

View File

@ -55,25 +55,20 @@
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"