Skip to content
Permalink
Browse files

Don't include floating elements each time we try to render a column

  • Loading branch information...
liZe committed Sep 6, 2019
1 parent 789b80e commit 615e298adec0bf68ea95d229d90044c46fca4b38
Showing with 8 additions and 0 deletions.
  1. +8 −0 weasyprint/layout/columns.py
@@ -133,6 +133,8 @@ def create_column_box(children):
adjoining_margins.append(new_child.margin_bottom)
continue

excluded_shapes = context.excluded_shapes[:]

# We have a list of children that we have to balance between columns.
column_children = column_children_or_block

@@ -152,6 +154,12 @@ def create_column_box(children):
column_skip_stack = skip_stack
lost_space = float('inf')
while True:
# Remove extra excluded shapes introduced during previous loop
new_excluded_shapes = (
len(context.excluded_shapes) - len(excluded_shapes))
for i in range(new_excluded_shapes):
context.excluded_shapes.pop()

for i in range(count):
# Render the column
new_box, resume_at, next_page, _, _ = block_box_layout(

0 comments on commit 615e298

Please sign in to comment.
You can’t perform that action at this time.