bug 77357

r=bryner sr=hyatt
This commit is contained in:
evaughan%netscape.com 2001-10-19 20:48:35 +00:00
parent c7140326c2
commit 3798517f57
7 changed files with 52 additions and 27 deletions

View File

@ -36,6 +36,8 @@
*
* ***** END LICENSE BLOCK ***** */
//#define MOZ_GRID2 1
#include "nsCSSFrameConstructor.h"
#include "nsIArena.h"
#include "nsCRT.h"
@ -299,24 +301,20 @@ NS_NewOutlinerBodyFrame (nsIPresShell* aPresShell, nsIFrame** aNewFrame);
#ifdef MOZ_GRID2
nsresult
NS_NewGridLayout2 ( nsIPresShell* aPresShell, nsIBoxLayout** aNewLayout );
#else
nsresult
NS_NewGridLayout ( nsIPresShell* aPresShell, nsCOMPtr<nsIBoxLayout>& aNewLayout );
#endif
#ifdef MOZ_GRID2
nsresult
NS_NewGridRowLeafLayout ( nsIPresShell* aPresShell, nsIBoxLayout** aNewLayout );
#else
nsresult
NS_NewObeliskLayout ( nsIPresShell* aPresShell, nsCOMPtr<nsIBoxLayout>& aNewLayout );
#endif
#ifdef MOZ_GRID2
NS_NewGridRowLeafFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame, PRBool aIsRoot, nsIBoxLayout* aLayout);
nsresult
NS_NewGridRowGroupLayout ( nsIPresShell* aPresShell, nsIBoxLayout** aNewLayout );
nsresult
NS_NewGridRowGroupFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame, PRBool aIsRoot, nsIBoxLayout* aLayout);
#else
nsresult
NS_NewGridLayout ( nsIPresShell* aPresShell, nsCOMPtr<nsIBoxLayout>& aNewLayout );
nsresult
NS_NewObeliskLayout ( nsIPresShell* aPresShell, nsCOMPtr<nsIBoxLayout>& aNewLayout );
nsresult
NS_NewTempleLayout ( nsIPresShell* aPresShell, nsCOMPtr<nsIBoxLayout>& aNewLayout );
#endif
@ -5422,10 +5420,11 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell,
{
#ifdef MOZ_GRID2
NS_NewGridRowGroupLayout(aPresShell, getter_AddRefs(layout));
rv = NS_NewGridRowGroupFrame(aPresShell, &newFrame, PR_FALSE, layout);
#else
NS_NewTempleLayout(aPresShell, layout);
#endif
rv = NS_NewBoxFrame(aPresShell, &newFrame, PR_FALSE, layout);
#endif
}
// Boxes can scroll.
@ -5456,6 +5455,7 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell,
nsCOMPtr<nsIBoxLayout> layout;
#ifdef MOZ_GRID2
NS_NewGridRowLeafLayout(aPresShell, getter_AddRefs(layout));
#else
@ -5465,7 +5465,11 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell,
if (aTag == nsXULAtoms::treerow)
rv = NS_NewXULTreeSliceFrame(aPresShell, &newFrame, PR_FALSE, layout);
else
rv = NS_NewBoxFrame(aPresShell, &newFrame, PR_FALSE, layout);
#ifdef MOZ_GRID2
rv = NS_NewGridRowLeafFrame(aPresShell, &newFrame, PR_FALSE, layout);
#else
rv = NS_NewBoxFrame(aPresShell, &newFrame, PR_FALSE, layout);
#endif
// Boxes can scroll.
if (IsScrollable(aPresContext, display)) {

View File

@ -36,6 +36,8 @@
*
* ***** END LICENSE BLOCK ***** */
//#define MOZ_GRID2 1
#include "nsCSSFrameConstructor.h"
#include "nsIArena.h"
#include "nsCRT.h"
@ -299,24 +301,20 @@ NS_NewOutlinerBodyFrame (nsIPresShell* aPresShell, nsIFrame** aNewFrame);
#ifdef MOZ_GRID2
nsresult
NS_NewGridLayout2 ( nsIPresShell* aPresShell, nsIBoxLayout** aNewLayout );
#else
nsresult
NS_NewGridLayout ( nsIPresShell* aPresShell, nsCOMPtr<nsIBoxLayout>& aNewLayout );
#endif
#ifdef MOZ_GRID2
nsresult
NS_NewGridRowLeafLayout ( nsIPresShell* aPresShell, nsIBoxLayout** aNewLayout );
#else
nsresult
NS_NewObeliskLayout ( nsIPresShell* aPresShell, nsCOMPtr<nsIBoxLayout>& aNewLayout );
#endif
#ifdef MOZ_GRID2
NS_NewGridRowLeafFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame, PRBool aIsRoot, nsIBoxLayout* aLayout);
nsresult
NS_NewGridRowGroupLayout ( nsIPresShell* aPresShell, nsIBoxLayout** aNewLayout );
nsresult
NS_NewGridRowGroupFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame, PRBool aIsRoot, nsIBoxLayout* aLayout);
#else
nsresult
NS_NewGridLayout ( nsIPresShell* aPresShell, nsCOMPtr<nsIBoxLayout>& aNewLayout );
nsresult
NS_NewObeliskLayout ( nsIPresShell* aPresShell, nsCOMPtr<nsIBoxLayout>& aNewLayout );
nsresult
NS_NewTempleLayout ( nsIPresShell* aPresShell, nsCOMPtr<nsIBoxLayout>& aNewLayout );
#endif
@ -5422,10 +5420,11 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell,
{
#ifdef MOZ_GRID2
NS_NewGridRowGroupLayout(aPresShell, getter_AddRefs(layout));
rv = NS_NewGridRowGroupFrame(aPresShell, &newFrame, PR_FALSE, layout);
#else
NS_NewTempleLayout(aPresShell, layout);
#endif
rv = NS_NewBoxFrame(aPresShell, &newFrame, PR_FALSE, layout);
#endif
}
// Boxes can scroll.
@ -5456,6 +5455,7 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell,
nsCOMPtr<nsIBoxLayout> layout;
#ifdef MOZ_GRID2
NS_NewGridRowLeafLayout(aPresShell, getter_AddRefs(layout));
#else
@ -5465,7 +5465,11 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell,
if (aTag == nsXULAtoms::treerow)
rv = NS_NewXULTreeSliceFrame(aPresShell, &newFrame, PR_FALSE, layout);
else
rv = NS_NewBoxFrame(aPresShell, &newFrame, PR_FALSE, layout);
#ifdef MOZ_GRID2
rv = NS_NewGridRowLeafFrame(aPresShell, &newFrame, PR_FALSE, layout);
#else
rv = NS_NewBoxFrame(aPresShell, &newFrame, PR_FALSE, layout);
#endif
// Boxes can scroll.
if (IsScrollable(aPresContext, display)) {

View File

@ -62,10 +62,12 @@ CPPSRCS= \
nsPopupBoxObject.cpp \
nsMenuBoxObject.cpp \
nsBoxObject.cpp \
!ifndef MOZ_GRID2
nsGridLayout.cpp \
nsTempleLayout.cpp \
nsObeliskLayout.cpp \
nsMonumentLayout.cpp \
!endif
nsImageBoxFrame.cpp \
nsRootBoxFrame.cpp \
nsDocElementBoxFrame.cpp \
@ -121,10 +123,12 @@ CPP_OBJS= \
.\$(OBJDIR)\nsPopupBoxObject.obj \
.\$(OBJDIR)\nsMenuBoxObject.obj \
.\$(OBJDIR)\nsBoxObject.obj \
!ifndef MOZ_GRID2
.\$(OBJDIR)\nsGridLayout.obj \
.\$(OBJDIR)\nsTempleLayout.obj \
.\$(OBJDIR)\nsObeliskLayout.obj \
.\$(OBJDIR)\nsMonumentLayout.obj \
!endif
.\$(OBJDIR)\nsImageBoxFrame.obj \
.\$(OBJDIR)\nsRootBoxFrame.obj \
.\$(OBJDIR)\nsDocElementBoxFrame.obj \

View File

@ -45,6 +45,8 @@
#ifndef nsTreeLayout_h___
#define nsTreeLayout_h___
//#define MOZ_GRID2 1
#ifdef MOZ_GRID2
#include "nsGridRowGroupLayout.h"
#else

View File

@ -47,6 +47,8 @@
#include "nsIBoxLayout.h"
#include "nsMonumentLayout.h"
//#define MOZ_GRID2 1
#ifdef MOZ_GRID2
#include "nsGrid.h"
#include "nsGridRow.h"
@ -142,7 +144,9 @@ nsXULTreeCellFrame::GetFrameForPoint(nsIPresContext* aPresContext,
nsGrid* grid;
PRInt32 index;
part->GetGrid(box, &grid, &index);
nsIBox* splitBox = grid->GetColumnAt(i)->GetBox();
nsIBox* splitBox = nsnull;
if (grid->GetColumnCount() > 0)
splitBox = grid->GetColumnAt(i)->GetBox();
#else
box->GetLayoutManager(getter_AddRefs(lm));
nsCOMPtr<nsIMonument> mon(do_QueryInterface(lm));

View File

@ -65,6 +65,8 @@
#include "nsIStyleContext.h"
#include "nsIDOMText.h"
//#define MOZ_GRID2 1
#ifdef MOZ_GRID2
#include "nsGridRowGroupLayout.h"
#else

View File

@ -39,7 +39,12 @@
#include "nsBoxFrame.h"
#include "nsIXULTreeSlice.h"
#ifdef MOZ_GRID2
#include "nsGridRowLeafFrame.h"
class nsXULTreeSliceFrame : public nsGridRowLeafFrame, public nsIXULTreeSlice
#else
class nsXULTreeSliceFrame : public nsBoxFrame, public nsIXULTreeSlice
#endif
{
public:
NS_DECL_ISUPPORTS