mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1081717 - Add attribute for finger-up activation in addition to key role. r=yzen
This commit is contained in:
parent
dc73054ba9
commit
8b13301b72
@ -169,7 +169,7 @@ this.ContentControl.prototype = {
|
||||
});
|
||||
try {
|
||||
if (aMessage.json.activateIfKey &&
|
||||
aAccessible.role != Roles.KEY) {
|
||||
!Utils.isActivatableOnFingerUp(aAccessible)) {
|
||||
// Only activate keys, don't do anything on other objects.
|
||||
return;
|
||||
}
|
||||
@ -210,7 +210,7 @@ this.ContentControl.prototype = {
|
||||
}
|
||||
}
|
||||
|
||||
if (aAccessible.role !== Roles.KEY) {
|
||||
if (!Utils.isActivatableOnFingerUp(aAccessible)) {
|
||||
// Keys will typically have a sound of their own.
|
||||
this._contentScope.get().sendAsyncMessage('AccessFu:Present',
|
||||
Presentation.actionInvoked(aAccessible, 'click'));
|
||||
|
@ -482,7 +482,7 @@ B2GPresenter.prototype.pivotChanged =
|
||||
data: UtteranceGenerator.genForContext(aContext),
|
||||
options: {
|
||||
pattern: this.PIVOT_CHANGE_HAPTIC_PATTERN,
|
||||
isKey: aContext.accessible.role === Roles.KEY,
|
||||
isKey: Utils.isActivatableOnFingerUp(aContext.accessible),
|
||||
reason: this.pivotChangedReasons[aReason],
|
||||
isUserInput: aIsUserInput
|
||||
}
|
||||
|
@ -470,6 +470,14 @@ this.Utils = { // jshint ignore:line
|
||||
}));
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
isActivatableOnFingerUp: function isActivatableOnFingerUp(aAccessible) {
|
||||
if (aAccessible.role === Roles.KEY) {
|
||||
return true;
|
||||
}
|
||||
let quick_activate = this.getAttributes(aAccessible)['moz-quick-activate'];
|
||||
return quick_activate && JSON.parse(quick_activate);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user