зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1258960 - use getters in marionette accessibility states structure to avoid Ci.nsIAccessibleStates undefined errors in builds with accessibility disabled. r=whimboo
MozReview-Commit-ID: 2SMM5AS0cVr --HG-- extra : rebase_source : 5b9db7f8e6b326a981641aa7d21fbfb4c40f44bc
This commit is contained in:
Родитель
cc2ef6ca93
Коммит
e90eb53ff1
|
@ -41,12 +41,23 @@ this.accessibility = {};
|
|||
/**
|
||||
* Accessible states used to check element"s state from the accessiblity API
|
||||
* perspective.
|
||||
* Note: if gecko is built with --disable-accessibility, the interfaces are not
|
||||
* defined. This is why we use getters instead to be able to use these
|
||||
* statically.
|
||||
*/
|
||||
accessibility.State = {
|
||||
Unavailable: Ci.nsIAccessibleStates.STATE_UNAVAILABLE,
|
||||
Focusable: Ci.nsIAccessibleStates.STATE_FOCUSABLE,
|
||||
Selectable: Ci.nsIAccessibleStates.STATE_SELECTABLE,
|
||||
Selected: Ci.nsIAccessibleStates.STATE_SELECTED,
|
||||
get Unavailable() {
|
||||
return Ci.nsIAccessibleStates.STATE_UNAVAILABLE;
|
||||
},
|
||||
get Focusable() {
|
||||
return Ci.nsIAccessibleStates.STATE_FOCUSABLE;
|
||||
},
|
||||
get Selectable() {
|
||||
return Ci.nsIAccessibleStates.STATE_SELECTABLE;
|
||||
},
|
||||
get Selected() {
|
||||
return Ci.nsIAccessibleStates.STATE_SELECTED;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче