diff options
author | bptato <nincsnevem662@gmail.com> | 2022-11-25 18:42:27 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2022-11-25 18:42:27 +0100 |
commit | 7ab7f28fdefe503fdde53ba9e253e308cb06b44f (patch) | |
tree | cd4cc561061c673999f9e8ecf1063a0664ba4dae /src/layout | |
parent | d205ef228866cad35891ca96cacae547c02fd4ae (diff) | |
download | chawan-7ab7f28fdefe503fdde53ba9e253e308cb06b44f.tar.gz |
Add some quirks mode rules + presentational hints
Only as a POC for now.
Diffstat (limited to 'src/layout')
-rw-r--r-- | src/layout/engine.nim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/layout/engine.nim b/src/layout/engine.nim index 1f2fef98..0fa1c156 100644 --- a/src/layout/engine.nim +++ b/src/layout/engine.nim @@ -856,10 +856,12 @@ proc generateFromElem(styledNode: StyledNode, blockgroup: var BlockGroup, viewpo case styledNode.computed{"display"} of DISPLAY_BLOCK: + flush_ibox blockgroup.flush() let childbox = styledNode.generateBlockBox(viewport) box.children.add(childbox) of DISPLAY_LIST_ITEM: + flush_ibox blockgroup.flush() let childbox = getListItemBox(styledNode.computed, blockgroup.listItemCounter) if childbox.computed{"list-style-position"} == LIST_STYLE_POSITION_INSIDE: @@ -878,18 +880,22 @@ proc generateFromElem(styledNode: StyledNode, blockgroup: var BlockGroup, viewpo childbox.content = styledNode.generateBlockBox(viewport) blockgroup.add(childbox) of DISPLAY_TABLE: + flush_ibox blockgroup.flush() let childbox = styledNode.generateTableBox(viewport) box.children.add(childbox) of DISPLAY_TABLE_ROW: + flush_ibox blockgroup.flush() let childbox = styledNode.generateTableRowBox(viewport) box.children.add(childbox) of DISPLAY_TABLE_ROW_GROUP: + flush_ibox blockgroup.flush() let childbox = styledNode.generateTableRowGroupBox(viewport) box.children.add(childbox) of DISPLAY_TABLE_CELL: + flush_ibox blockgroup.flush() let childbox = styledNode.generateTableCellBox(viewport) box.children.add(childbox) |