Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/dom/events/PaintRequest.cpp
Line
Count
Source (jump to first uncovered line)
1
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* vim: set ts=8 sts=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 "mozilla/dom/PaintRequest.h"
8
9
#include "mozilla/dom/PaintRequestBinding.h"
10
#include "mozilla/dom/PaintRequestListBinding.h"
11
#include "mozilla/dom/DOMRect.h"
12
13
namespace mozilla {
14
namespace dom {
15
16
/******************************************************************************
17
 * mozilla::dom::PaintRequest
18
 *****************************************************************************/
19
20
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(PaintRequest, mParent)
21
22
0
NS_INTERFACE_TABLE_HEAD(PaintRequest)
23
0
  NS_WRAPPERCACHE_INTERFACE_TABLE_ENTRY
24
0
  NS_INTERFACE_TABLE_TO_MAP_SEGUE_CYCLE_COLLECTION(PaintRequest)
25
0
NS_INTERFACE_MAP_END
26
27
NS_IMPL_CYCLE_COLLECTING_ADDREF(PaintRequest)
28
NS_IMPL_CYCLE_COLLECTING_RELEASE(PaintRequest)
29
30
/* virtual */ JSObject*
31
PaintRequest::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
32
0
{
33
0
  return PaintRequest_Binding::Wrap(aCx, this, aGivenProto);
34
0
}
35
36
already_AddRefed<DOMRect>
37
PaintRequest::ClientRect()
38
0
{
39
0
  RefPtr<DOMRect> clientRect = new DOMRect(this);
40
0
  clientRect->SetLayoutRect(mRequest);
41
0
  return clientRect.forget();
42
0
}
43
44
/******************************************************************************
45
 * mozilla::dom::PaintRequestList
46
 *****************************************************************************/
47
48
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(PaintRequestList, mParent)
49
50
0
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(PaintRequestList)
51
0
  NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
52
0
  NS_INTERFACE_MAP_ENTRY(nsISupports)
53
0
NS_INTERFACE_MAP_END
54
55
NS_IMPL_CYCLE_COLLECTING_ADDREF(PaintRequestList)
56
NS_IMPL_CYCLE_COLLECTING_RELEASE(PaintRequestList)
57
58
JSObject*
59
PaintRequestList::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
60
0
{
61
0
  return PaintRequestList_Binding::Wrap(aCx, this, aGivenProto);
62
0
}
63
64
} // namespace dom
65
} // namespace mozilla