SVGAnimateElement.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. #ifndef mozilla_dom_SVGAnimateElement_h
  6. #define mozilla_dom_SVGAnimateElement_h
  7. #include "mozilla/Attributes.h"
  8. #include "mozilla/dom/SVGAnimationElement.h"
  9. #include "nsSMILAnimationFunction.h"
  10. nsresult NS_NewSVGAnimateElement(nsIContent **aResult,
  11. already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
  12. namespace mozilla {
  13. namespace dom {
  14. class SVGAnimateElement final : public SVGAnimationElement
  15. {
  16. protected:
  17. explicit SVGAnimateElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
  18. nsSMILAnimationFunction mAnimationFunction;
  19. friend nsresult
  20. (::NS_NewSVGAnimateElement(nsIContent **aResult,
  21. already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
  22. virtual JSObject* WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) override;
  23. public:
  24. // nsIDOMNode
  25. virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const override;
  26. // SVGAnimationElement
  27. virtual nsSMILAnimationFunction& AnimationFunction() override;
  28. };
  29. } // namespace dom
  30. } // namespace mozilla
  31. #endif // mozilla_dom_SVGAnimateElement_h