зеркало из https://github.com/mozilla/pjs.git
Continuing the menu frame's education regarding its separate popup list.
This commit is contained in:
Родитель
5978ed3159
Коммит
25daf11eae
|
@ -56,6 +56,8 @@ nsMenuFrame::nsMenuFrame()
|
|||
|
||||
} // cntr
|
||||
|
||||
// The following methods are all overridden to ensure that the xpmenuchildren frame
|
||||
// is placed in the appropriate list.
|
||||
NS_IMETHODIMP
|
||||
nsMenuFrame::FirstChild(nsIAtom* aListName,
|
||||
nsIFrame** aFirstChild) const
|
||||
|
@ -68,3 +70,16 @@ nsMenuFrame::FirstChild(nsIAtom* aListName,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsMenuFrame::SetInitialChildList(nsIPresContext& aPresContext,
|
||||
nsIAtom* aListName,
|
||||
nsIFrame* aChildList)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
if (nsLayoutAtoms::popupList == aListName) {
|
||||
mPopupFrames.SetFrames(aChildList);
|
||||
} else {
|
||||
rv = nsBoxFrame::SetInitialChildList(aPresContext, aListName, aChildList);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
|
|
@ -38,8 +38,12 @@ class nsMenuFrame : public nsBoxFrame
|
|||
public:
|
||||
nsMenuFrame();
|
||||
|
||||
NS_IMETHODIMP FirstChild(nsIAtom* aListName,
|
||||
nsIFrame** aFirstChild) const;
|
||||
NS_IMETHOD FirstChild(nsIAtom* aListName,
|
||||
nsIFrame** aFirstChild) const;
|
||||
|
||||
NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext,
|
||||
nsIAtom* aListName,
|
||||
nsIFrame* aChildList);
|
||||
|
||||
protected:
|
||||
nsFrameList mPopupFrames;
|
||||
|
|
Загрузка…
Ссылка в новой задаче