removed ReResolveStyleContext

git-svn-id: svn://10.0.0.236/trunk@48553 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
peterl%netscape.com
1999-09-21 07:56:18 +00:00
parent ee1768fef6
commit 4e42b2772d
28 changed files with 35 additions and 1078 deletions

View File

@@ -141,73 +141,6 @@ nsContainerFrame::FirstChild(nsIAtom* aListName, nsIFrame** aFirstChild) const
}
}
/////////////////////////////////////////////////////////////////////////////
// Style support
NS_IMETHODIMP
nsContainerFrame::ReResolveStyleContext(nsIPresContext* aPresContext,
nsIStyleContext* aParentContext,
PRInt32 aParentChange,
nsStyleChangeList* aChangeList,
PRInt32* aLocalChange)
{
PRInt32 ourChange = aParentChange;
nsresult result = nsFrame::ReResolveStyleContext(aPresContext, aParentContext,
ourChange, aChangeList, &ourChange);
if (NS_FAILED(result)) {
return result;
}
if (aLocalChange) {
*aLocalChange = ourChange;
}
if (NS_COMFALSE != result) {
// Update all children since our context changed
PRInt32 listIndex = 0;
nsIAtom* childList = nsnull;
PRInt32 childChange;
nsIFrame* child;
do {
child = nsnull;
result = FirstChild(childList, &child);
while ((NS_SUCCEEDED(result)) && (child)) {
result = child->ReResolveStyleContext(aPresContext, mStyleContext,
ourChange, aChangeList, &childChange);
child->GetNextSibling(&child);
}
NS_IF_RELEASE(childList);
GetAdditionalChildListName(listIndex++, &childList);
} while (childList);
// Update overflow list too (XXX this is not just another child list?)
child = mOverflowFrames.FirstChild();
while ((NS_SUCCEEDED(result)) && (nsnull != child)) {
result = child->ReResolveStyleContext(aPresContext, mStyleContext,
ourChange, aChangeList, &childChange);
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)
// XXX Eeek, this is potentially re-resolving these frames twice, can this be optimized?
// Better yet, this should just go away, overflow push/pull code should re-resolve
// as needed for parent changes
if (nsnull != mPrevInFlow) {
child = ((nsContainerFrame*)mPrevInFlow)->mOverflowFrames.FirstChild();
while ((NS_SUCCEEDED(result)) && (nsnull != child)) {
result = child->ReResolveStyleContext(aPresContext, mStyleContext,
ourChange, aChangeList, &childChange);
child->GetNextSibling(&child);
}
}
}
return result;
}
/////////////////////////////////////////////////////////////////////////////
// Painting/Events