Added code to force an absolutely positioned child that ignored its

computed height to be the correct height
This commit is contained in:
troy%netscape.com 1999-01-30 18:12:38 +00:00
Родитель 5cd1cbadbf
Коммит 051df63e8f
2 изменённых файлов: 22 добавлений и 0 удалений

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

@ -641,6 +641,17 @@ nsAreaFrame::ReflowAbsoluteFrame(nsIPresContext& aPresContext,
kidReflowState.availableWidth = kidReflowState.computedWidth;
rv = htmlReflow->Reflow(aPresContext, kidDesiredSize, kidReflowState, aStatus);
// XXX If the child had a fixed height, then make sure it respected it...
if (NS_AUTOHEIGHT != kidReflowState.computedHeight) {
if (kidDesiredSize.height < kidReflowState.computedHeight) {
kidDesiredSize.height = kidReflowState.computedHeight;
nsMargin borderPadding;
nsHTMLReflowState::ComputeBorderPaddingFor(aKidFrame, &aReflowState, borderPadding);
kidDesiredSize.height += borderPadding.top + borderPadding.bottom;
}
}
// Position the child relative to our padding edge
nsRect rect(border.left + kidReflowState.computedOffsets.left + kidReflowState.computedMargin.left,
border.top + kidReflowState.computedOffsets.top + kidReflowState.computedMargin.top,

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

@ -641,6 +641,17 @@ nsAreaFrame::ReflowAbsoluteFrame(nsIPresContext& aPresContext,
kidReflowState.availableWidth = kidReflowState.computedWidth;
rv = htmlReflow->Reflow(aPresContext, kidDesiredSize, kidReflowState, aStatus);
// XXX If the child had a fixed height, then make sure it respected it...
if (NS_AUTOHEIGHT != kidReflowState.computedHeight) {
if (kidDesiredSize.height < kidReflowState.computedHeight) {
kidDesiredSize.height = kidReflowState.computedHeight;
nsMargin borderPadding;
nsHTMLReflowState::ComputeBorderPaddingFor(aKidFrame, &aReflowState, borderPadding);
kidDesiredSize.height += borderPadding.top + borderPadding.bottom;
}
}
// Position the child relative to our padding edge
nsRect rect(border.left + kidReflowState.computedOffsets.left + kidReflowState.computedMargin.left,
border.top + kidReflowState.computedOffsets.top + kidReflowState.computedMargin.top,