Use revised API's for computing the border/padding

This commit is contained in:
kipp%netscape.com 1998-11-20 17:20:29 +00:00
Родитель 79dd1e596d
Коммит c9013931ab
2 изменённых файлов: 4 добавлений и 6 удалений

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

@ -180,10 +180,9 @@ RootFrame::Reflow(nsIPresContext& aPresContext,
// Reflow our child frame // Reflow our child frame
if (nsnull != mFirstChild) { if (nsnull != mFirstChild) {
// Compute how much space to reserve for our border and padding // Compute how much space to reserve for our border and padding
const nsStyleSpacing* spacing =
(const nsStyleSpacing*)mStyleContext->GetStyleData(eStyleStruct_Spacing);
nsMargin borderPadding; nsMargin borderPadding;
spacing->CalcBorderPaddingFor(this, borderPadding); nsHTMLReflowState::ComputeBorderPaddingFor(this, nsnull,
borderPadding);
nsSize kidMaxSize(reflowState.maxSize); nsSize kidMaxSize(reflowState.maxSize);
kidMaxSize.width -= borderPadding.left + borderPadding.right; kidMaxSize.width -= borderPadding.left + borderPadding.right;

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

@ -180,10 +180,9 @@ RootFrame::Reflow(nsIPresContext& aPresContext,
// Reflow our child frame // Reflow our child frame
if (nsnull != mFirstChild) { if (nsnull != mFirstChild) {
// Compute how much space to reserve for our border and padding // Compute how much space to reserve for our border and padding
const nsStyleSpacing* spacing =
(const nsStyleSpacing*)mStyleContext->GetStyleData(eStyleStruct_Spacing);
nsMargin borderPadding; nsMargin borderPadding;
spacing->CalcBorderPaddingFor(this, borderPadding); nsHTMLReflowState::ComputeBorderPaddingFor(this, nsnull,
borderPadding);
nsSize kidMaxSize(reflowState.maxSize); nsSize kidMaxSize(reflowState.maxSize);
kidMaxSize.width -= borderPadding.left + borderPadding.right; kidMaxSize.width -= borderPadding.left + borderPadding.right;