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/. */
6 
7 #ifndef XULTooltipElement_h__
8 #define XULTooltipElement_h__
9 
10 #include "XULPopupElement.h"
11 
12 namespace mozilla {
13 namespace dom {
14 
15 nsXULElement* NS_NewXULTooltipElement(
16     already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
17 
18 class XULTooltipElement final : public XULPopupElement {
19  public:
XULTooltipElement(already_AddRefed<mozilla::dom::NodeInfo> && aNodeInfo)20   explicit XULTooltipElement(
21       already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
22       : XULPopupElement(std::move(aNodeInfo)) {}
23   nsresult Init();
24 
25   virtual nsresult AfterSetAttr(int32_t aNameSpaceID, nsAtom* aName,
26                                 const nsAttrValue* aValue,
27                                 const nsAttrValue* aOldValue,
28                                 nsIPrincipal* aSubjectPrincipal,
29                                 bool aNotify) override;
30   virtual nsresult PostHandleEvent(EventChainPostVisitor& aVisitor) override;
31 
32  protected:
33   virtual ~XULTooltipElement() = default;
34 };
35 
36 }  // namespace dom
37 }  // namespace mozilla
38 
39 #endif  // XULPopupElement_h
40