From 3fdd3c51623eea7c9b35069b5100e65e4c7fdc08 Mon Sep 17 00:00:00 2001 From: Guillaume Ayoub Date: Fri, 25 Aug 2023 21:55:19 +0200 Subject: [PATCH] =?UTF-8?q?Use=20bleed=20area=20for=20page=E2=80=99s=20pai?= =?UTF-8?q?nting=20area?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also use border box for canvas. Fix #1943. --- tests/draw/test_background.py | 13 ++++++------ weasyprint/draw.py | 25 +++++------------------- weasyprint/formatting_structure/boxes.py | 13 ++++++++++++ weasyprint/layout/background.py | 12 +++++++----- 4 files changed, 32 insertions(+), 31 deletions(-) diff --git a/tests/draw/test_background.py b/tests/draw/test_background.py index 4383005b49..6e2614f285 100644 --- a/tests/draw/test_background.py +++ b/tests/draw/test_background.py @@ -1054,13 +1054,14 @@ def test_background_size_clip(assert_pixels): @assert_no_logs def test_bleed_background_size_clip(assert_pixels): + # Regression test for https://github.com/Kozea/WeasyPrint/issues/1943 assert_pixels(''' - RRRRRR - RBBBBR - RBRBBR - RBBBBR - RBBBBR - RRRRRR + BBBBBB + BBBBBB + BBRBBB + BBBBBB + BBBBBB + BBBBBB ''', '''