Bug 1769952 - Fix running raptor on a Win10-64 VM r=sparky
[gecko.git] / dom / xul / XULMenuElement.h
blobbf4ea2c4ec48d7e22bf0cd4b44e33992058128f8
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 "nsXULElement.h"
12 namespace mozilla::dom {
14 class KeyboardEvent;
16 class XULMenuElement final : public nsXULElement {
17 public:
18 explicit XULMenuElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
19 : nsXULElement(std::move(aNodeInfo)) {}
21 MOZ_CAN_RUN_SCRIPT already_AddRefed<Element> GetActiveChild();
22 MOZ_CAN_RUN_SCRIPT void SetActiveChild(Element* arg);
23 MOZ_CAN_RUN_SCRIPT bool HandleKeyPress(KeyboardEvent& keyEvent);
24 MOZ_CAN_RUN_SCRIPT bool OpenedWithKey();
26 private:
27 virtual ~XULMenuElement() = default;
28 JSObject* WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final;
30 nsIFrame* GetFrame();
33 } // namespace mozilla::dom
35 #endif // XULMenuElement_h