Bug 802270 - Reuse hover enter events for accessibility focus events. r=blassey

This commit is contained in:
Eitan Isaacson 2012-10-19 10:06:08 -07:00
parent 6aa19de7bc
commit 3de6fc2689

View File

@ -193,7 +193,9 @@ public class GeckoAccessibility {
super.onPopulateAccessibilityEvent(host, event);
if (mEventMessage != null)
populateEventFromJSON(event, mEventMessage);
mEventMessage = null;
// We save the hover enter event so that we could reuse it for a subsequent accessibility focus event.
if (event.getEventType() != AccessibilityEvent.TYPE_VIEW_HOVER_ENTER)
mEventMessage = null;
// No matter where the a11y focus is requested, we always force it back to the current vc position.
event.setSource(host, VIRTUAL_CURSOR_POSITION);
}
@ -249,10 +251,6 @@ public class GeckoAccessibility {
GeckoAppShell.
sendEventToGecko(GeckoEvent.createBroadcastEvent("Accessibility:PreviousObject", null));
return true;
case VIRTUAL_CURSOR_POSITION:
GeckoAppShell.
sendEventToGecko(GeckoEvent.createBroadcastEvent("Accessibility:CurrentObject", null));
return true;
case VIRTUAL_CURSOR_NEXT:
GeckoAppShell.
sendEventToGecko(GeckoEvent.createBroadcastEvent("Accessibility:NextObject", null));