about summary refs log tree commit diff stats
path: root/src/render
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2022-11-28 23:00:46 +0100
committerbptato <nincsnevem662@gmail.com>2022-11-28 23:00:46 +0100
commit150de039da9f98cdb665c8b0e88526ab23a35d34 (patch)
treee064b40b7446c5adefdd05613c180297b2b28a44 /src/render
parenteb2e57c97eb67eec19f068e294a8f6d1375c82f5 (diff)
downloadchawan-150de039da9f98cdb665c8b0e88526ab23a35d34.tar.gz
Add position css property, inline block fixes
More specifically, inline block white-space is no longer incorrectly
determined by its computed values, but rather by its parent's values.
Diffstat (limited to 'src/render')
-rw-r--r--src/render/renderdocument.nim5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/render/renderdocument.nim b/src/render/renderdocument.nim
index 9eebe61d..158773f9 100644
--- a/src/render/renderdocument.nim
+++ b/src/render/renderdocument.nim
@@ -253,7 +253,7 @@ proc renderInlineContext(grid: var FlexibleGrid, ctx: InlineContext, x, y: int,
     for atom in line.atoms:
       if atom of InlineBlockBox:
         let iblock = InlineBlockBox(atom)
-        grid.renderBlockContext(iblock.bctx, x + iblock.offset.x, y + iblock.offset.y, window)
+        grid.renderBlockContext(iblock.innerbox, x + iblock.offset.x, y + iblock.offset.y, window)
       elif atom of InlineWord:
         let word = InlineWord(atom)
         grid.setRowWord(word, x, y, window)
@@ -297,6 +297,7 @@ proc renderDocument*(document: Document, window: WindowAttributes, userstyle: CS
   result[1] = styledNode
   layout.renderLayout(document, styledNode)
   result[0].setLen(0)
-  result[0].renderBlockContext(layout.root, 0, 0, window)
+  for root in layout.root:
+    result[0].renderBlockContext(root, 0, 0, window)
   if result[0].len == 0:
     result[0].addLine()