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 nsMathMLmactionFrame_h___
8 #define nsMathMLmactionFrame_h___
11 #include "nsMathMLSelectedFrame.h"
12 #include "nsIDOMEventListener.h"
13 #include "mozilla/Attributes.h"
17 } // namespace mozilla
20 // <maction> -- bind actions to a subexpression
23 class nsMathMLmactionFrame final
: public nsMathMLSelectedFrame
{
25 NS_DECL_FRAMEARENA_HELPERS(nsMathMLmactionFrame
)
27 friend nsIFrame
* NS_NewMathMLmactionFrame(mozilla::PresShell
* aPresShell
,
28 ComputedStyle
* aStyle
);
30 virtual void Init(nsIContent
* aContent
, nsContainerFrame
* aParent
,
31 nsIFrame
* aPrevInFlow
) override
;
33 void SetInitialChildList(ChildListID aListID
,
34 nsFrameList
&& aChildList
) override
;
36 virtual nsresult
ChildListChanged(int32_t aModType
) override
;
38 virtual nsresult
AttributeChanged(int32_t aNameSpaceID
, nsAtom
* aAttribute
,
39 int32_t aModType
) override
;
46 class MouseListener final
: public nsIDOMEventListener
{
48 ~MouseListener() = default;
52 NS_DECL_NSIDOMEVENTLISTENER
54 explicit MouseListener(nsMathMLmactionFrame
* aOwner
) : mOwner(aOwner
) {}
56 nsMathMLmactionFrame
* mOwner
;
60 explicit nsMathMLmactionFrame(ComputedStyle
* aStyle
,
61 nsPresContext
* aPresContext
)
62 : nsMathMLSelectedFrame(aStyle
, aPresContext
, kClassID
) {}
63 virtual ~nsMathMLmactionFrame();
69 RefPtr
<MouseListener
> mListener
;
71 // helper to return the frame for the attribute selection="number"
72 nsIFrame
* GetSelectedFrame() override
;
75 #endif /* nsMathMLmactionFrame_h___ */