Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/accessible/base/AccessibleOrProxy.cpp
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
#include "AccessibleOrProxy.h"
8
9
namespace mozilla {
10
namespace a11y {
11
12
AccessibleOrProxy
13
AccessibleOrProxy::Parent() const
14
0
{
15
0
  if (IsAccessible()) {
16
0
    return AsAccessible()->Parent();
17
0
  }
18
0
19
0
  ProxyAccessible* proxy = AsProxy();
20
0
  if (!proxy) {
21
0
    return nullptr;
22
0
  }
23
0
24
0
  if (ProxyAccessible* parent = proxy->Parent()) {
25
0
    return parent;
26
0
  }
27
0
28
0
  // Otherwise this should be the proxy for the tab's top level document.
29
0
  return proxy->OuterDocOfRemoteBrowser();
30
0
}
31
32
}
33
}