Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dom/bindings/SpeechSynthesisEvent.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 sw=2 sts=2 et cindent: */
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
/* THIS FILE IS AUTOGENERATED FROM SpeechSynthesisEvent.webidl BY Codegen.py - DO NOT EDIT */
8
9
#include "EventBinding.h"
10
#include "SpeechSynthesisEvent.h"
11
#include "SpeechSynthesisEventBinding.h"
12
#include "js/GCAPI.h"
13
#include "mozilla/FloatingPoint.h"
14
#include "mozilla/dom/Nullable.h"
15
#include "mozilla/dom/PrimitiveConversions.h"
16
#include "mozilla/dom/SpeechSynthesisEvent.h"
17
#include "mozilla/dom/SpeechSynthesisUtterance.h"
18
19
namespace mozilla {
20
namespace dom {
21
22
23
NS_IMPL_CYCLE_COLLECTION_CLASS(SpeechSynthesisEvent)
24
25
NS_IMPL_ADDREF_INHERITED(SpeechSynthesisEvent, Event)
26
NS_IMPL_RELEASE_INHERITED(SpeechSynthesisEvent, Event)
27
28
0
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(SpeechSynthesisEvent, Event)
29
0
  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mUtterance)
30
0
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
31
32
0
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(SpeechSynthesisEvent, Event)
33
0
NS_IMPL_CYCLE_COLLECTION_TRACE_END
34
35
0
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(SpeechSynthesisEvent, Event)
36
0
  NS_IMPL_CYCLE_COLLECTION_UNLINK(mUtterance)
37
0
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
38
39
0
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SpeechSynthesisEvent)
40
0
NS_INTERFACE_MAP_END_INHERITING(Event)
41
42
SpeechSynthesisEvent::SpeechSynthesisEvent(mozilla::dom::EventTarget* aOwner)
43
  : Event(aOwner, nullptr, nullptr)
44
0
{
45
0
}
46
47
SpeechSynthesisEvent::~SpeechSynthesisEvent()
48
0
{
49
0
}
50
51
SpeechSynthesisEvent*
52
SpeechSynthesisEvent::AsSpeechSynthesisEvent()
53
0
{
54
0
  return this;
55
0
}
56
57
JSObject*
58
SpeechSynthesisEvent::WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
59
0
{
60
0
  return SpeechSynthesisEvent_Binding::Wrap(aCx, this, aGivenProto);
61
0
}
62
63
already_AddRefed<SpeechSynthesisEvent>
64
SpeechSynthesisEvent::Constructor(mozilla::dom::EventTarget* aOwner, const nsAString& aType, const SpeechSynthesisEventInit& aEventInitDict)
65
0
{
66
0
  RefPtr<SpeechSynthesisEvent> e = new SpeechSynthesisEvent(aOwner);
67
0
  bool trusted = e->Init(aOwner);
68
0
  e->InitEvent(aType, aEventInitDict.mBubbles, aEventInitDict.mCancelable);
69
0
  e->mUtterance = aEventInitDict.mUtterance;
70
0
  e->mCharIndex = aEventInitDict.mCharIndex;
71
0
  e->mCharLength = aEventInitDict.mCharLength;
72
0
  e->mElapsedTime = aEventInitDict.mElapsedTime;
73
0
  e->mName = aEventInitDict.mName;
74
0
  e->SetTrusted(trusted);
75
0
  e->SetComposed(aEventInitDict.mComposed);
76
0
  return e.forget();
77
0
}
78
79
already_AddRefed<SpeechSynthesisEvent>
80
SpeechSynthesisEvent::Constructor(const GlobalObject& aGlobal, const nsAString& aType, const SpeechSynthesisEventInit& aEventInitDict, ErrorResult& aRv)
81
0
{
82
0
  nsCOMPtr<mozilla::dom::EventTarget> owner = do_QueryInterface(aGlobal.GetAsSupports());
83
0
  return Constructor(owner, aType, aEventInitDict);
84
0
}
85
86
SpeechSynthesisUtterance*
87
SpeechSynthesisEvent::Utterance() const
88
0
{
89
0
  return mUtterance;
90
0
}
91
92
uint32_t
93
SpeechSynthesisEvent::CharIndex() const
94
0
{
95
0
  return mCharIndex;
96
0
}
97
98
Nullable<uint32_t>
99
SpeechSynthesisEvent::GetCharLength() const
100
0
{
101
0
  return mCharLength;
102
0
}
103
104
float
105
SpeechSynthesisEvent::ElapsedTime() const
106
0
{
107
0
  return mElapsedTime;
108
0
}
109
110
void
111
SpeechSynthesisEvent::GetName(nsString& aRetVal) const
112
0
{
113
0
  aRetVal = mName;
114
0
}
115
116
117
} // namespace dom
118
} // namespace mozilla