зеркало из https://github.com/mozilla/pjs.git
Teaching the menu frame that menu children aren't really part of its flow (like
the dropdown combo box does).
This commit is contained in:
Родитель
3c851355b7
Коммит
5978ed3159
|
@ -26,7 +26,7 @@
|
|||
#include "nsIStyleContext.h"
|
||||
#include "nsCSSRendering.h"
|
||||
#include "nsINameSpaceManager.h"
|
||||
|
||||
#include "nsLayoutAtoms.h"
|
||||
|
||||
//
|
||||
// NS_NewMenuFrame
|
||||
|
@ -56,3 +56,15 @@ nsMenuFrame::nsMenuFrame()
|
|||
|
||||
} // cntr
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsMenuFrame::FirstChild(nsIAtom* aListName,
|
||||
nsIFrame** aFirstChild) const
|
||||
{
|
||||
if (nsLayoutAtoms::popupList == aListName) {
|
||||
*aFirstChild = mPopupFrames.FirstChild();
|
||||
} else {
|
||||
nsBoxFrame::FirstChild(aListName, aFirstChild);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,13 +23,12 @@
|
|||
#ifndef nsMenuFrame_h__
|
||||
#define nsMenuFrame_h__
|
||||
|
||||
|
||||
#include "nsLeafFrame.h"
|
||||
#include "prtypes.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
||||
#include "nsBoxFrame.h"
|
||||
#include "nsFrameList.h"
|
||||
|
||||
nsresult NS_NewMenuFrame(nsIFrame** aResult) ;
|
||||
|
||||
|
@ -39,8 +38,11 @@ class nsMenuFrame : public nsBoxFrame
|
|||
public:
|
||||
nsMenuFrame();
|
||||
|
||||
protected:
|
||||
NS_IMETHODIMP FirstChild(nsIAtom* aListName,
|
||||
nsIFrame** aFirstChild) const;
|
||||
|
||||
protected:
|
||||
nsFrameList mPopupFrames;
|
||||
}; // class nsMenuFrame
|
||||
|
||||
#endif
|
||||
|
|
|
@ -23,8 +23,6 @@
|
|||
#ifndef nsMenuPopupFrame_h__
|
||||
#define nsMenuPopupFrame_h__
|
||||
|
||||
|
||||
#include "nsLeafFrame.h"
|
||||
#include "prtypes.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
|
Загрузка…
Ссылка в новой задаче