From 5fda1547b11a4593bcc65e6247a5679db0dea7fe Mon Sep 17 00:00:00 2001 From: Julia Ortiz <94128293+julia-script@users.noreply.github.com> Date: Thu, 22 May 2025 12:36:49 -0300 Subject: [PATCH] Add backward continuation link --- packages/core/src/layout/LayoutTree.zig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/core/src/layout/LayoutTree.zig b/packages/core/src/layout/LayoutTree.zig index 0394015..1144b05 100644 --- a/packages/core/src/layout/LayoutTree.zig +++ b/packages/core/src/layout/LayoutTree.zig @@ -78,6 +78,8 @@ pub const TextNode = struct { pub const InlineNode = struct { ref: DocRef, is_atomic: bool, + continuation: ?LayoutNode.Id = null, + continuationof: ?LayoutNode.Id = null, children: Array(LayoutNode.Id) = .{}, pub fn deinit(self: *InlineNode, allocator: std.mem.Allocator) void { self.children.deinit(allocator); @@ -91,6 +93,8 @@ pub const DocRef = union(enum) { pub const BlockContainerNode = struct { ref: DocRef, + continuation: ?LayoutNode.Id = null, + continuationof: ?LayoutNode.Id = null, children: Array(LayoutNode.Id) = .{}, pub fn deinit(self: *BlockContainerNode, allocator: std.mem.Allocator) void { self.children.deinit(allocator); @@ -104,6 +108,8 @@ pub const BlockContainerNode = struct { /// this node also holds the LineBoxes pub const InlineContainerNode = struct { ref: DocRef, + continuation: ?LayoutNode.Id = null, + continuationof: ?LayoutNode.Id = null, children: Array(LayoutNode.Id) = .{}, line_boxes: Array(LineBox) = .{}, pub fn deinit(self: *InlineContainerNode, allocator: std.mem.Allocator) void {