Skip to content

Commit b8e5e13

Browse files
committed
remove unused code, mostly imports
1 parent ca3fa3d commit b8e5e13

32 files changed

+5
-87
lines changed

src/app.zig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
const std = @import("std");
22
const Allocator = std.mem.Allocator;
33

4-
const js = @import("runtime/js.zig");
54
const Loop = @import("runtime/loop.zig").Loop;
65
const HttpClient = @import("http/client.zig").Client;
76
const Telemetry = @import("telemetry/telemetry.zig").Telemetry;

src/browser/browser.zig

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,16 @@ const URL = @import("../url.zig").URL;
3636

3737
const http = @import("../http/client.zig");
3838
const storage = @import("storage/storage.zig");
39-
const Loop = @import("../runtime/loop.zig").Loop;
4039
const SessionState = @import("env.zig").SessionState;
41-
const HttpClient = @import("../http/client.zig").Client;
4240
const Notification = @import("../notification.zig").Notification;
4341

4442
const polyfill = @import("polyfill/polyfill.zig");
4543

4644
const log = std.log.scoped(.browser);
4745

48-
pub const user_agent = "Lightpanda/1.0";
49-
5046
// Browser is an instance of the browser.
5147
// You can create multiple browser instances.
5248
// A browser contains only one session.
53-
// TODO allow multiple sessions per browser.
5449
pub const Browser = struct {
5550
env: *Env,
5651
app: *App,
@@ -839,12 +834,6 @@ const FlatRenderer = struct {
839834
}
840835
};
841836

842-
const NoopContext = struct {
843-
pub fn onInspectorResponse(_: *anyopaque, _: u32, _: []const u8) void {}
844-
pub fn onInspectorEvent(_: *anyopaque, _: []const u8) void {}
845-
pub fn notify(_: *anyopaque, _: *const Notification) !void {}
846-
};
847-
848837
fn timestamp() u32 {
849838
const ts = std.posix.clock_gettime(std.posix.CLOCK.MONOTONIC) catch unreachable;
850839
return @intCast(ts.sec);

src/browser/dom/attribute.zig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,9 @@
1616
// You should have received a copy of the GNU Affero General Public License
1717
// along with this program. If not, see <https://www.gnu.org/licenses/>.
1818

19-
const std = @import("std");
20-
2119
const parser = @import("../netsurf.zig");
2220

2321
const Node = @import("node.zig").Node;
24-
const DOMException = @import("exceptions.zig").DOMException;
2522

2623
// WEB IDL https://dom.spec.whatwg.org/#attr
2724
pub const Attr = struct {

src/browser/dom/cdata_section.zig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
// You should have received a copy of the GNU Affero General Public License
1717
// along with this program. If not, see <https://www.gnu.org/licenses/>.
1818

19-
const std = @import("std");
20-
2119
const parser = @import("../netsurf.zig");
2220

2321
const Text = @import("text.zig").Text;

src/browser/dom/comment.zig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
//
1616
// You should have received a copy of the GNU Affero General Public License
1717
// along with this program. If not, see <https://www.gnu.org/licenses/>.
18-
const std = @import("std");
1918

2019
const parser = @import("../netsurf.zig");
2120

src/browser/dom/document.zig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ const css = @import("css.zig");
3131
const Element = @import("element.zig").Element;
3232
const ElementUnion = @import("element.zig").Union;
3333

34-
const DocumentType = @import("document_type.zig").DocumentType;
35-
const DocumentFragment = @import("document_fragment.zig").DocumentFragment;
3634
const DOMImplementation = @import("implementation.zig").DOMImplementation;
3735

3836
// WEB IDL https://dom.spec.whatwg.org/#document

src/browser/dom/element.zig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ const NodeList = @import("nodelist.zig").NodeList;
3131
const HTMLElem = @import("../html/elements.zig");
3232
pub const Union = @import("../html/elements.zig").Union;
3333

34-
const DOMException = @import("exceptions.zig").DOMException;
35-
3634
// WEB IDL https://dom.spec.whatwg.org/#element
3735
pub const Element = struct {
3836
pub const Self = parser.Element;

src/browser/dom/event_target.zig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
// You should have received a copy of the GNU Affero General Public License
1717
// along with this program. If not, see <https://www.gnu.org/licenses/>.
1818

19-
const std = @import("std");
20-
2119
const Env = @import("../env.zig").Env;
2220
const parser = @import("../netsurf.zig");
2321
const SessionState = @import("../env.zig").SessionState;

src/browser/dom/html_collection.zig

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,10 @@ const Allocator = std.mem.Allocator;
2121

2222
const parser = @import("../netsurf.zig");
2323

24-
const utils = @import("utils.z");
2524
const Element = @import("element.zig").Element;
2625
const Union = @import("element.zig").Union;
27-
2826
const JsThis = @import("../env.zig").JsThis;
29-
3027
const Walker = @import("walker.zig").Walker;
31-
const WalkerDepthFirst = @import("walker.zig").WalkerDepthFirst;
32-
const WalkerChildren = @import("walker.zig").WalkerChildren;
33-
const WalkerNone = @import("walker.zig").WalkerNone;
3428

3529
const Matcher = union(enum) {
3630
matchByName: MatchByName,

src/browser/dom/implementation.zig

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,7 @@
1616
// You should have received a copy of the GNU Affero General Public License
1717
// along with this program. If not, see <https://www.gnu.org/licenses/>.
1818

19-
const std = @import("std");
20-
2119
const parser = @import("../netsurf.zig");
22-
const SessionState = @import("../env.zig").SessionState;
23-
24-
const Document = @import("document.zig").Document;
25-
const DocumentType = @import("document_type.zig").DocumentType;
2620
const DOMException = @import("exceptions.zig").DOMException;
2721

2822
// WEB IDL https://dom.spec.whatwg.org/#domimplementation

0 commit comments

Comments
 (0)