Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/accessible/atk/nsMaiInterfaceHyperlinkImpl.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 "InterfaceInitFuncs.h"
8
9
#include "nsMaiHyperlink.h"
10
#include "mozilla/Likely.h"
11
12
using namespace mozilla::a11y;
13
14
extern "C" {
15
static AtkHyperlink*
16
getHyperlinkCB(AtkHyperlinkImpl* aImpl)
17
0
{
18
0
  AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aImpl));
19
0
  if (!accWrap && !GetProxy(ATK_OBJECT(aImpl)))
20
0
    return nullptr;
21
0
22
0
  if (accWrap)
23
0
    NS_ASSERTION(accWrap->IsLink(), "why isn't it a link!");
24
0
25
0
  return MAI_ATK_OBJECT(aImpl)->GetAtkHyperlink();
26
0
}
27
}
28
29
void
30
hyperlinkImplInterfaceInitCB(AtkHyperlinkImplIface *aIface)
31
0
{
32
0
  NS_ASSERTION(aIface, "no interface!");
33
0
  if (MOZ_UNLIKELY(!aIface))
34
0
    return;
35
0
36
0
  aIface->get_hyperlink = getHyperlinkCB;
37
0
}