mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-15 22:44:13 +00:00
Bug 873412 - Implement performAction for clicking. r=kats r=eeejay
This commit is contained in:
parent
44525d24a4
commit
9ac84ad307
@ -116,6 +116,7 @@ this.AccessFu = {
|
||||
Services.obs.addObserver(this, 'Accessibility:NextObject', false);
|
||||
Services.obs.addObserver(this, 'Accessibility:PreviousObject', false);
|
||||
Services.obs.addObserver(this, 'Accessibility:Focus', false);
|
||||
Services.obs.addObserver(this, 'Accessibility:ActivateObject', false);
|
||||
Utils.win.addEventListener('TabOpen', this);
|
||||
Utils.win.addEventListener('TabClose', this);
|
||||
Utils.win.addEventListener('TabSelect', this);
|
||||
@ -157,6 +158,7 @@ this.AccessFu = {
|
||||
Services.obs.removeObserver(this, 'Accessibility:NextObject');
|
||||
Services.obs.removeObserver(this, 'Accessibility:PreviousObject');
|
||||
Services.obs.removeObserver(this, 'Accessibility:Focus');
|
||||
Services.obs.removeObserver(this, 'Accessibility:ActivateObject');
|
||||
|
||||
if (this.doneCallback) {
|
||||
this.doneCallback();
|
||||
@ -259,6 +261,9 @@ this.AccessFu = {
|
||||
case 'Accessibility:PreviousObject':
|
||||
this.Input.moveCursor('movePrevious', 'Simple', 'gesture');
|
||||
break;
|
||||
case 'Accessibility:ActivateObject':
|
||||
this.Input.activateCurrent();
|
||||
break;
|
||||
case 'Accessibility:Focus':
|
||||
this._focused = JSON.parse(aData);
|
||||
if (this._focused) {
|
||||
|
@ -305,6 +305,10 @@ public class GeckoAccessibility {
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else if (action == AccessibilityNodeInfo.ACTION_CLICK && virtualViewId == VIRTUAL_CURSOR_POSITION) {
|
||||
GeckoAppShell.
|
||||
sendEventToGecko(GeckoEvent.createBroadcastEvent("Accessibility:ActivateObject", null));
|
||||
return true;
|
||||
}
|
||||
return host.performAccessibilityAction(action, arguments);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user