mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Back out b35af982b085 (bug 721080) for android-xul bustage
This commit is contained in:
parent
2da064d89d
commit
4c969ca5d1
@ -1121,11 +1121,11 @@ public class GeckoAppShell
|
||||
});
|
||||
}
|
||||
|
||||
public static void setPreventPanning(final boolean aPreventPanning) {
|
||||
public static void preventPanning() {
|
||||
getMainHandler().post(new Runnable() {
|
||||
public void run() {
|
||||
LayerController layerController = GeckoApp.mAppContext.getLayerController();
|
||||
layerController.preventPanning(aPreventPanning);
|
||||
layerController.preventPanning(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -441,15 +441,13 @@ public class LayerController {
|
||||
allowDefaultTimer.purge();
|
||||
allowDefaultTimer = null;
|
||||
}
|
||||
if (aValue == allowDefaultActions) {
|
||||
allowDefaultActions = !aValue;
|
||||
allowDefaultActions = !aValue;
|
||||
|
||||
if (aValue) {
|
||||
mView.clearEventQueue();
|
||||
mPanZoomController.cancelTouch();
|
||||
} else {
|
||||
mView.processEventQueue();
|
||||
}
|
||||
if (aValue) {
|
||||
mView.clearEventQueue();
|
||||
mPanZoomController.cancelTouch();
|
||||
} else {
|
||||
mView.processEventQueue();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -125,7 +125,7 @@ AndroidBridge::Init(JNIEnv *jEnv,
|
||||
jGetDpi = (jmethodID) jEnv->GetStaticMethodID(jGeckoAppShellClass, "getDpi", "()I");
|
||||
jSetFullScreen = (jmethodID) jEnv->GetStaticMethodID(jGeckoAppShellClass, "setFullScreen", "(Z)V");
|
||||
jShowInputMethodPicker = (jmethodID) jEnv->GetStaticMethodID(jGeckoAppShellClass, "showInputMethodPicker", "()V");
|
||||
jSetPreventPanning = (jmethodID) jEnv->GetStaticMethodID(jGeckoAppShellClass, "setPreventPanning", "(Z)V");
|
||||
jPreventPanning = (jmethodID) jEnv->GetStaticMethodID(jGeckoAppShellClass, "preventPanning", "()V");
|
||||
jHideProgressDialog = (jmethodID) jEnv->GetStaticMethodID(jGeckoAppShellClass, "hideProgressDialog", "()V");
|
||||
jPerformHapticFeedback = (jmethodID) jEnv->GetStaticMethodID(jGeckoAppShellClass, "performHapticFeedback", "(Z)V");
|
||||
jVibrate1 = (jmethodID) jEnv->GetStaticMethodID(jGeckoAppShellClass, "vibrate", "(J)V");
|
||||
@ -1806,13 +1806,13 @@ NS_IMETHODIMP nsAndroidBridge::SetDrawMetadataProvider(nsIAndroidDrawMetadataPro
|
||||
}
|
||||
|
||||
void
|
||||
AndroidBridge::SetPreventPanning(bool aPreventPanning) {
|
||||
AndroidBridge::PreventPanning() {
|
||||
ALOG_BRIDGE("AndroidBridge::PreventPanning");
|
||||
JNIEnv *env = GetJNIEnv();
|
||||
if (!env)
|
||||
return;
|
||||
|
||||
env->CallStaticVoidMethod(mGeckoAppShellClass, jSetPreventPanning, (jboolean)aPreventPanning);
|
||||
env->CallStaticVoidMethod(mGeckoAppShellClass, jPreventPanning);
|
||||
}
|
||||
|
||||
|
||||
|
@ -230,7 +230,7 @@ public:
|
||||
|
||||
void ShowInputMethodPicker();
|
||||
|
||||
void SetPreventPanning(bool aPreventPanning);
|
||||
void PreventPanning();
|
||||
|
||||
void HideProgressDialogOnce();
|
||||
|
||||
@ -439,7 +439,7 @@ protected:
|
||||
jmethodID jGetDpi;
|
||||
jmethodID jSetFullScreen;
|
||||
jmethodID jShowInputMethodPicker;
|
||||
jmethodID jSetPreventPanning;
|
||||
jmethodID jPreventPanning;
|
||||
jmethodID jHideProgressDialog;
|
||||
jmethodID jPerformHapticFeedback;
|
||||
jmethodID jVibrate1;
|
||||
|
@ -1579,9 +1579,8 @@ nsWindow::DispatchMultitouchEvent(nsTouchEvent &event, AndroidGeckoEvent *ae)
|
||||
|
||||
nsEventStatus status;
|
||||
DispatchEvent(&event, status);
|
||||
bool preventPanning = (status == nsEventStatus_eConsumeNoDefault);
|
||||
if (preventPanning || action == AndroidMotionEvent::ACTION_MOVE) {
|
||||
AndroidBridge::Bridge()->SetPreventPanning(preventPanning);
|
||||
if (status == nsEventStatus_eConsumeNoDefault) {
|
||||
AndroidBridge::Bridge()->PreventPanning();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user