about summary refs log tree commit diff stats
path: root/src/layout
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-03-13 16:17:40 +0100
committerbptato <nincsnevem662@gmail.com>2024-03-13 16:19:15 +0100
commit2a2234053a7c4b3cb4012c314083aa8477e695f9 (patch)
tree5e7bcaeada2c82719cea808e7f856b1998bb362e /src/layout
parent9ee1dd6e5167d9c2054dee5f9241e3bba286706f (diff)
downloadchawan-2a2234053a7c4b3cb4012c314083aa8477e695f9.tar.gz
rudimentary support for <video>, <audio>
we just treat them as img tags. lazy, but works suprisingly well -- so
long as the server sends us a Content-Type, anyway.
Diffstat (limited to 'src/layout')
-rw-r--r--src/layout/engine.nim4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/layout/engine.nim b/src/layout/engine.nim
index d2d22ab9..d90fc52c 100644
--- a/src/layout/engine.nim
+++ b/src/layout/engine.nim
@@ -2599,6 +2599,10 @@ proc generateReplacement(ctx: var InnerBlockContext, child, parent: StyledNode)
   of CONTENT_IMAGE:
     #TODO idk
     ctx.generateAnonymousInlineText("[img]", parent)
+  of CONTENT_VIDEO:
+    ctx.generateAnonymousInlineText("[video]", parent)
+  of CONTENT_AUDIO:
+    ctx.generateAnonymousInlineText("[audio]", parent)
   of CONTENT_NEWLINE:
     ctx.iflush()
     #TODO ??