diff options
| author | bptato <nincsnevem662@gmail.com> | 2025-01-09 20:00:05 +0100 |
|---|---|---|
| committer | bptato <nincsnevem662@gmail.com> | 2025-01-09 20:00:05 +0100 |
| commit | 36c280848e85595166e51bacb215a4d1eb550e0d (patch) | |
| tree | 1a7c8f4d8bd1865cad0ae052045c3a641c0d573c /src/css/layout.nim | |
| parent | 86129e41a258cdbab4d9cccd86709e2ab02a3645 (diff) | |
| download | chawan-36c280848e85595166e51bacb215a4d1eb550e0d.tar.gz | |
buffer: make iframes clickable
better than nothing
Diffstat (limited to 'src/css/layout.nim')
| -rw-r--r-- | src/css/layout.nim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/css/layout.nim b/src/css/layout.nim index 19b054dc..44dd46a7 100644 --- a/src/css/layout.nim +++ b/src/css/layout.nim @@ -50,6 +50,7 @@ type imgText: StyledNode audioText: StyledNode videoText: StyledNode + iframeText: StyledNode luctx: LUContext const DefaultSpan = Span(start: 0, send: LUnit.high) @@ -3196,6 +3197,8 @@ proc buildReplacement(ctx: var BlockBuilderContext; child, parent: StyledNode; ctx.pushInlineText(computed, parent, ctx.lctx.videoText) of ContentAudio: ctx.pushInlineText(computed, parent, ctx.lctx.audioText) + of ContentIFrame: + ctx.pushInlineText(computed, parent, ctx.lctx.iframeText) of ContentNewline: ctx.pushInline(InlineBox( t: ibtNewline, @@ -3437,6 +3440,7 @@ proc layout*(root: StyledNode; attrsp: ptr WindowAttributes): BlockBox = imgText: newStyledText("[img]"), videoText: newStyledText("[video]"), audioText: newStyledText("[audio]"), + iframeText: newStyledText("[iframe]"), luctx: LUContext() ) let box = BlockBox(computed: root.computed, node: root) |