Merge mozilla-central to autoland on a CLOSED TREE
[gecko.git] / dom / events / TransitionEvent.h
blob74c9001b00679acc75f97ea26aabcf40d14b4568
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 #ifndef mozilla_dom_TransitionEvent_h_
7 #define mozilla_dom_TransitionEvent_h_
9 #include "mozilla/EventForwards.h"
10 #include "mozilla/dom/Event.h"
11 #include "mozilla/dom/TransitionEventBinding.h"
12 #include "nsStringFwd.h"
14 namespace mozilla::dom {
16 class TransitionEvent : public Event {
17 public:
18 TransitionEvent(EventTarget* aOwner, nsPresContext* aPresContext,
19 InternalTransitionEvent* aEvent);
21 NS_INLINE_DECL_REFCOUNTING_INHERITED(TransitionEvent, Event)
23 static already_AddRefed<TransitionEvent> Constructor(
24 const GlobalObject& aGlobal, const nsAString& aType,
25 const TransitionEventInit& aParam);
27 virtual JSObject* WrapObjectInternal(
28 JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override {
29 return TransitionEvent_Binding::Wrap(aCx, this, aGivenProto);
32 void GetPropertyName(nsAString& aPropertyName) const;
33 void GetPseudoElement(nsAString& aPreudoElement) const;
35 float ElapsedTime();
37 protected:
38 ~TransitionEvent() = default;
41 } // namespace mozilla::dom
43 already_AddRefed<mozilla::dom::TransitionEvent> NS_NewDOMTransitionEvent(
44 mozilla::dom::EventTarget* aOwner, nsPresContext* aPresContext,
45 mozilla::InternalTransitionEvent* aEvent);
47 #endif // mozilla_dom_TransitionEvent_h_