about summary refs log tree commit diff stats
path: root/src/layout
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2022-11-30 13:09:22 +0100
committerbptato <nincsnevem662@gmail.com>2022-11-30 13:09:22 +0100
commit6c9c41aa660769ea1df6f939685322ef3e57664a (patch)
tree1f8d8c69e4a68b59529c5f9f7111d8c1e88186d0 /src/layout
parentc78139d2b766c58d02230acda9e3cbfd41052c73 (diff)
downloadchawan-6c9c41aa660769ea1df6f939685322ef3e57664a.tar.gz
layout: clean up previously rendered root boxes
Diffstat (limited to 'src/layout')
-rw-r--r--src/layout/engine.nim1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/layout/engine.nim b/src/layout/engine.nim
index fe912174..b243b2ee 100644
--- a/src/layout/engine.nim
+++ b/src/layout/engine.nim
@@ -1233,5 +1233,6 @@ proc generateTableBox(styledNode: StyledNode, viewport: Viewport): TableBoxBuild
   return box
 
 proc renderLayout*(viewport: var Viewport, document: Document, root: StyledNode) =
+  viewport.root.setLen(0)
   let builder = root.generateBlockBox(viewport)
   viewport.buildRootBlock(builder)