зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
d13957f1b8
Коммит
5cd1cbadbf
|
@ -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,
|
||||
|
|
Загрузка…
Ссылка в новой задаче