Skip to content

Commit 82deda4

Browse files
committed
Fix wrong resume_at for split floats
1 parent e6625ed commit 82deda4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/draw/test_float.py

-1
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,6 @@ def test_float_split_9(assert_pixels):
623623
<div>bbbbb bb</div>''')
624624

625625

626-
@pytest.mark.xfail
627626
@assert_no_logs
628627
def test_float_split_10(assert_pixels):
629628
assert_pixels('''

weasyprint/layout/block.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ def _out_of_flow_layout(context, box, index, child, new_children,
275275
last_in_flow_child = find_last_in_flow_child(new_children)
276276
page_break = block_level_page_break(last_in_flow_child, child)
277277
resume_at = {index: None}
278+
out_of_flow_resume_at = None
278279
stop = True
279280
if new_children and avoid_page_break(page_break, context):
280281
# Can’t break inside float, find an earlier page break.
@@ -283,7 +284,7 @@ def _out_of_flow_layout(context, box, index, child, new_children,
283284
if result:
284285
# Earlier page break found, drop whole child rendering.
285286
new_children[:], resume_at = result
286-
new_child = out_of_flow_resume_at = None
287+
new_child = None
287288

288289
# Running element layout.
289290
elif child.is_running():

0 commit comments

Comments
 (0)