Skip to content

Commit

Permalink
Always store children as lists
Browse files Browse the repository at this point in the history
Fix #1575.
  • Loading branch information
liZe committed Feb 23, 2022
1 parent 9353f89 commit b1027ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion weasyprint/formatting_structure/boxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ def remove_decoration(self, start, end):
def copy_with_children(self, new_children):
"""Create a new equivalent box with given ``new_children``."""
new_box = self.copy()
new_box.children = tuple(new_children)
new_box.children = list(new_children)

# Clear and reset removed decorations as we don't want to keep the
# previous data, for example when a box is split between two pages.
Expand Down
2 changes: 1 addition & 1 deletion weasyprint/layout/page.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ def make_page(context, root_box, page_type, resume_at, page_number,
page_is_empty, positioned_boxes, positioned_boxes, adjoining_margins,
discard=False)
assert root_box
root_box.children = tuple(out_of_flow_boxes) + root_box.children
root_box.children = out_of_flow_boxes + root_box.children

page.fixed_boxes = [
placeholder._box for placeholder in positioned_boxes
Expand Down

0 comments on commit b1027ff

Please sign in to comment.