This commit is contained in:
hyatt%netscape.com 1999-07-21 02:56:23 +00:00
Родитель fce77b6176
Коммит c0b6e62e18
4 изменённых файлов: 15 добавлений и 15 удалений

Просмотреть файл

@ -18,7 +18,7 @@
#include "nsXULAtoms.h"
#include "nsMenuFrame.h"
#include "nsBlockFrame.h"
#include "nsBoxFrame.h"
#include "nsIContent.h"
#include "prtypes.h"
#include "nsIAtom.h"
@ -69,7 +69,7 @@ nsMenuFrame::FirstChild(nsIAtom* aListName,
if (nsLayoutAtoms::popupList == aListName) {
*aFirstChild = mPopupFrames.FirstChild();
} else {
nsBlockFrame::FirstChild(aListName, aFirstChild);
nsBoxFrame::FirstChild(aListName, aFirstChild);
}
return NS_OK;
}
@ -98,12 +98,12 @@ nsMenuFrame::SetInitialChildList(nsIPresContext& aPresContext,
// Remove this frame from the list and place it in the other list.
frames.RemoveFrame(frame);
mPopupFrames.AppendFrame(this, frame);
rv = nsBlockFrame::SetInitialChildList(aPresContext, aListName, aChildList);
rv = nsBoxFrame::SetInitialChildList(aPresContext, aListName, aChildList);
return rv;
}
frame->GetNextSibling(&frame);
}
rv = nsBlockFrame::SetInitialChildList(aPresContext, aListName, aChildList);
rv = nsBoxFrame::SetInitialChildList(aPresContext, aListName, aChildList);
}
return rv;
}
@ -124,7 +124,7 @@ nsMenuFrame::GetAdditionalChildListName(PRInt32 aIndex,
NS_ADDREF(*aListName);
return NS_OK;
}*/
return nsBlockFrame::GetAdditionalChildListName(aIndex, aListName);
return nsBoxFrame::GetAdditionalChildListName(aIndex, aListName);
}
NS_IMETHODIMP
@ -132,7 +132,7 @@ nsMenuFrame::DeleteFrame(nsIPresContext& aPresContext)
{
// Cleanup frames in popup child list
mPopupFrames.DeleteFrames(aPresContext);
return nsBlockFrame::DeleteFrame(aPresContext);
return nsBoxFrame::DeleteFrame(aPresContext);
}
// Called to prevent events from going to anything inside the menu.
@ -197,7 +197,7 @@ nsMenuFrame::Reflow(nsIPresContext& aPresContext,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
nsresult rv = nsBlockFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
nsresult rv = nsBoxFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
nsIFrame* frame = mPopupFrames.FirstChild();
if (rv == NS_OK && frame) {

Просмотреть файл

@ -27,13 +27,13 @@
#include "nsIAtom.h"
#include "nsCOMPtr.h"
#include "nsBlockFrame.h"
#include "nsBoxFrame.h"
#include "nsFrameList.h"
nsresult NS_NewMenuFrame(nsIFrame** aResult) ;
class nsMenuFrame : public nsBlockFrame
class nsMenuFrame : public nsBoxFrame
{
public:
nsMenuFrame();

Просмотреть файл

@ -68,17 +68,17 @@ nsMenuPopupFrame::Init(nsIPresContext& aPresContext,
nsIStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
nsresult rv = nsBlockFrame::Init(aPresContext, aContent, aParent, aContext, aPrevInFlow);
nsresult rv = nsBoxFrame::Init(aPresContext, aContent, aParent, aContext, aPrevInFlow);
// We default to being vertical.
/*nsString value;
nsString value;
mContent->GetAttribute(kNameSpaceID_None, nsHTMLAtoms::align, value);
mHorizontal = PR_FALSE;
if (value.EqualsIgnoreCase("vertical"))
mHorizontal = PR_FALSE;
else if (value.EqualsIgnoreCase("horizontal"))
mHorizontal = PR_TRUE;
*/
CreateViewForFrame(aPresContext, this, aContext, PR_TRUE);
// Now that we've made a view, remove it and insert it at the correct
@ -178,7 +178,7 @@ NS_IMETHODIMP
nsMenuPopupFrame::DidReflow(nsIPresContext& aPresContext,
nsDidReflowStatus aStatus)
{
nsresult rv = nsBlockFrame::DidReflow(aPresContext, aStatus);
nsresult rv = nsBoxFrame::DidReflow(aPresContext, aStatus);
//SyncViewWithFrame();
return rv;
}

Просмотреть файл

@ -27,14 +27,14 @@
#include "nsIAtom.h"
#include "nsCOMPtr.h"
#include "nsBlockFrame.h"
#include "nsBoxFrame.h"
nsresult NS_NewMenuPopupFrame(nsIFrame** aResult) ;
class nsIViewManager;
class nsIView;
class nsMenuPopupFrame : public nsBlockFrame
class nsMenuPopupFrame : public nsBoxFrame
{
public:
nsMenuPopupFrame();