Fix handling of 'right'-derived static positions (mostly for RTL) when containing block has asymmetric border. b=419072 r+sr=roc a=damons

This commit is contained in:
dbaron@dbaron.org 2008-02-25 13:16:21 -08:00
Родитель 73d97bb25f
Коммит 764fb20bfe
2 изменённых файлов: 6 добавлений и 4 удалений

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

@ -733,7 +733,9 @@ nsHTMLReflowState::GetNearestContainingBlock(nsIFrame* aFrame, nscoord& aCBLeftE
// In that case depending on the progression direction either the left or
// right edge would be marked as not being exact
struct nsHypotheticalBox {
// offsets from left edge of containing block (which is a padding edge)
nscoord mLeft, mRight;
// offset from top edge of containing block (which is a padding edge)
nscoord mTop;
PRPackedBool mLeftIsExact, mRightIsExact;
@ -911,7 +913,7 @@ nsHTMLReflowState::CalculateHypotheticalBox(nsPresContext* aPresContext,
} else {
// We need to compute it. It's important we do this, because if it's
// percentage based this computed value may be different from the comnputed
// percentage based this computed value may be different from the computed
// value calculated using the absolute containing block width
boxWidth = ComputeWidthValue(aBlockContentWidth,
insideBoxSizing, outsideBoxSizing,
@ -1065,7 +1067,7 @@ nsHTMLReflowState::CalculateHypotheticalBox(nsPresContext* aPresContext,
// translate.
nsMargin border = cbrs->mComputedBorderPadding - cbrs->mComputedPadding;
aHypotheticalBox.mLeft -= border.left;
aHypotheticalBox.mRight -= border.right;
aHypotheticalBox.mRight -= border.left;
aHypotheticalBox.mTop -= border.top;
}

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

@ -16,5 +16,5 @@
== box-sizing-2.html box-sizing-2-ref.html
== box-sizing-3.html box-sizing-1-ref.html
== box-sizing-4.html box-sizing-4-ref.html
fails == abspos-non-replaced-width-offset-margin.html abspos-non-replaced-width-offset-margin-ref.html # bug 419072
fails == abspos-replaced-width-offset-margin.html abspos-replaced-width-offset-margin-ref.html # bug 419072
== abspos-non-replaced-width-offset-margin.html abspos-non-replaced-width-offset-margin-ref.html
== abspos-replaced-width-offset-margin.html abspos-replaced-width-offset-margin-ref.html