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
parent 88c9605e31
commit 594e6e4772
2 changed files with 20 additions and 0 deletions

View File

@ -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);
}

View File

@ -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