mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-31 09:29:42 +00:00
Merge pull request #2049 from lightpanda-io/refactor/getNodeDetails-param-order
Some checks are pending
e2e-test / zig build release (push) Waiting to run
e2e-test / demo-scripts (push) Blocked by required conditions
e2e-test / wba-demo-scripts (push) Blocked by required conditions
e2e-test / wba-test (push) Blocked by required conditions
e2e-test / cdp-and-hyperfine-bench (push) Blocked by required conditions
e2e-test / perf-fmt (push) Blocked by required conditions
e2e-test / browser fetch (push) Blocked by required conditions
zig-test / zig fmt (push) Waiting to run
zig-test / zig test using v8 in debug mode (push) Waiting to run
zig-test / zig test (push) Waiting to run
zig-test / perf-fmt (push) Blocked by required conditions
Some checks are pending
e2e-test / zig build release (push) Waiting to run
e2e-test / demo-scripts (push) Blocked by required conditions
e2e-test / wba-demo-scripts (push) Blocked by required conditions
e2e-test / wba-test (push) Blocked by required conditions
e2e-test / cdp-and-hyperfine-bench (push) Blocked by required conditions
e2e-test / perf-fmt (push) Blocked by required conditions
e2e-test / browser fetch (push) Blocked by required conditions
zig-test / zig fmt (push) Waiting to run
zig-test / zig test using v8 in debug mode (push) Waiting to run
zig-test / zig test (push) Waiting to run
zig-test / perf-fmt (push) Blocked by required conditions
SemanticTree: reorder getNodeDetails params
This commit is contained in:
@@ -640,10 +640,10 @@ pub const NodeDetails = struct {
|
||||
};
|
||||
|
||||
pub fn getNodeDetails(
|
||||
arena: std.mem.Allocator,
|
||||
node: *Node,
|
||||
registry: *CDPNode.Registry,
|
||||
page: *Page,
|
||||
arena: std.mem.Allocator,
|
||||
) !NodeDetails {
|
||||
const cdp_node = try registry.register(node);
|
||||
const axn = AXNode.fromNode(node);
|
||||
|
||||
@@ -154,7 +154,7 @@ fn getNodeDetails(cmd: anytype) !void {
|
||||
|
||||
const node = (bc.node_registry.lookup_by_id.get(params.backendNodeId) orelse return error.InvalidNodeId).dom;
|
||||
|
||||
const details = SemanticTree.getNodeDetails(node, &bc.node_registry, page, cmd.arena) catch return error.InternalError;
|
||||
const details = SemanticTree.getNodeDetails(cmd.arena, node, &bc.node_registry, page) catch return error.InternalError;
|
||||
|
||||
return cmd.sendResult(.{
|
||||
.nodeDetails = details,
|
||||
|
||||
@@ -404,7 +404,7 @@ fn handleNodeDetails(server: *Server, arena: std.mem.Allocator, id: std.json.Val
|
||||
};
|
||||
|
||||
const page = server.session.currentPage().?;
|
||||
const details = lp.SemanticTree.getNodeDetails(node.dom, &server.node_registry, page, arena) catch {
|
||||
const details = lp.SemanticTree.getNodeDetails(arena, node.dom, &server.node_registry, page) catch {
|
||||
return server.sendError(id, .InternalError, "Failed to get node details");
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user