HTMLMapElement.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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_HTMLMapElement_h
  6. #define mozilla_dom_HTMLMapElement_h
  7. #include "mozilla/Attributes.h"
  8. #include "nsGenericHTMLElement.h"
  9. #include "nsIDOMHTMLMapElement.h"
  10. #include "nsGkAtoms.h"
  11. class nsContentList;
  12. namespace mozilla {
  13. namespace dom {
  14. class HTMLMapElement final : public nsGenericHTMLElement,
  15. public nsIDOMHTMLMapElement
  16. {
  17. public:
  18. explicit HTMLMapElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
  19. // nsISupports
  20. NS_DECL_ISUPPORTS_INHERITED
  21. // nsIDOMHTMLMapElement
  22. NS_DECL_NSIDOMHTMLMAPELEMENT
  23. virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const override;
  24. NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED_NO_UNLINK(HTMLMapElement,
  25. nsGenericHTMLElement)
  26. // XPCOM GetName is fine.
  27. void SetName(const nsAString& aName, ErrorResult& aError)
  28. {
  29. SetHTMLAttr(nsGkAtoms::name, aName, aError);
  30. }
  31. nsIHTMLCollection* Areas();
  32. virtual JSObject* WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
  33. protected:
  34. ~HTMLMapElement() {}
  35. RefPtr<nsContentList> mAreas;
  36. };
  37. } // namespace dom
  38. } // namespace mozilla
  39. #endif // mozilla_dom_HTMLMapElement_h