Make sure overflow lists get ReResolved too

git-svn-id: svn://10.0.0.236/trunk@14152 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
kipp%netscape.com 1998-11-05 19:31:59 +00:00
parent a3ee06369b
commit 73f0843257
2 changed files with 36 additions and 0 deletions

View File

@ -195,11 +195,29 @@ nsContainerFrame::ReResolveStyleContext(nsIPresContext* aPresContext,
nsIStyleContext* oldContext = mStyleContext;
nsresult result = nsFrame::ReResolveStyleContext(aPresContext, aParentContext);
if (oldContext != mStyleContext) {
// Update primary child list
nsIFrame* child = mFirstChild;
while ((NS_SUCCEEDED(result)) && (nsnull != child)) {
result = child->ReResolveStyleContext(aPresContext, mStyleContext);
child->GetNextSibling(child);
}
// Update overflow list too
child = mOverflowList;
while ((NS_SUCCEEDED(result)) && (nsnull != child)) {
result = child->ReResolveStyleContext(aPresContext, mStyleContext);
child->GetNextSibling(child);
}
// And just to be complete, update our prev-in-flows overflow list
// too (since in theory, those frames will become our frames)
if (nsnull != mPrevInFlow) {
child = ((nsContainerFrame*)mPrevInFlow)->mOverflowList;
while ((NS_SUCCEEDED(result)) && (nsnull != child)) {
result = child->ReResolveStyleContext(aPresContext, mStyleContext);
child->GetNextSibling(child);
}
}
}
return result;
}

View File

@ -195,11 +195,29 @@ nsContainerFrame::ReResolveStyleContext(nsIPresContext* aPresContext,
nsIStyleContext* oldContext = mStyleContext;
nsresult result = nsFrame::ReResolveStyleContext(aPresContext, aParentContext);
if (oldContext != mStyleContext) {
// Update primary child list
nsIFrame* child = mFirstChild;
while ((NS_SUCCEEDED(result)) && (nsnull != child)) {
result = child->ReResolveStyleContext(aPresContext, mStyleContext);
child->GetNextSibling(child);
}
// Update overflow list too
child = mOverflowList;
while ((NS_SUCCEEDED(result)) && (nsnull != child)) {
result = child->ReResolveStyleContext(aPresContext, mStyleContext);
child->GetNextSibling(child);
}
// And just to be complete, update our prev-in-flows overflow list
// too (since in theory, those frames will become our frames)
if (nsnull != mPrevInFlow) {
child = ((nsContainerFrame*)mPrevInFlow)->mOverflowList;
while ((NS_SUCCEEDED(result)) && (nsnull != child)) {
result = child->ReResolveStyleContext(aPresContext, mStyleContext);
child->GetNextSibling(child);
}
}
}
return result;
}