1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include "Accessible-inl.h"
8 #include "nsAccUtils.h"
12 using namespace mozilla::a11y
;
13 using namespace mozilla::a11y::filters
;
15 uint32_t filters::GetSelected(Accessible
* aAccessible
) {
16 if (aAccessible
->State() & states::SELECTED
) return eMatch
| eSkipSubtree
;
21 uint32_t filters::GetSelectable(Accessible
* aAccessible
) {
22 if (aAccessible
->InteractiveState() & states::SELECTABLE
)
23 return eMatch
| eSkipSubtree
;
28 uint32_t filters::GetRow(Accessible
* aAccessible
) {
29 if (aAccessible
->IsTableRow()) return eMatch
| eSkipSubtree
;
31 // Look for rows inside rowgroup.
32 a11y::role role
= aAccessible
->Role();
33 if (role
== roles::GROUPING
) return eSkip
;
38 uint32_t filters::GetCell(Accessible
* aAccessible
) {
39 return aAccessible
->IsTableCell() ? eMatch
: eSkipSubtree
;