Changed table code to call ReparentFrameView() when pushing/pulling frames

This commit is contained in:
troy%netscape.com 1999-04-13 02:38:09 +00:00
Родитель 8d705d44b0
Коммит 1aafacf365
4 изменённых файлов: 32 добавлений и 2 удалений

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

@ -2713,6 +2713,11 @@ nsTableFrame::PushChildren(nsIFrame* aFromChild, nsIFrame* aPrevSibling)
if (firstBodyFrame) {
prevSibling = nextInFlow->mFrames.GetPrevSiblingFor(firstBodyFrame);
}
// When pushing and pulling frames we need to check for whether any
// views need to be reparented.
for (nsIFrame* f = aFromChild; f; f->GetNextSibling(&f)) {
nsHTMLContainerFrame::ReparentFrameView(f, this, nextInFlow);
}
nextInFlow->mFrames.InsertFrames(mNextInFlow, prevSibling, aFromChild);
}
else {
@ -2738,7 +2743,12 @@ nsTableFrame::MoveOverflowToChildList()
nsTableFrame* prevInFlow = (nsTableFrame*)mPrevInFlow;
if (nsnull != prevInFlow) {
if (prevInFlow->mOverflowFrames.NotEmpty()) {
mFrames.AppendFrames(this, prevInFlow->mOverflowFrames);
// When pushing and pulling frames we need to check for whether any
// views need to be reparented.
for (nsIFrame* f = prevInFlow->mOverflowFrames.FirstChild(); f; f->GetNextSibling(&f)) {
nsHTMLContainerFrame::ReparentFrameView(f, prevInFlow, this);
}
mFrames.InsertFrames(this, nsnull, prevInFlow->mOverflowFrames);
result = PR_TRUE;
}
}

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

@ -485,6 +485,11 @@ NS_METHOD nsTableRowGroupFrame::PullUpAllRowFrames(nsIPresContext& aPresContext)
// Any row frames?
if (nextInFlow->mFrames.NotEmpty()) {
// When pushing and pulling frames we need to check for whether any
// views need to be reparented.
for (nsIFrame* f = nextInFlow->mFrames.FirstChild(); f; f->GetNextSibling(&f)) {
nsHTMLContainerFrame::ReparentFrameView(f, nextInFlow, this);
}
// Append them to our child list
mFrames.AppendFrames(this, nextInFlow->mFrames);
}

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

@ -2713,6 +2713,11 @@ nsTableFrame::PushChildren(nsIFrame* aFromChild, nsIFrame* aPrevSibling)
if (firstBodyFrame) {
prevSibling = nextInFlow->mFrames.GetPrevSiblingFor(firstBodyFrame);
}
// When pushing and pulling frames we need to check for whether any
// views need to be reparented.
for (nsIFrame* f = aFromChild; f; f->GetNextSibling(&f)) {
nsHTMLContainerFrame::ReparentFrameView(f, this, nextInFlow);
}
nextInFlow->mFrames.InsertFrames(mNextInFlow, prevSibling, aFromChild);
}
else {
@ -2738,7 +2743,12 @@ nsTableFrame::MoveOverflowToChildList()
nsTableFrame* prevInFlow = (nsTableFrame*)mPrevInFlow;
if (nsnull != prevInFlow) {
if (prevInFlow->mOverflowFrames.NotEmpty()) {
mFrames.AppendFrames(this, prevInFlow->mOverflowFrames);
// When pushing and pulling frames we need to check for whether any
// views need to be reparented.
for (nsIFrame* f = prevInFlow->mOverflowFrames.FirstChild(); f; f->GetNextSibling(&f)) {
nsHTMLContainerFrame::ReparentFrameView(f, prevInFlow, this);
}
mFrames.InsertFrames(this, nsnull, prevInFlow->mOverflowFrames);
result = PR_TRUE;
}
}

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

@ -485,6 +485,11 @@ NS_METHOD nsTableRowGroupFrame::PullUpAllRowFrames(nsIPresContext& aPresContext)
// Any row frames?
if (nextInFlow->mFrames.NotEmpty()) {
// When pushing and pulling frames we need to check for whether any
// views need to be reparented.
for (nsIFrame* f = nextInFlow->mFrames.FirstChild(); f; f->GetNextSibling(&f)) {
nsHTMLContainerFrame::ReparentFrameView(f, nextInFlow, this);
}
// Append them to our child list
mFrames.AppendFrames(this, nextInFlow->mFrames);
}