about summary refs log tree commit diff stats
path: root/src/layout
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2022-12-07 14:26:28 +0100
committerbptato <nincsnevem662@gmail.com>2022-12-07 14:26:28 +0100
commitc678b1b4221fcac9540dfea8720c1a156586fb2f (patch)
tree1a3c4f01b24199e2cf867c48198685056afac79d /src/layout
parent05c34b8154b16532a330d5e430491832467f2b6a (diff)
downloadchawan-c678b1b4221fcac9540dfea8720c1a156586fb2f.tar.gz
Note on table layout + accept inline-table in iflush
Diffstat (limited to 'src/layout')
-rw-r--r--src/layout/engine.nim4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/layout/engine.nim b/src/layout/engine.nim
index c400dd92..717ea900 100644
--- a/src/layout/engine.nim
+++ b/src/layout/engine.nim
@@ -822,6 +822,8 @@ iterator rows(builder: TableBoxBuilder): BoxBuilder {.inline.} =
   for child in footer:
     yield child
 
+# Very basic table layout. TODO: this doesn't make sure cells actually fill
+# the rows, so e.g. text-align: left is broken.
 proc buildTable(box: TableBoxBuilder, parent: BlockBox): BlockBox =
   let table = parent.newBlockBox(box)
   var ctx: TableContext
@@ -987,7 +989,7 @@ func canGenerateAnonymousInline(blockgroup: BlockGroup, computed: CSSComputedVal
 
 proc iflush(blockgroup: var BlockGroup, ibox: var InlineBoxBuilder) =
   if ibox != nil:
-    assert ibox.computed{"display"} in {DISPLAY_INLINE, DISPLAY_INLINE_BLOCK}
+    assert ibox.computed{"display"} in {DISPLAY_INLINE, DISPLAY_INLINE_BLOCK, DISPLAY_INLINE_TABLE}
     blockgroup.add(ibox)
     ibox = nil