diff options
author | bptato <nincsnevem662@gmail.com> | 2024-05-28 01:08:04 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-05-28 01:09:09 +0200 |
commit | 3f919dda32231276c9388e1f1278d73465c14e3e (patch) | |
tree | 7a8f644f2ec37d0225d60b0077283399f5b71a3d | |
parent | 03bbf7f451a638e2d1b4dff7ef659d70d576ff01 (diff) | |
download | chawan-3f919dda32231276c9388e1f1278d73465c14e3e.tar.gz |
layout: fix crash on inline tables
-rw-r--r-- | src/layout/engine.nim | 2 | ||||
-rw-r--r-- | test/layout/inline-table.expected | 2 | ||||
-rw-r--r-- | test/layout/inline-table.html | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/src/layout/engine.nim b/src/layout/engine.nim index 0f98417f..ddbb4802 100644 --- a/src/layout/engine.nim +++ b/src/layout/engine.nim @@ -1446,7 +1446,7 @@ proc layoutChildren(ictx: var InlineContext; state: var InlineState; case child.computed{"display"} of DisplayInline: state.fragment.children.add(ictx.layoutInline(child)) - of DisplayInlineBlock, DisplayInlineTable, DisplayInlineFlex: + of DisplayInlineBlock, DisplayInlineTableWrapper, DisplayInlineFlex: # Note: we do not need a separate inline fragment here, because the tree # generator already does an iflush() before adding inline blocks. let w = fitContent(ictx.space.w) diff --git a/test/layout/inline-table.expected b/test/layout/inline-table.expected new file mode 100644 index 00000000..8405060b --- /dev/null +++ b/test/layout/inline-table.expected @@ -0,0 +1,2 @@ + +test diff --git a/test/layout/inline-table.html b/test/layout/inline-table.html new file mode 100644 index 00000000..50299e00 --- /dev/null +++ b/test/layout/inline-table.html @@ -0,0 +1 @@ +<div style="display: inline-table">test</div> |