1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
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 nsPopupSetFrame_h__
8 #define nsPopupSetFrame_h__
10 #include "mozilla/Attributes.h"
12 #include "nsBoxFrame.h"
14 nsIFrame
* NS_NewPopupSetFrame(nsIPresShell
* aPresShell
, nsStyleContext
* aContext
);
16 class nsPopupSetFrame
: public nsBoxFrame
19 NS_DECL_FRAMEARENA_HELPERS
21 nsPopupSetFrame(nsIPresShell
* aShell
, nsStyleContext
* aContext
):
22 nsBoxFrame(aShell
, aContext
) {}
26 virtual void Init(nsIContent
* aContent
,
27 nsContainerFrame
* aParent
,
28 nsIFrame
* aPrevInFlow
) MOZ_OVERRIDE
;
30 virtual void SetInitialChildList(ChildListID aListID
,
31 nsFrameList
& aChildList
) MOZ_OVERRIDE
;
32 virtual void AppendFrames(ChildListID aListID
,
33 nsFrameList
& aFrameList
) MOZ_OVERRIDE
;
34 virtual void RemoveFrame(ChildListID aListID
,
35 nsIFrame
* aOldFrame
) MOZ_OVERRIDE
;
36 virtual void InsertFrames(ChildListID aListID
,
38 nsFrameList
& aFrameList
) MOZ_OVERRIDE
;
40 virtual const nsFrameList
& GetChildList(ChildListID aList
) const MOZ_OVERRIDE
;
41 virtual void GetChildLists(nsTArray
<ChildList
>* aLists
) const MOZ_OVERRIDE
;
43 NS_IMETHOD
DoLayout(nsBoxLayoutState
& aBoxLayoutState
) MOZ_OVERRIDE
;
45 // Used to destroy our popup frames.
46 virtual void DestroyFrom(nsIFrame
* aDestructRoot
) MOZ_OVERRIDE
;
48 virtual nsIAtom
* GetType() const MOZ_OVERRIDE
;
50 #ifdef DEBUG_FRAME_DUMP
51 virtual nsresult
GetFrameName(nsAString
& aResult
) const MOZ_OVERRIDE
53 return MakeFrameName(NS_LITERAL_STRING("PopupSet"), aResult
);
58 void AddPopupFrameList(nsFrameList
& aPopupFrameList
);
59 void RemovePopupFrame(nsIFrame
* aPopup
);
61 nsFrameList mPopupList
;