Skip to content

Commit 27ec1a1

Browse files
committed
wpt: add missing renderer
1 parent 07e8dfa commit 27ec1a1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/wpt/run.zig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const parser = @import("netsurf");
2626
const jsruntime = @import("jsruntime");
2727
const Loop = jsruntime.Loop;
2828
const Env = jsruntime.Env;
29+
const browser = @import("../browser/browser.zig");
2930
const Window = @import("../html/window.zig").Window;
3031
const storage = @import("../storage/storage.zig");
3132
const HttpClient = @import("../http/client.zig").Client;
@@ -61,12 +62,17 @@ pub fn run(arena: *std.heap.ArenaAllocator, comptime dir: []const u8, f: []const
6162
var cookie_jar = storage.CookieJar.init(alloc);
6263
defer cookie_jar.deinit();
6364

65+
var renderer = browser.Renderer.init(alloc);
66+
defer renderer.elements.deinit(alloc);
67+
defer renderer.positions.deinit(alloc);
68+
6469
var js_env: Env = undefined;
6570
Env.init(&js_env, alloc, &loop, UserContext{
6671
.document = html_doc,
6772
.cookie_jar = &cookie_jar,
6873
.http_client = &http_client,
6974
.uri = try std.Uri.parse("https://lightpanda.io"),
75+
.renderer = &renderer,
7076
});
7177
defer js_env.deinit();
7278

0 commit comments

Comments
 (0)