about summary refs log tree commit diff stats
path: root/src/layout
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2022-11-25 18:42:27 +0100
committerbptato <nincsnevem662@gmail.com>2022-11-25 18:42:27 +0100
commit7ab7f28fdefe503fdde53ba9e253e308cb06b44f (patch)
treecd4cc561061c673999f9e8ecf1063a0664ba4dae /src/layout
parentd205ef228866cad35891ca96cacae547c02fd4ae (diff)
downloadchawan-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.nim6
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)