Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/accessible/generic/ARIAGridAccessible-inl.h
Line
Count
Source (jump to first uncovered line)
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/. */
6
7
#ifndef mozilla_a11y_ARIAGridAccessible_inl_h__
8
#define mozilla_a11y_ARIAGridAccessible_inl_h__
9
10
#include "ARIAGridAccessible.h"
11
12
#include "AccIterator.h"
13
#include "nsAccUtils.h"
14
15
namespace mozilla {
16
namespace a11y {
17
18
inline int32_t
19
ARIAGridCellAccessible::RowIndexFor(Accessible* aRow) const
20
0
{
21
0
  Accessible* table = nsAccUtils::TableFor(aRow);
22
0
  if (table) {
23
0
    int32_t rowIdx = 0;
24
0
    Accessible* row = nullptr;
25
0
    AccIterator rowIter(table, filters::GetRow);
26
0
    while ((row = rowIter.Next()) && row != aRow)
27
0
      rowIdx++;
28
0
29
0
    if (row)
30
0
      return rowIdx;
31
0
  }
32
0
33
0
  return -1;
34
0
}
35
36
} // namespace a11y
37
} // namespace mozilla
38
39
#endif