Eliminated some code that's no longer needed now that the info is in the
HTML reflow state git-svn-id: svn://10.0.0.236/trunk@23029 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user