зеркало из https://github.com/mozilla/gecko-dev.git
Eliminated some code that's no longer needed now that the info is in the
HTML reflow state
This commit is contained in:
Родитель
9808f6e277
Коммит
6247024d47
|
@ -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();
|
||||
|
|
Загрузка…
Ссылка в новой задаче