Bug 1224604 - Handle Hover events when TalkBack is enabled. r=kats

This commit is contained in:
sgiles 2015-11-25 15:25:11 +00:00
Родитель cdd3762041
Коммит 55af4f89c3
2 изменённых файлов: 20 добавлений и 0 удалений

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

@ -12,6 +12,7 @@ import java.util.ArrayList;
import org.mozilla.gecko.AndroidGamepadManager;
import org.mozilla.gecko.annotation.RobocopTarget;
import org.mozilla.gecko.annotation.WrapForJNI;
import org.mozilla.gecko.AppConstants;
import org.mozilla.gecko.AppConstants.Versions;
import org.mozilla.gecko.EventDispatcher;
import org.mozilla.gecko.GeckoAccessibility;
@ -251,6 +252,10 @@ public class LayerView extends ScrollView implements Tabs.OnTabsChangedListener
return false;
}
if (AppConstants.MOZ_ANDROID_APZ && mPanZoomController != null && mPanZoomController.onTouchEvent(event)) {
return true;
}
return sendEventToGecko(event);
}

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

@ -684,15 +684,30 @@ AndroidGeckoEvent::MakeMultiTouchInput(nsIWidget* widget)
int endIndex = Count();
switch (Action()) {
case AndroidMotionEvent::ACTION_HOVER_ENTER: {
if (ToolTypes()[0] == AndroidMotionEvent::TOOL_TYPE_MOUSE) {
break;
}
}
case AndroidMotionEvent::ACTION_DOWN:
case AndroidMotionEvent::ACTION_POINTER_DOWN: {
type = MultiTouchInput::MULTITOUCH_START;
break;
}
case AndroidMotionEvent::ACTION_HOVER_MOVE: {
if (ToolTypes()[0] == AndroidMotionEvent::TOOL_TYPE_MOUSE) {
break;
}
}
case AndroidMotionEvent::ACTION_MOVE: {
type = MultiTouchInput::MULTITOUCH_MOVE;
break;
}
case AndroidMotionEvent::ACTION_HOVER_EXIT: {
if (ToolTypes()[0] == AndroidMotionEvent::TOOL_TYPE_MOUSE) {
break;
}
}
case AndroidMotionEvent::ACTION_UP:
case AndroidMotionEvent::ACTION_POINTER_UP: {
// for pointer-up events we only want the data from