/work/obj-fuzz/dist/include/mozilla/dom/MutationEvent.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_MutationEvent_h_ |
8 | | #define mozilla_dom_MutationEvent_h_ |
9 | | |
10 | | #include "mozilla/EventForwards.h" |
11 | | #include "mozilla/dom/Event.h" |
12 | | #include "mozilla/dom/MutationEventBinding.h" |
13 | | #include "nsINode.h" |
14 | | |
15 | | namespace mozilla { |
16 | | namespace dom { |
17 | | |
18 | | class MutationEvent : public Event |
19 | | { |
20 | | public: |
21 | | MutationEvent(EventTarget* aOwner, |
22 | | nsPresContext* aPresContext, |
23 | | InternalMutationEvent* aEvent); |
24 | | |
25 | | NS_INLINE_DECL_REFCOUNTING_INHERITED(MutationEvent, Event) |
26 | | |
27 | | virtual JSObject* WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override |
28 | 0 | { |
29 | 0 | return MutationEvent_Binding::Wrap(aCx, this, aGivenProto); |
30 | 0 | } |
31 | | |
32 | | void GetPrevValue(nsAString& aPrevValue) const; |
33 | | void GetNewValue(nsAString& aNewValue) const; |
34 | | void GetAttrName(nsAString& aAttrName) const; |
35 | | |
36 | | nsINode* GetRelatedNode(); |
37 | | |
38 | | uint16_t AttrChange(); |
39 | | |
40 | | void InitMutationEvent(const nsAString& aType, |
41 | | bool aCanBubble, bool aCancelable, |
42 | | nsINode* aRelatedNode, |
43 | | const nsAString& aPrevValue, |
44 | | const nsAString& aNewValue, |
45 | | const nsAString& aAttrName, |
46 | | uint16_t& aAttrChange, |
47 | | ErrorResult& aRv); |
48 | | |
49 | | protected: |
50 | 0 | ~MutationEvent() {} |
51 | | }; |
52 | | |
53 | | } // namespace dom |
54 | | } // namespace mozilla |
55 | | |
56 | | already_AddRefed<mozilla::dom::MutationEvent> |
57 | | NS_NewDOMMutationEvent(mozilla::dom::EventTarget* aOwner, |
58 | | nsPresContext* aPresContext, |
59 | | mozilla::InternalMutationEvent* aEvent); |
60 | | |
61 | | #endif // mozilla_dom_MutationEvent_h_ |