mirror of
https://github.com/Kozea/WeasyPrint.git
synced 2024-10-05 08:27:22 +03:00
Set row baseline when no cells are baseline-aligned
"If a row has no cell box aligned to its baseline, the baseline of that row is the bottom content edge of the lowest cell in the row." Related to #867.
This commit is contained in:
parent
99f85beac6
commit
58770563be
@ -156,8 +156,6 @@ def table_layout(context, table, max_position_y, skip_stack,
|
||||
extra = row.baseline - cell.baseline
|
||||
if cell.baseline != row.baseline and extra:
|
||||
add_top_padding(cell, extra)
|
||||
else:
|
||||
row.baseline = None
|
||||
|
||||
# row height
|
||||
for cell in row.children:
|
||||
@ -177,6 +175,9 @@ def table_layout(context, table, max_position_y, skip_stack,
|
||||
row_bottom_y = row.position_y
|
||||
row.height = 0
|
||||
|
||||
if not baseline_cells:
|
||||
row.baseline = row_bottom_y
|
||||
|
||||
# Add extra padding to make the cells the same height as the row
|
||||
# and honor vertical-align
|
||||
for cell in ending_cells:
|
||||
|
Loading…
Reference in New Issue
Block a user