aboutsummaryrefslogtreecommitdiffstats
path: root/src/server/buffer.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2025-02-17 18:54:00 +0100
committerbptato <nincsnevem662@gmail.com>2025-02-17 19:36:57 +0100
commit538a8a23a5d07663c545093511c2a8281708ba49 (patch)
treebbc46e8573796b07b88fffe0106211fab2b7fd54 /src/server/buffer.nim
parentd6eb9be13115582182c4a0980e6be28c63ce3503 (diff)
downloadchawan-538a8a23a5d07663c545093511c2a8281708ba49.tar.gz
render: respect stacking context for inline boxes
Also, eliminate the offset attribute in StackItem by just taking render.offset from the nearest ancestor as the base. That leaves us with clipBox, which I'm not yet sure how to get rid of. Its current implementation is certainly wrong: `position: absolute' should really use its absolute container's clip box. It is however correct for `position: relative' in its current form. (One way would be to cache it inside CSSBox, like we do offset.)
Diffstat (limited to 'src/server/buffer.nim')
-rw-r--r--src/server/buffer.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/buffer.nim b/src/server/buffer.nim
index 7efaedcb..95b4261c 100644
--- a/src/server/buffer.nim
+++ b/src/server/buffer.nim
@@ -773,8 +773,8 @@ proc maybeReshape(buffer: Buffer) =
if document.invalid:
buffer.rootBox = document.documentElement.buildTree(buffer.rootBox)
buffer.rootBox.layout(addr buffer.attrs)
- buffer.lines.renderDocument(buffer.bgcolor, buffer.rootBox,
- addr buffer.attrs, buffer.images)
+ buffer.lines.render(buffer.bgcolor, buffer.rootBox, addr buffer.attrs,
+ buffer.images)
document.invalid = false
if buffer.hasTask(bcOnReshape):
buffer.resolveTask(bcOnReshape)