Eliminated some code that's no longer needed now that the info is in the

HTML reflow state
This commit is contained in:
troy%netscape.com 1999-03-06 01:48:28 +00:00
Родитель 9808f6e277
Коммит 6247024d47
4 изменённых файлов: 6 добавлений и 24 удалений

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

@ -572,11 +572,7 @@ nsButtonFrameRenderer::AddFocusBordersAndPadding(nsIPresContext& aPresContext,
nsHTMLReflowMetrics& aMetrics,
nsMargin& aBorderPadding)
{
nsHTMLReflowState::ComputeBorderPaddingFor(mFrame,
aReflowState.parentReflowState,
aBorderPadding);
aBorderPadding = aReflowState.mComputedBorderPadding;
aBorderPadding += GetButtonOuterFocusBorderAndPadding();
aBorderPadding += GetButtonInnerFocusMargin();

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

@ -225,19 +225,14 @@ ViewportFrame::ReflowFixedFrame(nsIPresContext& aPresContext,
kidReflowState.reason = eReflowReason_Initial;
}
// XXX Temporary hack until the block/inline code starts using 'computedWidth'
nsMargin kidBorderPadding;
nsHTMLReflowState::ComputeBorderPaddingFor(aKidFrame, &aReflowState, kidBorderPadding);
kidReflowState.availableWidth = kidReflowState.computedWidth +
kidBorderPadding.left + kidBorderPadding.right;
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;
kidDesiredSize.height += kidBorderPadding.top + kidBorderPadding.bottom;
kidDesiredSize.height += kidReflowState.mComputedBorderPadding.top +
kidReflowState.mComputedBorderPadding.bottom;
}
}

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

@ -225,19 +225,14 @@ ViewportFrame::ReflowFixedFrame(nsIPresContext& aPresContext,
kidReflowState.reason = eReflowReason_Initial;
}
// XXX Temporary hack until the block/inline code starts using 'computedWidth'
nsMargin kidBorderPadding;
nsHTMLReflowState::ComputeBorderPaddingFor(aKidFrame, &aReflowState, kidBorderPadding);
kidReflowState.availableWidth = kidReflowState.computedWidth +
kidBorderPadding.left + kidBorderPadding.right;
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;
kidDesiredSize.height += kidBorderPadding.top + kidBorderPadding.bottom;
kidDesiredSize.height += kidReflowState.mComputedBorderPadding.top +
kidReflowState.mComputedBorderPadding.bottom;
}
}

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

@ -572,11 +572,7 @@ nsButtonFrameRenderer::AddFocusBordersAndPadding(nsIPresContext& aPresContext,
nsHTMLReflowMetrics& aMetrics,
nsMargin& aBorderPadding)
{
nsHTMLReflowState::ComputeBorderPaddingFor(mFrame,
aReflowState.parentReflowState,
aBorderPadding);
aBorderPadding = aReflowState.mComputedBorderPadding;
aBorderPadding += GetButtonOuterFocusBorderAndPadding();
aBorderPadding += GetButtonInnerFocusMargin();