Bug 74184. Make sure that NS_FRAME_HAS_CHILD_WITH_VIEW is carried forward to continuing frames. r=kmcclusk, sr=attinasi

This commit is contained in:
waterson%netscape.com 2001-04-17 06:43:01 +00:00
Родитель 26b7f822c3
Коммит e737ebab3b
4 изменённых файлов: 52 добавлений и 0 удалений

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

@ -56,6 +56,27 @@ nsContainerFrame::~nsContainerFrame()
{
}
NS_IMETHODIMP
nsContainerFrame::Init(nsIPresContext* aPresContext,
nsIContent* aContent,
nsIFrame* aParent,
nsIStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
nsresult rv;
rv = nsSplittableFrame::Init(aPresContext, aContent, aParent, aContext, aPrevInFlow);
if (aPrevInFlow) {
// Make sure we copy bits from our prev-in-flow that will affect
// us. A continuation for a container frame needs to know if it
// has a child with a view so that we'll properly reposition it.
nsFrameState state;
aPrevInFlow->GetFrameState(&state);
if (state & NS_FRAME_HAS_CHILD_WITH_VIEW)
mState |= NS_FRAME_HAS_CHILD_WITH_VIEW;
}
return rv;
}
NS_IMETHODIMP
nsContainerFrame::SetInitialChildList(nsIPresContext* aPresContext,
nsIAtom* aListName,

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

@ -40,6 +40,11 @@ class nsContainerFrame : public nsSplittableFrame
{
public:
// nsIFrame overrides
NS_IMETHOD Init(nsIPresContext* aPresContext,
nsIContent* aContent,
nsIFrame* aParent,
nsIStyleContext* aContext,
nsIFrame* aPrevInFlow);
NS_IMETHOD SetInitialChildList(nsIPresContext* aPresContext,
nsIAtom* aListName,
nsIFrame* aChildList);

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

@ -56,6 +56,27 @@ nsContainerFrame::~nsContainerFrame()
{
}
NS_IMETHODIMP
nsContainerFrame::Init(nsIPresContext* aPresContext,
nsIContent* aContent,
nsIFrame* aParent,
nsIStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
nsresult rv;
rv = nsSplittableFrame::Init(aPresContext, aContent, aParent, aContext, aPrevInFlow);
if (aPrevInFlow) {
// Make sure we copy bits from our prev-in-flow that will affect
// us. A continuation for a container frame needs to know if it
// has a child with a view so that we'll properly reposition it.
nsFrameState state;
aPrevInFlow->GetFrameState(&state);
if (state & NS_FRAME_HAS_CHILD_WITH_VIEW)
mState |= NS_FRAME_HAS_CHILD_WITH_VIEW;
}
return rv;
}
NS_IMETHODIMP
nsContainerFrame::SetInitialChildList(nsIPresContext* aPresContext,
nsIAtom* aListName,

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

@ -40,6 +40,11 @@ class nsContainerFrame : public nsSplittableFrame
{
public:
// nsIFrame overrides
NS_IMETHOD Init(nsIPresContext* aPresContext,
nsIContent* aContent,
nsIFrame* aParent,
nsIStyleContext* aContext,
nsIFrame* aPrevInFlow);
NS_IMETHOD SetInitialChildList(nsIPresContext* aPresContext,
nsIAtom* aListName,
nsIFrame* aChildList);