b=22677. Fix for the part of the bug where the second table taht is relatively

positioned flashes when the window is resized


git-svn-id: svn://10.0.0.236/trunk@58724 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
troy%netscape.com
2000-01-26 03:44:36 +00:00
parent a0ae4abc82
commit ec50403f3b
2 changed files with 20 additions and 8 deletions

View File

@@ -354,19 +354,25 @@ nsBlockReflowContext::ReflowBlock(nsIFrame* aFrame,
aFrame->GetSize(size);
align.mXOffset = x;
AlignBlockHorizontally(size.width, align);
// XXX Don't reset "mX". because PlaceBlock() will recompute the
// Don't reset "mX". because PlaceBlock() will recompute the
// x-offset and expects "mX" to be at the left margin edge
x = align.mXOffset;
}
}
// If the element is relatively positioned, then adjust x and y accordingly
if (NS_STYLE_POSITION_RELATIVE == reflowState.mStylePosition->mPosition) {
x += reflowState.mComputedOffsets.left;
y += reflowState.mComputedOffsets.top;
}
// Let frame know that we are reflowing it
aFrame->WillReflow(mPresContext);
// Position it and its view (if it has one)
// Note: Use "x" and not "mX". "x" more accurately represents where we think
// it will be placed
aFrame->MoveTo(mPresContext, x, mY);
// Note: Use "x" and "y" and not "mX" and "mY" because they more accurately
// represents where we think the block will be placed
aFrame->MoveTo(mPresContext, x, y);
nsIView* view;
aFrame->GetView(mPresContext, &view);
if (view) {

View File

@@ -354,19 +354,25 @@ nsBlockReflowContext::ReflowBlock(nsIFrame* aFrame,
aFrame->GetSize(size);
align.mXOffset = x;
AlignBlockHorizontally(size.width, align);
// XXX Don't reset "mX". because PlaceBlock() will recompute the
// Don't reset "mX". because PlaceBlock() will recompute the
// x-offset and expects "mX" to be at the left margin edge
x = align.mXOffset;
}
}
// If the element is relatively positioned, then adjust x and y accordingly
if (NS_STYLE_POSITION_RELATIVE == reflowState.mStylePosition->mPosition) {
x += reflowState.mComputedOffsets.left;
y += reflowState.mComputedOffsets.top;
}
// Let frame know that we are reflowing it
aFrame->WillReflow(mPresContext);
// Position it and its view (if it has one)
// Note: Use "x" and not "mX". "x" more accurately represents where we think
// it will be placed
aFrame->MoveTo(mPresContext, x, mY);
// Note: Use "x" and "y" and not "mX" and "mY" because they more accurately
// represents where we think the block will be placed
aFrame->MoveTo(mPresContext, x, y);
nsIView* view;
aFrame->GetView(mPresContext, &view);
if (view) {