tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

TransitionEvent.h (1590B)


      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_
      8 
      9 #include "mozilla/EventForwards.h"
     10 #include "mozilla/dom/Event.h"
     11 #include "mozilla/dom/TransitionEventBinding.h"
     12 #include "nsStringFwd.h"
     13 
     14 namespace mozilla::dom {
     15 
     16 class TransitionEvent : public Event {
     17 public:
     18  TransitionEvent(EventTarget* aOwner, nsPresContext* aPresContext,
     19                  InternalTransitionEvent* aEvent);
     20 
     21  NS_INLINE_DECL_REFCOUNTING_INHERITED(TransitionEvent, Event)
     22 
     23  static already_AddRefed<TransitionEvent> Constructor(
     24      const GlobalObject& aGlobal, const nsAString& aType,
     25      const TransitionEventInit& aParam);
     26 
     27  virtual JSObject* WrapObjectInternal(
     28      JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override {
     29    return TransitionEvent_Binding::Wrap(aCx, this, aGivenProto);
     30  }
     31 
     32  void GetPropertyName(nsAString& aPropertyName) const;
     33  void GetPseudoElement(nsAString& aPreudoElement) const;
     34 
     35  float ElapsedTime();
     36 
     37 protected:
     38  ~TransitionEvent() = default;
     39 };
     40 
     41 }  // namespace mozilla::dom
     42 
     43 already_AddRefed<mozilla::dom::TransitionEvent> NS_NewDOMTransitionEvent(
     44    mozilla::dom::EventTarget* aOwner, nsPresContext* aPresContext,
     45    mozilla::InternalTransitionEvent* aEvent);
     46 
     47 #endif  // mozilla_dom_TransitionEvent_h_