diff --git a/layout/generic/nsAbsoluteContainingBlock.cpp b/layout/generic/nsAbsoluteContainingBlock.cpp index 12dc5f7c640..12da2a798db 100644 --- a/layout/generic/nsAbsoluteContainingBlock.cpp +++ b/layout/generic/nsAbsoluteContainingBlock.cpp @@ -424,7 +424,10 @@ nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIFrame* aDelegat // anything totally below the fold, but we can't position frames // across next-in-flow breaks yet. if (constrainHeight) { - kidReflowState.availableHeight = aReflowState.availableHeight - aKidFrame->GetRect().y; + kidReflowState.availableHeight = aReflowState.availableHeight - border.top + - kidReflowState.mComputedMargin.top; + if (NS_AUTOOFFSET != kidReflowState.mComputedOffsets.top) + kidReflowState.availableHeight -= kidReflowState.mComputedOffsets.top; } // Do the reflow diff --git a/layout/reftests/pagination/reftest.list b/layout/reftests/pagination/reftest.list index f26a584c943..845b8241b8f 100644 --- a/layout/reftests/pagination/reftest.list +++ b/layout/reftests/pagination/reftest.list @@ -20,3 +20,6 @@ == content-inserted-007.xhtml content-inserted-002.ref.xhtml == content-inserted-008.xhtml content-inserted-001.ref.xhtml == content-inserted-009.xhtml content-inserted-002.ref.xhtml +== abspos-breaking-000.xhtml abspos-breaking-000.ref.xhtml +== abspos-breaking-001.xhtml abspos-breaking-000.ref.xhtml +== abspos-breaking-002.xhtml abspos-breaking-000.ref.xhtml diff --git a/layout/reftests/reftests/pagination/abspos-breaking-000.ref.xhtml b/layout/reftests/reftests/pagination/abspos-breaking-000.ref.xhtml new file mode 100644 index 00000000000..ec530e4758e --- /dev/null +++ b/layout/reftests/reftests/pagination/abspos-breaking-000.ref.xhtml @@ -0,0 +1,40 @@ + + + + AbsPos Pagination + + + +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+ + diff --git a/layout/reftests/reftests/pagination/abspos-breaking-000.xhtml b/layout/reftests/reftests/pagination/abspos-breaking-000.xhtml new file mode 100644 index 00000000000..183752eb200 --- /dev/null +++ b/layout/reftests/reftests/pagination/abspos-breaking-000.xhtml @@ -0,0 +1,41 @@ + + + + AbsPos Pagination + + + +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+ + diff --git a/layout/reftests/reftests/pagination/abspos-breaking-001.xhtml b/layout/reftests/reftests/pagination/abspos-breaking-001.xhtml new file mode 100644 index 00000000000..d2c6b42191b --- /dev/null +++ b/layout/reftests/reftests/pagination/abspos-breaking-001.xhtml @@ -0,0 +1,42 @@ + + + + AbsPos Pagination + + + +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+ + diff --git a/layout/reftests/reftests/pagination/abspos-breaking-002.xhtml b/layout/reftests/reftests/pagination/abspos-breaking-002.xhtml new file mode 100644 index 00000000000..e209dfd02ba --- /dev/null +++ b/layout/reftests/reftests/pagination/abspos-breaking-002.xhtml @@ -0,0 +1,43 @@ + + + + AbsPos Pagination + + + +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+ +