aboutsummaryrefslogtreecommitdiffstats
path: root/src/layout
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-09-09 19:59:09 +0200
committerbptato <nincsnevem662@gmail.com>2023-09-09 19:59:09 +0200
commit330cc2a7692002cadd9f6dee477abcbf14c94976 (patch)
treef58190652e72c3a9bcb7372d69cb112689021fd6 /src/layout
parentedf4321c7a2b206ff8f8fa3e69174e05c4c414bd (diff)
downloadchawan-330cc2a7692002cadd9f6dee477abcbf14c94976.tar.gz
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.
Diffstat (limited to 'src/layout')
-rw-r--r--src/layout/engine.nim10
1 files changed, 0 insertions, 10 deletions
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: