SVGStopElement.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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_SVGStopElement_h
  6. #define mozilla_dom_SVGStopElement_h
  7. #include "nsSVGElement.h"
  8. #include "nsSVGNumber2.h"
  9. nsresult NS_NewSVGStopElement(nsIContent **aResult,
  10. already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
  11. typedef nsSVGElement SVGStopElementBase;
  12. namespace mozilla {
  13. namespace dom {
  14. class SVGStopElement final : public SVGStopElementBase
  15. {
  16. protected:
  17. friend nsresult (::NS_NewSVGStopElement(nsIContent **aResult,
  18. already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
  19. explicit SVGStopElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
  20. virtual JSObject* WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) override;
  21. public:
  22. // nsIContent interface
  23. NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const override;
  24. virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const override;
  25. // WebIDL
  26. already_AddRefed<SVGAnimatedNumber> Offset();
  27. protected:
  28. virtual NumberAttributesInfo GetNumberInfo() override;
  29. nsSVGNumber2 mOffset;
  30. static NumberInfo sNumberInfo;
  31. };
  32. } // namespace dom
  33. } // namespace mozilla
  34. #endif // mozilla_dom_SVGStopElement_h