mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-12-16 08:18:59 +00:00
remove unimportant todos
This commit is contained in:
@@ -477,9 +477,6 @@ const PendingScript = struct {
|
|||||||
// will fail. This assertion exists to catch incorrect assumptions about
|
// will fail. This assertion exists to catch incorrect assumptions about
|
||||||
// how libcurl works, or about how we've configured it.
|
// how libcurl works, or about how we've configured it.
|
||||||
std.debug.assert(self.script.source.remote.capacity == 0);
|
std.debug.assert(self.script.source.remote.capacity == 0);
|
||||||
|
|
||||||
// @newhttp TODO: pre size based on content-length
|
|
||||||
// @newhttp TODO: max-length enfocement
|
|
||||||
self.script.source = .{ .remote = self.manager.buffer_pool.get() };
|
self.script.source = .{ .remote = self.manager.buffer_pool.get() };
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -491,7 +488,6 @@ const PendingScript = struct {
|
|||||||
// .len = data.len,
|
// .len = data.len,
|
||||||
// });
|
// });
|
||||||
|
|
||||||
// @newhttp TODO: max-length enforcement ??
|
|
||||||
try self.script.source.remote.appendSlice(self.manager.allocator, data);
|
try self.script.source.remote.appendSlice(self.manager.allocator, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -704,8 +700,6 @@ const BufferPool = struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn release(self: *BufferPool, buffer: ArrayListUnmanaged(u8)) void {
|
fn release(self: *BufferPool, buffer: ArrayListUnmanaged(u8)) void {
|
||||||
// @newhttp TODO: discard buffers that are larger than some configured max?
|
|
||||||
|
|
||||||
// create mutable copy
|
// create mutable copy
|
||||||
var b = buffer;
|
var b = buffer;
|
||||||
|
|
||||||
|
|||||||
@@ -537,6 +537,7 @@ pub const Page = struct {
|
|||||||
.timestamp = timestamp(),
|
.timestamp = timestamp(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
fn _documentIsComplete(self: *Page) !void {
|
fn _documentIsComplete(self: *Page) !void {
|
||||||
try HTMLDocument.documentIsComplete(self.window.document, self);
|
try HTMLDocument.documentIsComplete(self.window.document, self);
|
||||||
|
|
||||||
@@ -641,7 +642,8 @@ pub const Page = struct {
|
|||||||
while (try walker.get_next(root, next)) |n| {
|
while (try walker.get_next(root, next)) |n| {
|
||||||
next = n;
|
next = n;
|
||||||
const node = next.?;
|
const node = next.?;
|
||||||
const tag = (try parser.nodeHTMLGetTagType(node)) orelse continue;
|
const e = parser.nodeToElement(node);
|
||||||
|
const tag = try parser.elementTag(e);
|
||||||
if (tag != .script) {
|
if (tag != .script) {
|
||||||
// ignore non-js script.
|
// ignore non-js script.
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user