Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/NotifyPaintEvent.h
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
#ifndef mozilla_dom_NotifyPaintEvent_h_
8
#define mozilla_dom_NotifyPaintEvent_h_
9
10
#include "mozilla/Attributes.h"
11
#include "mozilla/dom/Event.h"
12
#include "mozilla/dom/BindingDeclarations.h"
13
#include "mozilla/dom/NotifyPaintEventBinding.h"
14
#include "nsPresContext.h"
15
16
namespace mozilla {
17
namespace dom {
18
19
class DOMRect;
20
class DOMRectList;
21
class PaintRequestList;
22
23
class NotifyPaintEvent : public Event
24
{
25
26
public:
27
  NotifyPaintEvent(EventTarget* aOwner,
28
                   nsPresContext* aPresContext,
29
                   WidgetEvent* aEvent,
30
                   EventMessage aEventMessage,
31
                   nsTArray<nsRect>* aInvalidateRequests,
32
                   uint64_t aTransactionId,
33
                   DOMHighResTimeStamp aTimeStamp);
34
35
  NS_INLINE_DECL_REFCOUNTING_INHERITED(NotifyPaintEvent, Event)
36
37
  void Serialize(IPC::Message* aMsg, bool aSerializeInterfaceType) override;
38
  bool Deserialize(const IPC::Message* aMsg, PickleIterator* aIter) override;
39
40
  virtual JSObject* WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override
41
0
  {
42
0
    return NotifyPaintEvent_Binding::Wrap(aCx, this, aGivenProto);
43
0
  }
44
45
  already_AddRefed<DOMRectList> ClientRects(SystemCallerGuarantee aGuarantee);
46
47
  already_AddRefed<DOMRect> BoundingClientRect(SystemCallerGuarantee aGuarantee);
48
49
  already_AddRefed<PaintRequestList> PaintRequests(SystemCallerGuarantee);
50
51
  uint64_t TransactionId(SystemCallerGuarantee);
52
53
  DOMHighResTimeStamp PaintTimeStamp(SystemCallerGuarantee);
54
55
protected:
56
0
  ~NotifyPaintEvent() {}
57
58
private:
59
  nsRegion GetRegion(SystemCallerGuarantee);
60
61
  nsTArray<nsRect> mInvalidateRequests;
62
  uint64_t mTransactionId;
63
  DOMHighResTimeStamp mTimeStamp;
64
};
65
66
} // namespace dom
67
} // namespace mozilla
68
69
// This empties aInvalidateRequests.
70
already_AddRefed<mozilla::dom::NotifyPaintEvent>
71
NS_NewDOMNotifyPaintEvent(mozilla::dom::EventTarget* aOwner,
72
                          nsPresContext* aPresContext,
73
                          mozilla::WidgetEvent* aEvent,
74
                          mozilla::EventMessage aEventMessage =
75
                            mozilla::eVoidEvent,
76
                          nsTArray<nsRect>* aInvalidateRequests = nullptr,
77
                          uint64_t aTransactionId = 0,
78
                          DOMHighResTimeStamp aTimeStamp = 0);
79
80
#endif // mozilla_dom_NotifyPaintEvent_h_