Bug 129115. Change the reflow path from a list structure to a tree structure to amortize state recovery and damage propagation costs. Eliminate table timeout reflows. r=kin,karnaze,rods,rbs; sr=attinasi

This commit is contained in:
waterson@netscape.com
2002-05-10 18:22:41 +00:00
parent aa170af5eb
commit a7380946d3
99 changed files with 3075 additions and 2868 deletions

View File

@@ -579,37 +579,31 @@ nsHTMLButtonControlFrame::Reflow(nsIPresContext* aPresContext,
availSize.height = PR_MAX(availSize.height,0);
}
nsHTMLReflowState reflowState(aPresContext, aReflowState, firstKid, availSize);
// XXX Proper handling of incremental reflow...
nsReflowReason reason = aReflowState.reason;
if (eReflowReason_Incremental == reason) {
// See if it's targeted at us
nsHTMLReflowCommand *command = aReflowState.path->mReflowCommand;
if (command) {
Invalidate(aPresContext, nsRect(0,0,mRect.width,mRect.height), PR_FALSE);
nsReflowType reflowType;
command->GetType(reflowType);
if (eReflowType_StyleChanged == reflowType) {
reason = eReflowReason_StyleChange;
}
else {
reason = eReflowReason_Resize;
}
}
}
nsHTMLReflowState reflowState(aPresContext, aReflowState, firstKid, availSize, reason);
//reflowState.computedWidth = availSize;
// XXX remove the following when the reflow state is fixed
//ButtonHack(reflowState, "html4 button's area");
// XXX Proper handling of incremental reflow...
if (eReflowReason_Incremental == aReflowState.reason) {
nsIFrame* targetFrame;
// See if it's targeted at us
aReflowState.reflowCommand->GetTarget(targetFrame);
if (this == targetFrame) {
Invalidate(aPresContext, nsRect(0,0,mRect.width,mRect.height), PR_FALSE);
nsReflowType reflowType;
aReflowState.reflowCommand->GetType(reflowType);
if (eReflowType_StyleChanged == reflowType) {
reflowState.reason = eReflowReason_StyleChange;
}
else {
reflowState.reason = eReflowReason_Resize;
}
} else {
nsIFrame* nextFrame;
// Remove the next frame from the reflow path
aReflowState.reflowCommand->GetNext(nextFrame);
}
}
ReflowChild(firstKid, aPresContext, aDesiredSize, reflowState,
focusPadding.left + aReflowState.mComputedBorderPadding.left,
focusPadding.top + aReflowState.mComputedBorderPadding.top,