Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/ScrollAreaEvent.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_ScrollAreaEvent_h_
8
#define mozilla_dom_ScrollAreaEvent_h_
9
10
#include "mozilla/dom/DOMRect.h"
11
#include "mozilla/dom/ScrollAreaEventBinding.h"
12
#include "mozilla/dom/UIEvent.h"
13
#include "mozilla/Attributes.h"
14
#include "mozilla/EventForwards.h"
15
16
namespace mozilla {
17
namespace dom {
18
19
class ScrollAreaEvent : public UIEvent
20
{
21
public:
22
  ScrollAreaEvent(EventTarget* aOwner,
23
                  nsPresContext* aPresContext,
24
                  InternalScrollAreaEvent* aEvent);
25
26
  NS_DECL_ISUPPORTS_INHERITED
27
  NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(ScrollAreaEvent, UIEvent)
28
29
  void Serialize(IPC::Message* aMsg, bool aSerializeInterfaceType) override;
30
  bool Deserialize(const IPC::Message* aMsg, PickleIterator* aIter) override;
31
32
  virtual JSObject* WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override
33
0
  {
34
0
    return ScrollAreaEvent_Binding::Wrap(aCx, this, aGivenProto);
35
0
  }
36
37
  float X() const
38
0
  {
39
0
    return mClientArea->Left();
40
0
  }
41
42
  float Y() const
43
0
  {
44
0
    return mClientArea->Top();
45
0
  }
46
47
  float Width() const
48
0
  {
49
0
    return mClientArea->Width();
50
0
  }
51
52
  float Height() const
53
0
  {
54
0
    return mClientArea->Height();
55
0
  }
56
57
  void InitScrollAreaEvent(const nsAString& aType,
58
                           bool aCanBubble,
59
                           bool aCancelable,
60
                           nsGlobalWindowInner* aView,
61
                           int32_t aDetail,
62
                           float aX, float aY,
63
                           float aWidth, float aHeight);
64
65
protected:
66
0
  ~ScrollAreaEvent() {}
67
68
  RefPtr<DOMRect> mClientArea;
69
};
70
71
} // namespace dom
72
} // namespace mozilla
73
74
already_AddRefed<mozilla::dom::ScrollAreaEvent>
75
NS_NewDOMScrollAreaEvent(mozilla::dom::EventTarget* aOwner,
76
                         nsPresContext* aPresContext,
77
                         mozilla::InternalScrollAreaEvent* aEvent);
78
79
#endif // mozilla_dom_ScrollAreaEvent_h_