Slight performance improvement
git-svn-id: svn://10.0.0.236/trunk@66855 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
bfc3003957
commit
ec619780c1
@ -449,10 +449,23 @@ nsBlockReflowContext::ReflowBlock(nsIFrame* aFrame,
|
||||
// width
|
||||
reflowState.availableWidth = oldAvailableWidth;
|
||||
reflowState.mComputedWidth = oldComputedWidth;
|
||||
reason = eReflowReason_Resize;
|
||||
|
||||
// We don't need to do this second reflow if we're being reflowed
|
||||
// with an unconstrained reflow
|
||||
if (NS_UNCONSTRAINEDSIZE != reflowState.availableWidth) {
|
||||
reason = eReflowReason_Resize;
|
||||
// Don't bother having the frame compute its max-element-size again
|
||||
nsSize* oldMaxElementSize = mMetrics.maxElementSize;
|
||||
mMetrics.maxElementSize = nsnull;
|
||||
rv = aFrame->Reflow(mPresContext, mMetrics, reflowState,
|
||||
aFrameReflowStatus);
|
||||
mMetrics.maxElementSize = oldMaxElementSize;
|
||||
}
|
||||
|
||||
} else {
|
||||
rv = aFrame->Reflow(mPresContext, mMetrics, reflowState,
|
||||
aFrameReflowStatus);
|
||||
}
|
||||
rv = aFrame->Reflow(mPresContext, mMetrics, reflowState,
|
||||
aFrameReflowStatus);
|
||||
mOuterReflowState.mSpaceManager->Translate(-tx, -ty);
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
@ -449,10 +449,23 @@ nsBlockReflowContext::ReflowBlock(nsIFrame* aFrame,
|
||||
// width
|
||||
reflowState.availableWidth = oldAvailableWidth;
|
||||
reflowState.mComputedWidth = oldComputedWidth;
|
||||
reason = eReflowReason_Resize;
|
||||
|
||||
// We don't need to do this second reflow if we're being reflowed
|
||||
// with an unconstrained reflow
|
||||
if (NS_UNCONSTRAINEDSIZE != reflowState.availableWidth) {
|
||||
reason = eReflowReason_Resize;
|
||||
// Don't bother having the frame compute its max-element-size again
|
||||
nsSize* oldMaxElementSize = mMetrics.maxElementSize;
|
||||
mMetrics.maxElementSize = nsnull;
|
||||
rv = aFrame->Reflow(mPresContext, mMetrics, reflowState,
|
||||
aFrameReflowStatus);
|
||||
mMetrics.maxElementSize = oldMaxElementSize;
|
||||
}
|
||||
|
||||
} else {
|
||||
rv = aFrame->Reflow(mPresContext, mMetrics, reflowState,
|
||||
aFrameReflowStatus);
|
||||
}
|
||||
rv = aFrame->Reflow(mPresContext, mMetrics, reflowState,
|
||||
aFrameReflowStatus);
|
||||
mOuterReflowState.mSpaceManager->Translate(-tx, -ty);
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user