Added code to make sure that a fixed child frame ends up with the correct height

evebn if it disregards the computed height value
This commit is contained in:
troy%netscape.com 1999-01-30 17:39:29 +00:00
Родитель d13957f1b8
Коммит 5cd1cbadbf
2 изменённых файлов: 22 добавлений и 0 удалений

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

@ -167,6 +167,17 @@ ViewportFrame::ReflowFixedFrame(nsIPresContext& aPresContext,
kidReflowState.availableWidth = kidReflowState.computedWidth;
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
nsRect rect(kidReflowState.computedOffsets.left,
kidReflowState.computedOffsets.top,

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

@ -167,6 +167,17 @@ ViewportFrame::ReflowFixedFrame(nsIPresContext& aPresContext,
kidReflowState.availableWidth = kidReflowState.computedWidth;
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
nsRect rect(kidReflowState.computedOffsets.left,
kidReflowState.computedOffsets.top,