diff --git a/tests/draw/test_transform.py b/tests/draw/test_transform.py index 5b908a60c..c8c9ee54a 100644 --- a/tests/draw/test_transform.py +++ b/tests/draw/test_transform.py @@ -285,3 +285,25 @@ def test_2d_transform_13(assert_pixels): font-size: 0 }
''') + + +@assert_no_logs +def test_2d_transform_opacity(assert_pixels): + assert_pixels(''' + __________ + __________ + __________ + _ss_______ + _ss_______ + __________ + __________ + __________ + __________ + __________ + ''', ''' + + ''') diff --git a/weasyprint/draw.py b/weasyprint/draw.py index 32fd21946..692dcb970 100644 --- a/weasyprint/draw.py +++ b/weasyprint/draw.py @@ -108,10 +108,7 @@ def draw_stacking_context(stream, stacking_context): if box.style['opacity'] < 1: original_stream = stream - stream = stream.add_group([ - box.border_box_x(), box.border_box_y(), - box.border_box_x() + box.border_width(), - box.border_box_y() + box.border_height()]) + stream = stream.add_group(stream.page_rectangle) if box.transformation_matrix: if box.transformation_matrix.determinant: