Backed out 3 changesets (bug 1107636) for android mochitest bustage CLOSED TREE

Backed out changeset ced71b78683d (bug 1107636)
Backed out changeset a1efec5e79de (bug 1107636)
Backed out changeset 6a8430385299 (bug 1107636)

--HG--
extra : commitid : ErD0sqMmTe
This commit is contained in:
Wes Kocher 2015-11-09 11:28:13 -08:00
Родитель f1d4d15e39
Коммит ad6867e19d
7 изменённых файлов: 27 добавлений и 21 удалений

Просмотреть файл

@ -1378,7 +1378,7 @@ public class BrowserApp extends GeckoApp
}
private void setToolbarMargin(int margin) {
((ViewGroup.MarginLayoutParams) mGeckoLayout.getLayoutParams()).topMargin = margin;
((RelativeLayout.LayoutParams) mGeckoLayout.getLayoutParams()).topMargin = margin;
mGeckoLayout.requestLayout();
}

Просмотреть файл

@ -170,10 +170,10 @@ public abstract class GeckoApp
// after a version upgrade.
private static final int CLEANUP_DEFERRAL_SECONDS = 15;
protected View mRootLayout;
protected RelativeLayout mRootLayout;
protected RelativeLayout mMainLayout;
protected View mGeckoLayout;
protected RelativeLayout mGeckoLayout;
private View mCameraView;
private OrientationEventListener mCameraOrientationEventListener;
public List<GeckoAppShell.AppStateListener> mAppStateListeners = new LinkedList<GeckoAppShell.AppStateListener>();
@ -1385,8 +1385,8 @@ public abstract class GeckoApp
setContentView(getLayout());
// Set up Gecko layout.
mRootLayout = findViewById(android.R.id.content);
mGeckoLayout = findViewById(R.id.gecko_layout);
mRootLayout = (RelativeLayout) findViewById(R.id.root_layout);
mGeckoLayout = (RelativeLayout) findViewById(R.id.gecko_layout);
mMainLayout = (RelativeLayout) findViewById(R.id.main_layout);
mLayerView = (LayerView) findViewById(R.id.layer_view);

Просмотреть файл

@ -4,7 +4,6 @@
package org.mozilla.gecko;
import android.view.ViewGroup;
import org.mozilla.gecko.animation.ViewHelper;
import org.mozilla.gecko.gfx.ImmutableViewportMetrics;
import org.mozilla.gecko.gfx.LayerView;
@ -20,6 +19,7 @@ import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
/**
* Text selection handles enable a user to change position of selected text in
@ -57,7 +57,7 @@ class TextSelectionHandle extends ImageView implements View.OnTouchListener {
private PointF mGeckoPoint;
private PointF mTouchStart;
private ViewGroup.MarginLayoutParams mLayoutParams;
private RelativeLayout.LayoutParams mLayoutParams;
private static final int IMAGE_LEVEL_LTR = 0;
private static final int IMAGE_LEVEL_RTL = 1;
@ -204,7 +204,7 @@ class TextSelectionHandle extends ImageView implements View.OnTouchListener {
private void setLayoutPosition() {
if (mLayoutParams == null) {
mLayoutParams = (ViewGroup.MarginLayoutParams) getLayoutParams();
mLayoutParams = (RelativeLayout.LayoutParams) getLayoutParams();
// Set negative right/bottom margins so that the handles can be dragged outside of
// the content area (if they are dragged to the left/top, the dyanmic margins set
// below will take care of that).

Просмотреть файл

@ -200,7 +200,7 @@ public class ZoomedView extends FrameLayout implements LayerView.DynamicToolbarL
}
private boolean moveZoomedView(MotionEvent event) {
final MarginLayoutParams params = (MarginLayoutParams) ZoomedView.this.getLayoutParams();
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) ZoomedView.this.getLayoutParams();
if ((!dragged) && (Math.abs((int) (event.getRawX() - originRawX)) < PanZoomController.CLICK_THRESHOLD)
&& (Math.abs((int) (event.getRawY() - originRawY)) < PanZoomController.CLICK_THRESHOLD)) {
// When the user just touches the screen ACTION_MOVE can be detected for a very small delta on position.
@ -315,7 +315,7 @@ public class ZoomedView extends FrameLayout implements LayerView.DynamicToolbarL
ImmutableViewportMetrics metrics = layerView.getViewportMetrics();
final float parentWidth = metrics.getWidth();
final float parentHeight = metrics.getHeight();
final MarginLayoutParams params = (MarginLayoutParams) getLayoutParams();
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) getLayoutParams();
// The number of unzoomed content pixels that can be displayed in the
// zoomed area.
@ -382,7 +382,7 @@ public class ZoomedView extends FrameLayout implements LayerView.DynamicToolbarL
private void moveZoomedView(ImmutableViewportMetrics metrics, float newLeftMargin, float newTopMargin,
StartPointUpdate animateStartPoint) {
final MarginLayoutParams newLayoutParams = (MarginLayoutParams) getLayoutParams();
RelativeLayout.LayoutParams newLayoutParams = (RelativeLayout.LayoutParams) getLayoutParams();
newLayoutParams.leftMargin = (int) newLeftMargin;
newLayoutParams.topMargin = (int) newTopMargin;
int topMarginMin = (int)(layerView.getSurfaceTranslation() + dynamicToolbarOverlap);
@ -478,7 +478,7 @@ public class ZoomedView extends FrameLayout implements LayerView.DynamicToolbarL
return;
}
final MarginLayoutParams params = (MarginLayoutParams) getLayoutParams();
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) getLayoutParams();
setCapturedSize(viewport);
moveZoomedView(viewport, params.leftMargin, params.topMargin, StartPointUpdate.NO_CHANGE);
}

Просмотреть файл

@ -3,7 +3,10 @@
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/root_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ViewStub android:id="@+id/tabs_panel"
android:layout="@layout/tabs_panel_view"
@ -16,11 +19,11 @@
android:layout_height="match_parent"
android:background="@android:color/transparent">
<FrameLayout android:id="@+id/gecko_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/tablet_tab_strip"
android:layout_above="@+id/find_in_page">
<RelativeLayout android:id="@+id/gecko_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/tablet_tab_strip"
android:layout_above="@+id/find_in_page">
<include layout="@layout/shared_ui_components"/>
@ -61,7 +64,7 @@
android:alpha="0"
android:layerType="hardware"/>
</FrameLayout>
</RelativeLayout>
<org.mozilla.gecko.FindInPageBar android:id="@+id/find_in_page"
android:layout_width="match_parent"
@ -147,4 +150,4 @@
android:layout="@layout/button_toast"
style="@style/Toast"/>
</merge>
</RelativeLayout>

Просмотреть файл

@ -30,7 +30,8 @@
<FrameLayout android:id="@+id/camera_layout"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="bottom|right">
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true">
</FrameLayout>
</merge>

Просмотреть файл

@ -638,6 +638,8 @@
<item name="android:background">@drawable/toast_background</item>
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_alignParentBottom">true</item>
<item name="android:layout_centerHorizontal">true</item>
<item name="android:layout_gravity">bottom|center_horizontal</item>
<item name="android:layout_marginBottom">64dp</item>
<item name="android:layout_marginTop">0dp</item>