From fb5f33eeb69eb71e0b588c0e4169845400201d8a Mon Sep 17 00:00:00 2001 From: Wes Johnston Date: Tue, 28 Jan 2014 12:28:46 -0800 Subject: [PATCH] backout 4e6fcc7b5d13, 58d9759ff3d1, and 45d37d92612d CLOSED TREE --- mobile/android/base/moz.build | 1 - .../base/resources/layout/gecko_app.xml | 4 +- .../android/base/widget/GeckoViewFlipper.java | 46 ------------------- mobile/android/chrome/content/browser.js | 15 +----- 4 files changed, 4 insertions(+), 62 deletions(-) delete mode 100644 mobile/android/base/widget/GeckoViewFlipper.java diff --git a/mobile/android/base/moz.build b/mobile/android/base/moz.build index ccfe915babc..bbc066ff567 100644 --- a/mobile/android/base/moz.build +++ b/mobile/android/base/moz.build @@ -360,7 +360,6 @@ gbjar.sources += [ 'widget/FlowLayout.java', 'widget/GeckoActionProvider.java', 'widget/GeckoPopupMenu.java', - 'widget/GeckoViewFlipper.java', 'widget/IconTabWidget.java', 'widget/TabRow.java', 'widget/ThumbnailView.java', diff --git a/mobile/android/base/resources/layout/gecko_app.xml b/mobile/android/base/resources/layout/gecko_app.xml index 58b6a3fa089..e109f937335 100644 --- a/mobile/android/base/resources/layout/gecko_app.xml +++ b/mobile/android/base/resources/layout/gecko_app.xml @@ -75,7 +75,7 @@ the root view, BrowserToolbar should be specified as low in the view hierarchy as possible. --> - - + diff --git a/mobile/android/base/widget/GeckoViewFlipper.java b/mobile/android/base/widget/GeckoViewFlipper.java deleted file mode 100644 index dcc1ab0428b..00000000000 --- a/mobile/android/base/widget/GeckoViewFlipper.java +++ /dev/null @@ -1,46 +0,0 @@ -/* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*- - * This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -package org.mozilla.gecko.widget; - -import org.mozilla.gecko.animation.ViewHelper; - -import android.content.Context; -import android.graphics.Rect; -import android.os.Build; -import android.view.MotionEvent; -import android.widget.ViewFlipper; -import android.util.AttributeSet; - -/* This extends the normal ViewFlipper only to fix bug 956075 on < 3.0 devices. - * i.e. It ignores touch events on the ViewFlipper when its hidden. */ - -public class GeckoViewFlipper extends ViewFlipper { - private static final String LOGTAG = "GeckoViewFlipper"; - private Rect mRect = new Rect(); - - public GeckoViewFlipper(Context context) { - super(context); - } - - public GeckoViewFlipper(Context context, AttributeSet attrs) { - super(context, attrs); - } - - @Override - public boolean dispatchTouchEvent(MotionEvent ev) { - if (Build.VERSION.SDK_INT < 11) { - // Fix bug 956075. Don't allow touching this View if its hidden. - getHitRect(mRect); - mRect.offset((int) ViewHelper.getTranslationX(this), (int) ViewHelper.getTranslationY(this)); - - if (!mRect.contains((int) ev.getRawX(), (int) ev.getRawY())) { - return false; - } - } - - return super.dispatchTouchEvent(ev); - } -} diff --git a/mobile/android/chrome/content/browser.js b/mobile/android/chrome/content/browser.js index e2c0fdc45e7..52978c8ddaa 100644 --- a/mobile/android/chrome/content/browser.js +++ b/mobile/android/chrome/content/browser.js @@ -306,13 +306,6 @@ var BrowserApp = { dump("zerdatime " + Date.now() + " - browser chrome startup finished."); this.deck = document.getElementById("browsers"); - this.deck.addEventListener("DOMContentLoaded", function BrowserApp_delayedStartup() { - try { - BrowserApp.deck.removeEventListener("DOMContentLoaded", BrowserApp_delayedStartup, false); - Services.obs.notifyObservers(window, "browser-delayed-startup-finished", ""); - } catch(ex) { console.log(ex); } - }, false); - BrowserEventHandler.init(); ViewportHandler.init(); @@ -441,7 +434,8 @@ var BrowserApp = { event.initEvent("UIReady", true, false); window.dispatchEvent(event); - Services.obs.addObserver(this, "browser-delayed-startup-finished", false); + if (this._startupStatus) + this.onAppUpdated(); // Store the low-precision buffer pref this.gUseLowPrecision = Services.prefs.getBoolPref("layers.low-precision-buffer"); @@ -1629,11 +1623,6 @@ var BrowserApp = { Services.prefs.setCharPref("general.useragent.locale", aData); break; - case "browser-delayed-startup-finished": - if (this._startupStatus) - this.onAppUpdated(); - break; - default: dump('BrowserApp.observe: unexpected topic "' + aTopic + '"\n'); break;