mirror of
https://github.com/Kozea/WeasyPrint.git
synced 2024-10-05 00:21:15 +03:00
Merge branch 'master' of github.com:Kozea/WeasyPrint
This commit is contained in:
commit
3af0d73be2
@ -647,6 +647,11 @@ def block_container_layout(context, box, max_position_y, skip_stack,
|
||||
# http://www.w3.org/TR/CSS21/visudet.html#normal-block
|
||||
# TODO: See float.float_layout
|
||||
if new_box.height == 'auto':
|
||||
if context.excluded_shapes and new_box.style['overflow'] != 'visible':
|
||||
max_float_position_y = max(
|
||||
float_box.position_y + float_box.margin_height()
|
||||
for float_box in context.excluded_shapes)
|
||||
position_y = max(max_float_position_y, position_y)
|
||||
new_box.height = position_y - new_box.content_box_y()
|
||||
|
||||
if new_box.style['position'] == 'relative':
|
||||
|
@ -705,3 +705,15 @@ def test_box_decoration_break_slice_bottom_padding():
|
||||
assert article.height == 20
|
||||
div, = article.children
|
||||
assert div.position_y == 0
|
||||
|
||||
|
||||
@assert_no_logs
|
||||
def test_overflow_auto():
|
||||
page, = parse('''
|
||||
<article style="overflow: auto">
|
||||
<div style="float: left; height: 50px; margin: 10px">bla bla bla</div>
|
||||
toto toto''')
|
||||
html, = page.children
|
||||
body, = html.children
|
||||
article, = body.children
|
||||
assert article.height == 50 + 10 + 10
|
||||
|
Loading…
Reference in New Issue
Block a user