Refactor assign_height for table_cell, table_row