Skip to content

Lightpanda: the headless browser designed for AI and automation

zig fmt

Karl Seguinfe2f3aa8bf20
diff --git a/src/browser/webapi/ImageData.zig b/src/browser/webapi/ImageData.zig
index 8101b5632..9cdfb025f 100644
--- a/src/browser/webapi/ImageData.zig
+++ b/src/browser/webapi/ImageData.zig
@@ -42,7 +42,7 @@ pub const ConstructorSettings = struct {
pixelFormat: String = .wrap("rgba-unorm8"),
};
-pub fn init( width: u32, height: u32, maybe_settings: ?ConstructorSettings, exec: *Execution) !*ImageData {
+pub fn init(width: u32, height: u32, maybe_settings: ?ConstructorSettings, exec: *Execution) !*ImageData {
try validateDimension(width);
try validateDimension(height);
try validateSettings(maybe_settings);
@@ -186,7 +186,7 @@ pub const JsApi = struct {
///
/// We currently support only the first 2.
pub const constructor = bridge.constructor(struct {
- fn wrap(first: js.Value,second: u32,third: ?js.Value,fourth: ?ConstructorSettings,exec: *Execution) !*ImageData {
+ fn wrap(first: js.Value, second: u32, third: ?js.Value, fourth: ?ConstructorSettings, exec: *Execution) !*ImageData {
if (first.isUint8ClampedArray()) {
return initWithData(first, second, third, fourth, exec);
}
diff --git a/src/help.zon b/src/help.zon
index 7008da4f9..7c651a30a 100644
--- a/src/help.zon
+++ b/src/help.zon
@@ -465,9 +465,10 @@
\\ iframe When enabled, <iframe> elements are fully loaded.
\\
\\ image <img> sources, so that load/error reflects the real
- \\ HTTP status. Only the response headers are read;
- \\ images are never decoded, so naturalWidth and
- \\ naturalHeight stay 0. Delays the window load event.
+ \\ HTTP status. Images are never decoded: only the
+ \\ first 16KB is read, for naturalWidth and
+ \\ naturalHeight (PNG, GIF, JPEG and WebP; 0 for
+ \\ other formats). Delays the window load event.
\\
\\ stylesheet Fetch external <link rel=stylesheet> resources so
\\ their rules contribute to computed styles (and