Bug 1688354 [wpt PR 27298] - Treat 'rem' as an absolute unit for font size, a=testonly
[gecko.git] / dom / events / MutationEvent.h
blob24fcfeeeeeaa71f0a0990c790763df4c569e66c4
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/. */
7 #ifndef mozilla_dom_MutationEvent_h_
8 #define mozilla_dom_MutationEvent_h_
10 #include "mozilla/EventForwards.h"
11 #include "mozilla/dom/Event.h"
12 #include "mozilla/dom/MutationEventBinding.h"
13 #include "nsINode.h"
15 namespace mozilla {
16 namespace dom {
18 class MutationEvent : public Event {
19 public:
20 MutationEvent(EventTarget* aOwner, nsPresContext* aPresContext,
21 InternalMutationEvent* aEvent);
23 NS_INLINE_DECL_REFCOUNTING_INHERITED(MutationEvent, Event)
25 virtual JSObject* WrapObjectInternal(
26 JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override {
27 return MutationEvent_Binding::Wrap(aCx, this, aGivenProto);
30 void GetPrevValue(nsAString& aPrevValue) const;
31 void GetNewValue(nsAString& aNewValue) const;
32 void GetAttrName(nsAString& aAttrName) const;
34 nsINode* GetRelatedNode();
36 uint16_t AttrChange();
38 void InitMutationEvent(const nsAString& aType, bool aCanBubble,
39 bool aCancelable, nsINode* aRelatedNode,
40 const nsAString& aPrevValue,
41 const nsAString& aNewValue, const nsAString& aAttrName,
42 uint16_t& aAttrChange, ErrorResult& aRv);
44 protected:
45 ~MutationEvent() = default;
48 } // namespace dom
49 } // namespace mozilla
51 already_AddRefed<mozilla::dom::MutationEvent> NS_NewDOMMutationEvent(
52 mozilla::dom::EventTarget* aOwner, nsPresContext* aPresContext,
53 mozilla::InternalMutationEvent* aEvent);
55 #endif // mozilla_dom_MutationEvent_h_