Commit Graph

3270 Commits

Author SHA1 Message Date
Halil Durak
996837ab0c return an empty origin and protocol string if url not provided 2025-11-04 13:30:55 +03:00
Halil Durak
74a5438587 update Blob test 2025-11-04 13:07:23 +03:00
Halil Durak
1fd28cef40 add vectorized line endings scanner 2025-11-04 13:07:02 +03:00
Karl Seguin
7c825cbe82 fix segfault on http error callback 2025-11-04 10:40:53 +08:00
muki
40522d8720 Merge pull request #1192 from lightpanda-io/wpt-navigation
Some checks failed
nightly build / build-linux-x86_64 (push) Has been cancelled
nightly build / build-linux-aarch64 (push) Has been cancelled
nightly build / build-macos-aarch64 (push) Has been cancelled
nightly build / build-macos-x86_64 (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
Update wpt submodule for Navigation
2025-11-03 09:17:21 -08:00
Pierre Tachoire
2446580db9 update zig-v8 2025-11-03 17:47:35 +01:00
Karl Seguin
70e02dcfc7 Refactor the ScriptManager
This PR introduces two major changes to the ScriptManager.

1 - Simplification.
Rather than having a `Script`, `PendingScript`, `AsyncModule` and `SyncModule`,
there is only a `Script`, with an added `mode` union. All of the previous
objects had the same behavior (collect the response in a buffer), up to the
point of execution, which is where the mode comes in.

2 - Correctness
Whether or not the previous version was "incorrect", it was difficult to use
correctly. Specifically, the previous version would execute async scripts and
async modules as soon as they're done. That seems allowed, but it caused issues
with module loading in Context.js. Specifically, between compiling and
instantiating a module, or between instantiation and evaluation, an async script
or module could be evaluated. It isn't clear whether v8 allows that, but if it
does, it introduces a lot of new potential states (specifically, unexpected
changes to the v8.Module's status) that we have to handle.

This version only evaluate scripts in the `evaluate`, which doesn't allow
recursive calls (so a waitForImport, which continues to pump the HTTP loop, can
never result in `evaluate` being called again).

This undoes the change made in https://github.com/lightpanda-io/browser/pull/1158
because I do not think it's possible to have multiple waiters waiting for the
same (or even different) modules. The linked issue points to a crash in
https://www.nytimes.com which doesn't crash with this version.
2025-11-03 20:21:46 +08:00
Muki Kiboigo
235337d1c9 update wpt submodule for Navigation 2025-11-02 20:00:46 -08:00
Karl Seguin
8a867bc9c2 Merge pull request #1190 from lightpanda-io/nikneym/blob
Some checks failed
nightly build / build-linux-x86_64 (push) Has been cancelled
nightly build / build-linux-aarch64 (push) Has been cancelled
nightly build / build-macos-aarch64 (push) Has been cancelled
nightly build / build-macos-x86_64 (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
e2e-test / zig build release (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
e2e-test / cdp-and-hyperfine-bench (push) Has been cancelled
e2e-test / perf-fmt (push) Has been cancelled
zig-test / browser fetch (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
`Blob` support
2025-11-01 19:58:18 +08:00
Halil Durak
7aafab9c0a prefer js.resolvePromise helper for promise returns 2025-11-01 13:29:24 +03:00
Halil Durak
10c2d7dc87 remove unnecessary import and declaration 2025-11-01 13:28:27 +03:00
Halil Durak
9b990da7fa update Blob test 2025-10-31 17:18:33 +03:00
Halil Durak
93542c9756 support Blob.slice 2025-10-31 17:18:22 +03:00
Halil Durak
4be7fa178c support Blob.arrayBuffer
Also adds support for `ArrayBuffer` to js.zig.
2025-10-31 17:18:03 +03:00
Halil Durak
5785c147da support Blob type 2025-10-31 17:17:02 +03:00
Halil Durak
b68675bb94 update Blob test 2025-10-30 22:36:07 +03:00
Halil Durak
3307a664c4 prefer writeVec instead of writeAll + writeByte 2025-10-30 22:35:58 +03:00
Halil Durak
dd43be4818 remove method added for testing
This was only required while testing things, not an actual API.
2025-10-30 22:35:37 +03:00
Halil Durak
c491648941 implement various Blob methods
Support for `stream`, `text` and `bytes`.
2025-10-30 22:34:58 +03:00
Halil Durak
1085950b88 initial Blob support 2025-10-30 16:08:03 +03:00
Pierre Tachoire
1d91d24b12 cdp: add browser permissions noop 2025-10-28 15:02:24 +01:00
Pierre Tachoire
cc83d85542 Merge pull request #1188 from lightpanda-io/script-load-order
Some checks failed
e2e-test / zig build release (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
e2e-test / cdp-and-hyperfine-bench (push) Has been cancelled
e2e-test / perf-fmt (push) Has been cancelled
zig-test / browser fetch (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
nightly build / build-linux-x86_64 (push) Has been cancelled
nightly build / build-linux-aarch64 (push) Has been cancelled
nightly build / build-macos-aarch64 (push) Has been cancelled
nightly build / build-macos-x86_64 (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
add a test for script load order
2025-10-28 14:12:31 +01:00
Pierre Tachoire
706a87a458 keep consistent queue for inline 2025-10-28 13:12:18 +01:00
Pierre Tachoire
3ec15ad1f7 add a test for script load order 2025-10-28 13:12:18 +01:00
Karl Seguin
07e603ecda Merge pull request #1186 from lightpanda-io/defer-module
module scripts are deferred by default
2025-10-28 18:36:54 +08:00
Pierre Tachoire
52fc2c365f use getList() to pick the right queue w/ inline scripts 2025-10-28 11:23:29 +01:00
Pierre Tachoire
8f3620adf0 modules are deferred by default 2025-10-28 09:17:57 +01:00
Karl Seguin
f7abf0956f Merge pull request #1184 from lightpanda-io/usage-fix
Some checks failed
e2e-test / zig build release (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
e2e-test / cdp-and-hyperfine-bench (push) Has been cancelled
e2e-test / perf-fmt (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / browser fetch (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
add --log_filter_scopes usage
2025-10-28 10:07:34 +08:00
Karl Seguin
73217f7832 Merge pull request #1185 from lightpanda-io/fix-script-print-wait-analysis
fix printWaitAnalysis with queue name changes
2025-10-28 10:07:13 +08:00
Pierre Tachoire
52fb2010fc fix printWaitAnalysis with queue name changes 2025-10-27 17:50:30 +01:00
Pierre Tachoire
03ffcdb604 add --log_filter_scopes usage 2025-10-27 17:37:05 +01:00
Karl Seguin
20314fccec Merge pull request #1182 from lightpanda-io/navigation-file-fix
Some checks failed
e2e-test / zig build release (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
e2e-test / cdp-and-hyperfine-bench (push) Has been cancelled
e2e-test / perf-fmt (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / browser fetch (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
nightly build / build-linux-x86_64 (push) Has been cancelled
nightly build / build-linux-aarch64 (push) Has been cancelled
nightly build / build-macos-aarch64 (push) Has been cancelled
nightly build / build-macos-x86_64 (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
Fix build issues related to Navigation
2025-10-27 23:08:01 +08:00
Muki Kiboigo
018e95bea7 rename navigation.zig to navigation/root.zig 2025-10-27 07:48:22 -07:00
Pierre Tachoire
c9dc4ef57a Merge pull request #1144 from lightpanda-io/readme-mac
Some checks failed
e2e-test / zig build release (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
e2e-test / cdp-and-hyperfine-bench (push) Has been cancelled
e2e-test / perf-fmt (push) Has been cancelled
zig-test / browser fetch (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
nightly build / build-linux-x86_64 (push) Has been cancelled
nightly build / build-linux-aarch64 (push) Has been cancelled
nightly build / build-macos-aarch64 (push) Has been cancelled
nightly build / build-macos-x86_64 (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
update mac instructions to build from source
2025-10-24 09:59:27 +02:00
Pierre Tachoire
6c9d013e20 update mac instructions to build from source 2025-10-24 09:58:38 +02:00
Pierre Tachoire
d2d10d5db4 Merge pull request #1175 from lightpanda-io/readme-cdp
README: add CDP link
2025-10-24 09:57:15 +02:00
Pierre Tachoire
37a8a24528 README: add CDP link 2025-10-24 09:53:29 +02:00
Pierre Tachoire
d0b83c674c Merge pull request #1138 from lightpanda-io/navigation
add `Navigation` WebAPI
2025-10-24 09:30:09 +02:00
Pierre Tachoire
b58ff2c869 Merge pull request #1171 from lightpanda-io/cdp-lifecycle
support url on createTarget and send lifecycle events
2025-10-24 08:33:11 +02:00
Pierre Tachoire
b2e41837d9 Merge pull request #1174 from lightpanda-io/nikneym/url-can-parse
Add `URL.canParse`
2025-10-24 08:32:25 +02:00
Halil Durak
2e6ec1e23b add URL.canParse test 2025-10-23 13:31:01 +03:00
Halil Durak
7808d12de2 add URL.canParse static method 2025-10-23 13:30:39 +03:00
Halil Durak
1015fc09ee Merge pull request #1170 from lightpanda-io/nikneym/ada-in-web-apis
Some checks failed
e2e-test / zig build release (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
e2e-test / cdp-and-hyperfine-bench (push) Has been cancelled
e2e-test / perf-fmt (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / browser fetch (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
nightly build / build-linux-x86_64 (push) Has been cancelled
nightly build / build-linux-aarch64 (push) Has been cancelled
nightly build / build-macos-aarch64 (push) Has been cancelled
nightly build / build-macos-x86_64 (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
Use ada-url for URL operations in web APIs
2025-10-23 12:13:45 +03:00
Pierre Tachoire
1c37b1c70e Merge pull request #1173 from lightpanda-io/renderer-size
renderer: set a default box size of 5 pixels
2025-10-23 10:17:10 +02:00
Muki Kiboigo
28ec8d4b94 use page arena in get_sameDocument 2025-10-22 08:42:53 -07:00
Muki Kiboigo
6e42df2e71 set oncurrententrychange callback to null 2025-10-22 08:42:26 -07:00
Muki Kiboigo
6b924e8a4c use toEventTarget in NavigationEventTarget 2025-10-22 07:54:17 -07:00
Muki Kiboigo
80ae3c9fc6 not implemented on Navigation traverseTo 2025-10-22 07:54:10 -07:00
Pierre Tachoire
2422c8718c renderer: set a default box size of 5 pixels 2025-10-22 15:54:43 +02:00
Pierre Tachoire
b5ef8418a6 cdp: fix double createTarget response 2025-10-22 14:18:53 +02:00