Bug 1283888 - Remove NATIVE_POKE event from Java; r=me
authorJim Chen <nchen@mozilla.com>
Thu, 04 Aug 2016 09:15:16 -0400
changeset 308193 0f0ee7418a8d286dea86306b690351d82420cade
parent 308024 dd5ef823250c9193a9e85b207b0e8f608c6e7100
child 308194 e7976b6561c5ee8c9c8fa8ed73c6792c0fb6bf2a
push id31092
push usercbook@mozilla.com
push dateFri, 05 Aug 2016 10:16:59 +0000
treeherderautoland@b97dd7dd3cb9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1283888
milestone51.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 1283888 - Remove NATIVE_POKE event from Java; r=me Remove the obsolete NATIVE_POKE event from GeckoEvent.
mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoEvent.java
widget/android/AndroidJavaWrappers.h
widget/android/nsAppShell.cpp
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoEvent.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoEvent.java
@@ -59,17 +59,16 @@ public class GeckoEvent {
             events.offer(this);
         }
     }
 
     // Make sure to keep these values in sync with the enum in
     // AndroidGeckoEvent in widget/android/AndroidJavaWrappers.h
     @JNITarget
     public enum NativeGeckoEvent {
-        NATIVE_POKE(0),
         MOTION_EVENT(2),
         NOOP(15),
         VIEWPORT(20),
         NATIVE_GESTURE_EVENT(31),
         CALL_OBSERVER(33),
         REMOVE_OBSERVER(34),
         LOW_MEMORY(35),
         TELEMETRY_HISTOGRAM_ADD(37),
--- a/widget/android/AndroidJavaWrappers.h
+++ b/widget/android/AndroidJavaWrappers.h
@@ -411,22 +411,16 @@ private:
     }
 
     void Init(JNIEnv *jenv, jobject jobj);
     void Init(int aType);
 
 public:
     static void InitGeckoEventClass(JNIEnv *jEnv);
 
-    static AndroidGeckoEvent* MakeNativePoke() {
-        AndroidGeckoEvent *event = new AndroidGeckoEvent();
-        event->Init(NATIVE_POKE);
-        return event;
-    }
-
     static AndroidGeckoEvent* MakeFromJavaObject(JNIEnv *jenv, jobject jobj) {
         AndroidGeckoEvent *event = new AndroidGeckoEvent();
         event->Init(jenv, jobj);
         return event;
     }
 
     static AndroidGeckoEvent* MakeAddObserver(const nsAString &key, nsIObserver *observer) {
         AndroidGeckoEvent *event = new AndroidGeckoEvent();
@@ -581,17 +575,16 @@ protected:
     static jfieldID jIDField;
     static jfieldID jGamepadButtonField;
     static jfieldID jGamepadButtonPressedField;
     static jfieldID jGamepadButtonValueField;
     static jfieldID jGamepadValuesField;
 
 public:
     enum {
-        NATIVE_POKE = 0,
         MOTION_EVENT = 2,
         NOOP = 15,
         APZ_INPUT_EVENT = 17, // used internally in AndroidJNI/nsAppShell/nsWindow
         VIEWPORT = 20,
         NATIVE_GESTURE_EVENT = 31,
         CALL_OBSERVER = 33,
         REMOVE_OBSERVER = 34,
         LOW_MEMORY = 35,
--- a/widget/android/nsAppShell.cpp
+++ b/widget/android/nsAppShell.cpp
@@ -651,20 +651,16 @@ nsAppShell::PostEvent(AndroidGeckoEvent*
 void
 nsAppShell::LegacyGeckoEvent::Run()
 {
     const mozilla::UniquePtr<AndroidGeckoEvent>& curEvent = ae;
 
     EVLOG("nsAppShell: event %p %d", (void*)curEvent.get(), curEvent->Type());
 
     switch (curEvent->Type()) {
-    case AndroidGeckoEvent::NATIVE_POKE:
-        nsAppShell::Get()->NativeEventCallback();
-        break;
-
     case AndroidGeckoEvent::ZOOMEDVIEW: {
         if (!nsAppShell::Get()->mBrowserApp)
             break;
         int32_t tabId = curEvent->MetaState();
         const nsTArray<nsIntPoint>& points = curEvent->Points();
         float scaleFactor = (float) curEvent->X();
         RefPtr<RefCountedJavaObject> javaBuffer = curEvent->ByteBuffer();
         const auto& mBuffer = jni::ByteBuffer::Ref::From(javaBuffer->GetObject());