Bug 294934. Absolute positioning should be relative to the padding edge, so we need to set the absolute containing block size to the size of the padding-box of any wrapper frame. r+sr=dbaron,a=bsmedberg

This commit is contained in:
roc+%cs.cmu.edu 2005-07-19 22:06:39 +00:00
Родитель 802e2cda75
Коммит 94a5d4ca9d
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -605,13 +605,17 @@ CalculateContainingBlockSizeForAbsolutes(const nsHTMLReflowState& aReflowState,
aLastRS = aLastRS->parentReflowState;
}
if (aLastRS != &aReflowState) {
// The wrapper frame should be block-level. If it isn't, how the
// heck did it end up wrapping this block frame?
NS_ASSERTION(aLastRS->frame->GetStyleDisplay()->IsBlockLevel(),
"Wrapping frame should be block-level");
// We found a reflow state for the outermost wrapping frame, so use
// its computed metrics if available
if (aLastRS->mComputedWidth != NS_UNCONSTRAINEDSIZE) {
cbSize.width = aLastRS->mComputedWidth;
cbSize.width = aLastRS->mComputedWidth + aLastRS->mComputedPadding.LeftRight();
}
if (aLastRS->mComputedHeight != NS_UNCONSTRAINEDSIZE) {
cbSize.height = aLastRS->mComputedHeight;
cbSize.height = aLastRS->mComputedHeight + aLastRS->mComputedPadding.TopBottom();
}
}
}