1
1
mirror of https://github.com/Kozea/WeasyPrint.git synced 2024-10-03 23:48:07 +03:00

Merge branch '62.x'

This commit is contained in:
Guillaume Ayoub 2024-06-11 16:12:05 +02:00
commit 8f57a3f428
2 changed files with 53 additions and 0 deletions

View File

@ -123,6 +123,57 @@ def test_footnote_margin(assert_pixels):
<div>abc<span>d</span></div>''')
@assert_no_logs
def test_footnote_multiple_margin(assert_pixels):
assert_pixels('''
RRRR___
RRRR___
RRRR___
RRRR___
RRRR___
RRRR___
RRRRRR_
RRRRRR_
_______
_______
RRRR___
RRRR___
_______
_______
_______
_______
RRRRRR_
RRRRRR_
RRRRRR_
RRRRRR_
''', '''
<style>
@font-face {src: url(weasyprint.otf); font-family: weasyprint}
@page {
size: 7px 10px;
@footnote {
margin-top: 1px;
}
}
div {
color: red;
font-family: weasyprint;
font-size: 2px;
line-height: 1;
}
span {
float: footnote;
}
</style>
<div>ab</div>
<div>ab</div>
<div>ab</div>
<div>a<span>d</span><span>e</span></div>
<div>ab</div>''')
@assert_no_logs
def test_footnote_with_absolute(assert_pixels):
assert_pixels('''

View File

@ -379,4 +379,6 @@ class LayoutContext:
return overflow
else:
self.current_footnote_area.height = 0
if not self.in_column:
self.page_bottom -= self.current_footnote_area.margin_height()
return False