зеркало из https://github.com/mozilla/gecko-dev.git
Use revised API's for computing the border/padding
This commit is contained in:
Родитель
79dd1e596d
Коммит
c9013931ab
|
@ -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;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче