SVGTSpanElement.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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_SVGTSpanElement_h
  6. #define mozilla_dom_SVGTSpanElement_h
  7. #include "mozilla/dom/SVGTextPositioningElement.h"
  8. nsresult NS_NewSVGTSpanElement(nsIContent **aResult,
  9. already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
  10. namespace mozilla {
  11. namespace dom {
  12. typedef SVGTextPositioningElement SVGTSpanElementBase;
  13. class SVGTSpanElement final : public SVGTSpanElementBase
  14. {
  15. protected:
  16. friend nsresult (::NS_NewSVGTSpanElement(nsIContent **aResult,
  17. already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
  18. explicit SVGTSpanElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
  19. virtual JSObject* WrapNode(JSContext *cx, JS::Handle<JSObject*> aGivenProto) override;
  20. public:
  21. // nsIContent interface
  22. NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const override;
  23. virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const override;
  24. protected:
  25. virtual EnumAttributesInfo GetEnumInfo() override;
  26. virtual LengthAttributesInfo GetLengthInfo() override;
  27. nsSVGEnum mEnumAttributes[1];
  28. virtual nsSVGEnum* EnumAttributes() override
  29. { return mEnumAttributes; }
  30. nsSVGLength2 mLengthAttributes[1];
  31. virtual nsSVGLength2* LengthAttributes() override
  32. { return mLengthAttributes; }
  33. };
  34. } // namespace dom
  35. } // namespace mozilla
  36. #endif // mozilla_dom_SVGTSpanElement_h