diff options
author | bptato <nincsnevem662@gmail.com> | 2022-12-07 14:26:28 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2022-12-07 14:26:28 +0100 |
commit | c678b1b4221fcac9540dfea8720c1a156586fb2f (patch) | |
tree | 1a3c4f01b24199e2cf867c48198685056afac79d /src/layout | |
parent | 05c34b8154b16532a330d5e430491832467f2b6a (diff) | |
download | chawan-c678b1b4221fcac9540dfea8720c1a156586fb2f.tar.gz |
Note on table layout + accept inline-table in iflush
Diffstat (limited to 'src/layout')
-rw-r--r-- | src/layout/engine.nim | 4 |
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 |