mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 760451 - Support skip links. r=davidb
This commit is contained in:
parent
26dcaaeb28
commit
20052e6784
@ -351,6 +351,11 @@ var AccessFu = {
|
||||
}
|
||||
break;
|
||||
}
|
||||
case Ci.nsIAccessibleEvent.EVENT_SCROLLING_START:
|
||||
{
|
||||
VirtualCursorController.moveCursorToObject(aEvent.accessible);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -165,6 +165,22 @@ var VirtualCursorController = {
|
||||
QueryInterface(Ci.nsIAccessibleCursorable).virtualCursor;
|
||||
},
|
||||
|
||||
moveCursorToObject: function moveCursorToObject(aAccessible, aRule) {
|
||||
let doc = aAccessible.document;
|
||||
while (doc) {
|
||||
let vc = null;
|
||||
try {
|
||||
vc = doc.QueryInterface(Ci.nsIAccessibleCursorable).virtualCursor;
|
||||
} catch (x) {
|
||||
doc = doc.parentDocument;
|
||||
continue;
|
||||
}
|
||||
if (vc)
|
||||
vc.moveNext(aRule || this.SimpleTraversalRule, aAccessible, true);
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
SimpleTraversalRule: {
|
||||
getMatchRoles: function SimpleTraversalRule_getmatchRoles(aRules) {
|
||||
aRules.value = this._matchRoles;
|
||||
|
Loading…
Reference in New Issue
Block a user