From 330cc2a7692002cadd9f6dee477abcbf14c94976 Mon Sep 17 00:00:00 2001 From: bptato Date: Sat, 9 Sep 2023 19:59:09 +0200 Subject: layout: remove commented out hack Specifically, we used to set the width computed value of table cells manually in the past. It was a hack that never worked very well, and has been unnecessary ever since we switched to SizeConstraints. --- src/layout/engine.nim | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'src/layout') diff --git a/src/layout/engine.nim b/src/layout/engine.nim index bdc51122..f3249cba 100644 --- a/src/layout/engine.nim +++ b/src/layout/engine.nim @@ -1262,18 +1262,8 @@ proc buildTableRow(pctx: TableContext, ctx: RowContext, parent: BlockBox, # Add inline spacing for merged columns. w += pctx.inlinespacing * (cellw.colspan - 1) * 2 if cellw.reflow and cellw.builder != nil: - #TODO TODO TODO this is a hack, and it doesn't even work properly - #TODO 2: maybe we can remove this now? - #let ocomputed = cellw.builder.computed - #cellw.builder.computed = ocomputed.copyProperties() - #cellw.builder.computed{"width"} = CSSLength( - # num: toFloat64(w), - # unit: UNIT_PX - #) - #TODO specified table height should be distributed among rows. cell = parent.viewport.buildTableCell(cellw.builder, stretch(w), maxContent()) - #cellw.builder.computed = ocomputed w = max(w, cell.width) x += pctx.inlinespacing if cell != nil: -- cgit