Skip to content

Commit

Permalink
Fix table row height when its height is not auto
Browse files Browse the repository at this point in the history
  • Loading branch information
liZe committed Jan 29, 2016
1 parent 0eebd03 commit c42bf6a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions weasyprint/layout/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,15 @@ def group_layout(group, position_y, max_position_y,
ending_cells_by_row[cell.rowspan - 1].append(cell)
ending_cells = ending_cells_by_row.pop(0)
if ending_cells: # in this row
row_bottom_y = max(
cell.position_y + cell.border_height()
for cell in ending_cells)
if row.height == 'auto':
row_bottom_y = max(
cell.position_y + cell.border_height()
for cell in ending_cells)
row.height = row_bottom_y - row.position_y
else:
row.height = max(row.height, max(
row_cell.height for row_cell in ending_cells))
row_bottom_y = cell.position_y + row.height
else:
row_bottom_y = row.position_y
row.height = 0
Expand Down

0 comments on commit c42bf6a

Please sign in to comment.