1
1
mirror of https://github.com/Kozea/WeasyPrint.git synced 2024-10-04 16:07:57 +03:00

Merge branch 'master' of github.com:Kozea/WeasyPrint

This commit is contained in:
Guillaume Ayoub 2021-11-19 10:59:02 +01:00
commit 509ab9379f

View File

@ -397,7 +397,6 @@ def compute_content_list(content_list, parent_box, counter_values, css_token,
# in @page context. Obsoletes the parse_again function's deepcopy. # in @page context. Obsoletes the parse_again function's deepcopy.
# TODO: Is propbably superfluous in_page_context. # TODO: Is propbably superfluous in_page_context.
parent_box.cached_counter_values = copy.deepcopy(counter_values) parent_box.cached_counter_values = copy.deepcopy(counter_values)
for type_, value in content_list: for type_, value in content_list:
if type_ == 'string': if type_ == 'string':
add_text(value) add_text(value)
@ -1183,16 +1182,7 @@ def flex_children(box, children):
# https://www.w3.org/TR/css-flexbox-1/#flex-items # https://www.w3.org/TR/css-flexbox-1/#flex-items
continue continue
if isinstance(child, boxes.InlineLevelBox): if isinstance(child, boxes.InlineLevelBox):
# TODO: Only create block boxes for text runs, not for other anonymous = boxes.BlockBox.anonymous_from(box, [child])
# inline level boxes. This is false but currently needed
# because block_level_width and block_level_layout are called
# in layout.flex.
if isinstance(child, boxes.ParentBox):
anonymous = boxes.BlockBox.anonymous_from(
box, child.children)
anonymous.style = child.style
else:
anonymous = boxes.BlockBox.anonymous_from(box, [child])
anonymous.is_flex_item = True anonymous.is_flex_item = True
flex_children.append(anonymous) flex_children.append(anonymous)
else: else: