From 82deda412ec706570ffdb868b8031db9e6fc4757 Mon Sep 17 00:00:00 2001 From: Guillaume Ayoub Date: Thu, 23 May 2024 19:22:26 +0200 Subject: [PATCH] Fix wrong resume_at for split floats --- tests/draw/test_float.py | 1 - weasyprint/layout/block.py | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/draw/test_float.py b/tests/draw/test_float.py index 2d0519abd..04373095a 100644 --- a/tests/draw/test_float.py +++ b/tests/draw/test_float.py @@ -623,7 +623,6 @@ def test_float_split_9(assert_pixels):
bbbbb bb
''') -@pytest.mark.xfail @assert_no_logs def test_float_split_10(assert_pixels): assert_pixels(''' diff --git a/weasyprint/layout/block.py b/weasyprint/layout/block.py index 8a993cd52..2c352ef00 100644 --- a/weasyprint/layout/block.py +++ b/weasyprint/layout/block.py @@ -275,6 +275,7 @@ def _out_of_flow_layout(context, box, index, child, new_children, last_in_flow_child = find_last_in_flow_child(new_children) page_break = block_level_page_break(last_in_flow_child, child) resume_at = {index: None} + out_of_flow_resume_at = None stop = True if new_children and avoid_page_break(page_break, context): # 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, if result: # Earlier page break found, drop whole child rendering. new_children[:], resume_at = result - new_child = out_of_flow_resume_at = None + new_child = None # Running element layout. elif child.is_running():