Bug 1825212 [wpt PR 39266] - [@scope] Propagate proximity from SubResult, a=testonly
[gecko.git] / dom / xul / XULMenuElement.h
blob5def6839fc22f5822285f31529eaae3631477cba
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/. */
7 #ifndef mozilla_dom_XULMenuElement_h
8 #define mozilla_dom_XULMenuElement_h
10 #include "XULButtonElement.h"
11 #include "nsINode.h"
12 #include "nsXULElement.h"
14 namespace mozilla::dom {
16 class KeyboardEvent;
18 class XULMenuElement final : public XULButtonElement {
19 public:
20 explicit XULMenuElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
21 : XULButtonElement(std::move(aNodeInfo)) {}
23 MOZ_CAN_RUN_SCRIPT void SetActiveMenuChild(Element*);
24 Element* GetActiveMenuChild();
26 NS_IMPL_FROMNODE_HELPER(XULMenuElement,
27 IsAnyOfXULElements(nsGkAtoms::menu,
28 nsGkAtoms::menulist));
30 private:
31 virtual ~XULMenuElement() = default;
32 JSObject* WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final;
35 } // namespace mozilla::dom
37 #endif // XULMenuElement_h