Bug 1230838 - Let hover events fall through to Gecko when accessibility is turned on - don't throw an exception in the NativePanZoomController when default prevented. r=kats

This commit is contained in:
sgiles 2015-12-10 13:20:53 -05:00
parent bc275e1dd1
commit b2b5fc2c30
3 changed files with 3 additions and 22 deletions

View File

@ -252,10 +252,6 @@ 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

@ -76,9 +76,9 @@ class NativePanZoomController implements PanZoomController, GeckoEventListener {
@Override
public void notifyDefaultActionPrevented(boolean prevented) {
// This should never get called; there is a different
// codepath that notifies the APZ code of this.
throw new IllegalStateException("APZCCallbackHandler::NotifyDefaultPrevented should be getting called, not this!");
// no-op: This could get called if accessibility is enabled and the events
// are sent to Gecko directly without going through APZ. In this case
// we just want to ignore this callback.
}
@Override

View File

@ -684,30 +684,15 @@ 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