@@ -113,7 +113,7 @@ def draw_stacking_context(stream, stacking_context):
113
113
# Point 2
114
114
if isinstance (box , (boxes .BlockBox , boxes .MarginBox ,
115
115
boxes .InlineBlockBox , boxes .TableCellBox ,
116
- boxes .FlexContainerBox )):
116
+ boxes .FlexContainerBox , boxes . ReplacedBox )):
117
117
# The canvas background was removed by layout_backgrounds
118
118
draw_background (stream , box .background )
119
119
draw_border (stream , box )
@@ -148,14 +148,12 @@ def draw_stacking_context(stream, stacking_context):
148
148
# Point 6
149
149
if isinstance (box , boxes .InlineBox ):
150
150
draw_inline_level (stream , stacking_context .page , box )
151
+ elif isinstance (box , boxes .ReplacedBox ):
152
+ draw_replacedbox (stream , box )
151
153
152
154
# Point 7
153
155
for block in [box ] + stacking_context .blocks_and_cells :
154
- if isinstance (block , boxes .ReplacedBox ):
155
- draw_background (stream , block .background )
156
- draw_border (stream , block )
157
- draw_replacedbox (stream , block )
158
- elif block .children :
156
+ if block .children :
159
157
if block != box :
160
158
stream .begin_marked_content (block , mcid = True )
161
159
if isinstance (block .children [- 1 ], boxes .LineBox ):
@@ -983,9 +981,6 @@ def draw_replacedbox(stream, box):
983
981
return
984
982
985
983
with stacked (stream ):
986
- rounded_box_path (stream , box .rounded_content_box ())
987
- stream .clip ()
988
- stream .end ()
989
984
stream .transform (e = draw_x , f = draw_y )
990
985
with stacked (stream ):
991
986
# TODO: Use the real intrinsic size here, not affected by
0 commit comments