mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-02-04 14:33:47 +00:00
Merge pull request #1437 from lightpanda-io/remove_unused
Remove unused import
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2023-2025 Lightpanda (Selecy SAS)
|
// Copyright (C) 2023-2026 Lightpanda (Selecy SAS)
|
||||||
//
|
//
|
||||||
// Francis Bouvier <francis@lightpanda.io>
|
// Francis Bouvier <francis@lightpanda.io>
|
||||||
// Pierre Tachoire <pierre@lightpanda.io>
|
// Pierre Tachoire <pierre@lightpanda.io>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2023-2025 Lightpanda (Selecy SAS)
|
// Copyright (C) 2023-2026 Lightpanda (Selecy SAS)
|
||||||
//
|
//
|
||||||
// Francis Bouvier <francis@lightpanda.io>
|
// Francis Bouvier <francis@lightpanda.io>
|
||||||
// Pierre Tachoire <pierre@lightpanda.io>
|
// Pierre Tachoire <pierre@lightpanda.io>
|
||||||
@@ -17,7 +17,6 @@
|
|||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const lp = @import("lightpanda");
|
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
|
|
||||||
const ResolveOpts = struct {
|
const ResolveOpts = struct {
|
||||||
|
|||||||
@@ -23,12 +23,10 @@ const string = @import("../../string.zig");
|
|||||||
const Page = @import("../Page.zig");
|
const Page = @import("../Page.zig");
|
||||||
|
|
||||||
const js = @import("js.zig");
|
const js = @import("js.zig");
|
||||||
const bridge = @import("bridge.zig");
|
|
||||||
const Context = @import("Context.zig");
|
const Context = @import("Context.zig");
|
||||||
const TaggedOpaque = @import("TaggedOpaque.zig");
|
const TaggedOpaque = @import("TaggedOpaque.zig");
|
||||||
|
|
||||||
const v8 = js.v8;
|
const v8 = js.v8;
|
||||||
const Allocator = std.mem.Allocator;
|
|
||||||
const ArenaAllocator = std.heap.ArenaAllocator;
|
const ArenaAllocator = std.heap.ArenaAllocator;
|
||||||
|
|
||||||
const CALL_ARENA_RETAIN = 1024 * 16;
|
const CALL_ARENA_RETAIN = 1024 * 16;
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ const log = @import("../../log.zig");
|
|||||||
const js = @import("js.zig");
|
const js = @import("js.zig");
|
||||||
const Env = @import("Env.zig");
|
const Env = @import("Env.zig");
|
||||||
const bridge = @import("bridge.zig");
|
const bridge = @import("bridge.zig");
|
||||||
const TaggedOpaque = @import("TaggedOpaque.zig");
|
|
||||||
|
|
||||||
const Page = @import("../Page.zig");
|
const Page = @import("../Page.zig");
|
||||||
const ScriptManager = @import("../ScriptManager.zig");
|
const ScriptManager = @import("../ScriptManager.zig");
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2023-2025 Lightpanda (Selecy SAS)
|
// Copyright (C) 2023-2026 Lightpanda (Selecy SAS)
|
||||||
//
|
//
|
||||||
// Francis Bouvier <francis@lightpanda.io>
|
// Francis Bouvier <francis@lightpanda.io>
|
||||||
// Pierre Tachoire <pierre@lightpanda.io>
|
// Pierre Tachoire <pierre@lightpanda.io>
|
||||||
@@ -22,8 +22,6 @@ const v8 = js.v8;
|
|||||||
|
|
||||||
const log = @import("../../log.zig");
|
const log = @import("../../log.zig");
|
||||||
|
|
||||||
const Allocator = std.mem.Allocator;
|
|
||||||
|
|
||||||
const Function = @This();
|
const Function = @This();
|
||||||
|
|
||||||
local: *const js.Local,
|
local: *const js.Local,
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
// Copyright (C) 2023-2025 Lightpanda (Selecy SAS)
|
|
||||||
//
|
|
||||||
// Francis Bouvier <francis@lightpanda.io>
|
|
||||||
// Pierre Tachoire <pierre@lightpanda.io>
|
|
||||||
//
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU Affero General Public License as
|
|
||||||
// published by the Free Software Foundation, either version 3 of the
|
|
||||||
// License, or (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU Affero General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Affero General Public License
|
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
const js = @import("js.zig");
|
|
||||||
const v8 = js.v8;
|
|
||||||
|
|
||||||
const Name = @This();
|
|
||||||
|
|
||||||
handle: *const v8.Name,
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2023-2025 Lightpanda (Selecy SAS)
|
// Copyright (C) 2023-2026 Lightpanda (Selecy SAS)
|
||||||
//
|
//
|
||||||
// Francis Bouvier <francis@lightpanda.io>
|
// Francis Bouvier <francis@lightpanda.io>
|
||||||
// Pierre Tachoire <pierre@lightpanda.io>
|
// Pierre Tachoire <pierre@lightpanda.io>
|
||||||
@@ -22,10 +22,6 @@ const v8 = js.v8;
|
|||||||
|
|
||||||
const IS_DEBUG = @import("builtin").mode == .Debug;
|
const IS_DEBUG = @import("builtin").mode == .Debug;
|
||||||
|
|
||||||
const Context = @import("Context.zig");
|
|
||||||
|
|
||||||
const Allocator = std.mem.Allocator;
|
|
||||||
|
|
||||||
const Object = @This();
|
const Object = @This();
|
||||||
|
|
||||||
local: *const js.Local,
|
local: *const js.Local,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2023-2025 Lightpanda (Selecy SAS)
|
// Copyright (C) 2023-2026 Lightpanda (Selecy SAS)
|
||||||
//
|
//
|
||||||
// Francis Bouvier <francis@lightpanda.io>
|
// Francis Bouvier <francis@lightpanda.io>
|
||||||
// Pierre Tachoire <pierre@lightpanda.io>
|
// Pierre Tachoire <pierre@lightpanda.io>
|
||||||
@@ -19,7 +19,6 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
pub const v8 = @import("v8").c;
|
pub const v8 = @import("v8").c;
|
||||||
|
|
||||||
const log = @import("../../log.zig");
|
|
||||||
const string = @import("../../string.zig");
|
const string = @import("../../string.zig");
|
||||||
|
|
||||||
pub const Env = @import("Env.zig");
|
pub const Env = @import("Env.zig");
|
||||||
@@ -33,7 +32,6 @@ pub const Platform = @import("Platform.zig");
|
|||||||
pub const Isolate = @import("Isolate.zig");
|
pub const Isolate = @import("Isolate.zig");
|
||||||
pub const HandleScope = @import("HandleScope.zig");
|
pub const HandleScope = @import("HandleScope.zig");
|
||||||
|
|
||||||
pub const Name = @import("Name.zig");
|
|
||||||
pub const Value = @import("Value.zig");
|
pub const Value = @import("Value.zig");
|
||||||
pub const Array = @import("Array.zig");
|
pub const Array = @import("Array.zig");
|
||||||
pub const String = @import("String.zig");
|
pub const String = @import("String.zig");
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2023-2025 Lightpanda (Selecy SAS)
|
// Copyright (C) 2023-2026 Lightpanda (Selecy SAS)
|
||||||
//
|
//
|
||||||
// Francis Bouvier <francis@lightpanda.io>
|
// Francis Bouvier <francis@lightpanda.io>
|
||||||
// Pierre Tachoire <pierre@lightpanda.io>
|
// Pierre Tachoire <pierre@lightpanda.io>
|
||||||
@@ -16,8 +16,6 @@
|
|||||||
// You should have received a copy of the GNU Affero General Public License
|
// You should have received a copy of the GNU Affero General Public License
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
const std = @import("std");
|
|
||||||
|
|
||||||
// Gets the Parent of child.
|
// Gets the Parent of child.
|
||||||
// HtmlElement.of(script) -> *HTMLElement
|
// HtmlElement.of(script) -> *HTMLElement
|
||||||
pub fn Struct(comptime T: type) type {
|
pub fn Struct(comptime T: type) type {
|
||||||
@@ -28,37 +26,3 @@ pub fn Struct(comptime T: type) type {
|
|||||||
else => unreachable,
|
else => unreachable,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Creates an enum of N enums. Doesn't perserve their underlying integer
|
|
||||||
pub fn mergeEnums(comptime enums: []const type) type {
|
|
||||||
const field_count = blk: {
|
|
||||||
var count: usize = 0;
|
|
||||||
inline for (enums) |e| {
|
|
||||||
count += @typeInfo(e).@"enum".fields.len;
|
|
||||||
}
|
|
||||||
break :blk count;
|
|
||||||
};
|
|
||||||
|
|
||||||
var i: usize = 0;
|
|
||||||
var fields: [field_count]std.builtin.Type.EnumField = undefined;
|
|
||||||
for (enums) |e| {
|
|
||||||
for (@typeInfo(e).@"enum".fields) |f| {
|
|
||||||
fields[i] = .{
|
|
||||||
.name = f.name,
|
|
||||||
.value = i,
|
|
||||||
};
|
|
||||||
i += 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return @Type(.{ .@"enum" = .{
|
|
||||||
.decls = &.{},
|
|
||||||
.tag_type = blk: {
|
|
||||||
if (field_count <= std.math.maxInt(u8)) break :blk u8;
|
|
||||||
if (field_count <= std.math.maxInt(u16)) break :blk u16;
|
|
||||||
unreachable;
|
|
||||||
},
|
|
||||||
.fields = &fields,
|
|
||||||
.is_exhaustive = true,
|
|
||||||
} });
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -19,8 +19,6 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const js = @import("../js/js.zig");
|
const js = @import("../js/js.zig");
|
||||||
|
|
||||||
const Page = @import("../Page.zig");
|
|
||||||
|
|
||||||
const SubtleCrypto = @import("SubtleCrypto.zig");
|
const SubtleCrypto = @import("SubtleCrypto.zig");
|
||||||
|
|
||||||
const Crypto = @This();
|
const Crypto = @This();
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2023-2025 Lightpanda (Selecy SAS)
|
// Copyright (C) 2023-2026 Lightpanda (Selecy SAS)
|
||||||
//
|
//
|
||||||
// Francis Bouvier <francis@lightpanda.io>
|
// Francis Bouvier <francis@lightpanda.io>
|
||||||
// Pierre Tachoire <pierre@lightpanda.io>
|
// Pierre Tachoire <pierre@lightpanda.io>
|
||||||
@@ -20,7 +20,6 @@ const std = @import("std");
|
|||||||
const String = @import("../../string.zig").String;
|
const String = @import("../../string.zig").String;
|
||||||
|
|
||||||
const js = @import("../js/js.zig");
|
const js = @import("../js/js.zig");
|
||||||
const Page = @import("../Page.zig");
|
|
||||||
const Element = @import("Element.zig");
|
const Element = @import("Element.zig");
|
||||||
|
|
||||||
const CustomElementDefinition = @This();
|
const CustomElementDefinition = @This();
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2023-2025 Lightpanda (Selecy SAS)
|
// Copyright (C) 2023-2026 Lightpanda (Selecy SAS)
|
||||||
//
|
//
|
||||||
// Francis Bouvier <francis@lightpanda.io>
|
// Francis Bouvier <francis@lightpanda.io>
|
||||||
// Pierre Tachoire <pierre@lightpanda.io>
|
// Pierre Tachoire <pierre@lightpanda.io>
|
||||||
@@ -26,7 +26,6 @@ const Parser = @import("../parser/Parser.zig");
|
|||||||
const HTMLDocument = @import("HTMLDocument.zig");
|
const HTMLDocument = @import("HTMLDocument.zig");
|
||||||
const XMLDocument = @import("XMLDocument.zig");
|
const XMLDocument = @import("XMLDocument.zig");
|
||||||
const Document = @import("Document.zig");
|
const Document = @import("Document.zig");
|
||||||
const ProcessingInstruction = @import("../webapi/cdata/ProcessingInstruction.zig");
|
|
||||||
|
|
||||||
const DOMParser = @This();
|
const DOMParser = @This();
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2023-2025 Lightpanda (Selecy SAS)
|
// Copyright (C) 2023-2026 Lightpanda (Selecy SAS)
|
||||||
//
|
//
|
||||||
// Francis Bouvier <francis@lightpanda.io>
|
// Francis Bouvier <francis@lightpanda.io>
|
||||||
// Pierre Tachoire <pierre@lightpanda.io>
|
// Pierre Tachoire <pierre@lightpanda.io>
|
||||||
@@ -30,8 +30,6 @@ const Location = @import("Location.zig");
|
|||||||
const Parser = @import("../parser/Parser.zig");
|
const Parser = @import("../parser/Parser.zig");
|
||||||
const collections = @import("collections.zig");
|
const collections = @import("collections.zig");
|
||||||
const Selector = @import("selector/Selector.zig");
|
const Selector = @import("selector/Selector.zig");
|
||||||
const NodeFilter = @import("NodeFilter.zig");
|
|
||||||
const DocumentType = @import("DocumentType.zig");
|
|
||||||
const DOMTreeWalker = @import("DOMTreeWalker.zig");
|
const DOMTreeWalker = @import("DOMTreeWalker.zig");
|
||||||
const DOMNodeIterator = @import("DOMNodeIterator.zig");
|
const DOMNodeIterator = @import("DOMNodeIterator.zig");
|
||||||
const DOMImplementation = @import("DOMImplementation.zig");
|
const DOMImplementation = @import("DOMImplementation.zig");
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2023-2025 Lightpanda (Selecy SAS)
|
// Copyright (C) 2023-2026 Lightpanda (Selecy SAS)
|
||||||
//
|
//
|
||||||
// Francis Bouvier <francis@lightpanda.io>
|
// Francis Bouvier <francis@lightpanda.io>
|
||||||
// Pierre Tachoire <pierre@lightpanda.io>
|
// Pierre Tachoire <pierre@lightpanda.io>
|
||||||
@@ -17,7 +17,6 @@
|
|||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const lp = @import("lightpanda");
|
|
||||||
const js = @import("../../js/js.zig");
|
const js = @import("../../js/js.zig");
|
||||||
const reflect = @import("../../reflect.zig");
|
const reflect = @import("../../reflect.zig");
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2023-2025 Lightpanda (Selecy SAS)
|
// Copyright (C) 2023-2026 Lightpanda (Selecy SAS)
|
||||||
//
|
//
|
||||||
// Francis Bouvier <francis@lightpanda.io>
|
// Francis Bouvier <francis@lightpanda.io>
|
||||||
// Pierre Tachoire <pierre@lightpanda.io>
|
// Pierre Tachoire <pierre@lightpanda.io>
|
||||||
@@ -33,20 +33,6 @@ _key: []const u8,
|
|||||||
_url: ?[:0]const u8,
|
_url: ?[:0]const u8,
|
||||||
_state: NavigationState,
|
_state: NavigationState,
|
||||||
|
|
||||||
// fn asEventTarget(self: *NavigationHistoryEntry) *EventTarget {
|
|
||||||
// return self._proto.?.asEventTarget();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// pub fn onRemovePage(self: *NavigationHistoryEntry) void {
|
|
||||||
// self._proto = null;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// pub fn onNewPage(self: *NavigationHistoryEntry, page: *Page) !void {
|
|
||||||
// self._proto = try page._factory.eventTarget(
|
|
||||||
// NavigationHistoryEntryEventTarget{ ._proto = undefined },
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
|
|
||||||
pub fn id(self: *const NavigationHistoryEntry) []const u8 {
|
pub fn id(self: *const NavigationHistoryEntry) []const u8 {
|
||||||
return self._id;
|
return self._id;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2023-2025 Lightpanda (Selecy SAS)
|
// Copyright (C) 2023-2026 Lightpanda (Selecy SAS)
|
||||||
//
|
//
|
||||||
// Francis Bouvier <francis@lightpanda.io>
|
// Francis Bouvier <francis@lightpanda.io>
|
||||||
// Pierre Tachoire <pierre@lightpanda.io>
|
// Pierre Tachoire <pierre@lightpanda.io>
|
||||||
@@ -17,7 +17,6 @@
|
|||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const String = @import("../../../string.zig").String;
|
|
||||||
|
|
||||||
const Page = @import("../../Page.zig");
|
const Page = @import("../../Page.zig");
|
||||||
|
|
||||||
|
|||||||
@@ -17,16 +17,15 @@
|
|||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
|
||||||
const jsonStringify = std.json.Stringify;
|
const jsonStringify = std.json.Stringify;
|
||||||
|
|
||||||
const log = @import("../log.zig");
|
const log = @import("../log.zig");
|
||||||
const Page = @import("../browser/Page.zig");
|
const Page = @import("../browser/Page.zig");
|
||||||
const DOMNode = @import("../browser/webapi/Node.zig");
|
const DOMNode = @import("../browser/webapi/Node.zig");
|
||||||
const URL = @import("../browser/URL.zig");
|
|
||||||
|
const Node = @import("Node.zig");
|
||||||
|
|
||||||
const AXNode = @This();
|
const AXNode = @This();
|
||||||
const Node = @import("Node.zig");
|
|
||||||
|
|
||||||
// Need a custom writer, because we can't just serialize the node as-is.
|
// Need a custom writer, because we can't just serialize the node as-is.
|
||||||
// Sometimes we want to serializ the node without chidren, sometimes with just
|
// Sometimes we want to serializ the node without chidren, sometimes with just
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ const Page = @import("../../browser/Page.zig");
|
|||||||
const timestampF = @import("../../datetime.zig").timestamp;
|
const timestampF = @import("../../datetime.zig").timestamp;
|
||||||
const Notification = @import("../../Notification.zig");
|
const Notification = @import("../../Notification.zig");
|
||||||
|
|
||||||
const v8 = js.v8;
|
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
|
|
||||||
pub fn processMessage(cmd: anytype) !void {
|
pub fn processMessage(cmd: anytype) !void {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2023-2025 Lightpanda (Selecy SAS)
|
// Copyright (C) 2023-2026 Lightpanda (Selecy SAS)
|
||||||
//
|
//
|
||||||
// Francis Bouvier <francis@lightpanda.io>
|
// Francis Bouvier <francis@lightpanda.io>
|
||||||
// Pierre Tachoire <pierre@lightpanda.io>
|
// Pierre Tachoire <pierre@lightpanda.io>
|
||||||
@@ -17,7 +17,6 @@
|
|||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const js = @import("browser/js/js.zig");
|
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
|
|
||||||
const M = @This();
|
const M = @This();
|
||||||
|
|||||||
Reference in New Issue
Block a user