1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_a11y_ARIAGridAccessible_inl_h__
8 #define mozilla_a11y_ARIAGridAccessible_inl_h__
10 #include "ARIAGridAccessible.h"
12 #include "AccIterator.h"
13 #include "nsAccUtils.h"
18 inline int32_t ARIAGridCellAccessible::RowIndexFor(
19 LocalAccessible
* aRow
) const {
20 LocalAccessible
* table
= nsAccUtils::TableFor(aRow
);
23 LocalAccessible
* row
= nullptr;
24 AccIterator
rowIter(table
, filters::GetRow
);
25 while ((row
= rowIter
.Next()) && row
!= aRow
) rowIdx
++;
27 if (row
) return rowIdx
;
34 } // namespace mozilla