Pierre Tachoire
fb6fbffe3f
Merge pull request #1169 from lightpanda-io/cdp-security-ignore-cert-err
...
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
cdp: implement Security.setIgnoreCertificateErrors
2025-10-21 15:15:51 +02:00
Pierre Tachoire
510c61cc20
cdp: add test for setIgnoreCertificateErrors
2025-10-21 14:08:26 +02:00
Pierre Tachoire
6915738e02
cdp: ensure no inflight conns is running before set TLS verify
2025-10-21 14:07:59 +02:00
Pierre Tachoire
4f62cc833b
http: fix VERIFY_HOST value
2025-10-21 13:47:09 +02:00
Karl Seguin
46ffb801db
Merge pull request #1168 from lightpanda-io/dom_range_fixes
...
Reverses 2 incorrect comparions
2025-10-21 19:45:32 +08:00
Pierre Tachoire
d2065f713f
cdp: implement Security.setIgnoreCertificateErrors
2025-10-21 13:44:29 +02:00
Karl Seguin
6f8c3abb55
Merge pull request #1167 from lightpanda-io/typos
...
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
correct typos (all in comments)
2025-10-21 18:09:27 +08:00
Karl Seguin
163a0e8b70
Reverses 2 incorrect comparions
...
A bit obvious when you see the "expected -1 but got 1".
Goal is to bring us over 40K passing :)
2025-10-21 18:08:05 +08:00
Karl Seguin
ca3efb3ad9
correct typos (all in comments)
2025-10-21 16:17:38 +08:00
Karl Seguin
4468932346
Merge pull request #1166 from gootik/patch-1
...
Fix typo in 'input' selector check
2025-10-21 16:04:03 +08:00
Sasan Hezarkhani
9a03ba61c5
Fix typo in 'input' selector check
...
Fix a small typo in selector check
2025-10-20 21:30:35 -07:00
Karl Seguin
fe3777041d
Merge pull request #1164 from lightpanda-io/nix_0.15.2
...
Update `flake.lock` for Zig 0.15.2
2025-10-21 08:18:46 +08:00
Muki Kiboigo
1c579a98b4
update flake.lock
2025-10-20 07:20:46 -07:00
Karl Seguin
3e10cf0a64
Merge pull request #1163 from lightpanda-io/zig_0_15_2
...
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
Upgrade to Zig 0.15.2 - no code changes
2025-10-20 17:32:59 +08:00
Karl Seguin
ef9784a7d4
Upgrade to Zig 0.15.2 - no code changes
2025-10-20 16:44:45 +08:00
Karl Seguin
6f1c3c8fd2
Merge pull request #1162 from lightpanda-io/fix_node_iterator_regression
...
Fixes the regression to node iterator
2025-10-20 16:44:11 +08:00
Karl Seguin
e12c650ea5
Fixes the regression to node iterator
...
Caused by: https://github.com/lightpanda-io/browser/pull/1149/
WPT go from 727/766 (the pre-regression value) to 744/766.
2025-10-20 16:28:07 +08:00
Karl Seguin
9373cbb440
Merge pull request #1159 from lightpanda-io/make_test_filter_compiler
...
Filter out the huge compile command when using `make test`
2025-10-20 15:36:16 +08:00
Pierre Tachoire
fd6d038956
Merge pull request #1152 from lightpanda-io/cdp-inserttext
...
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
cdp: add input.insertText
2025-10-19 18:16:00 +02:00
Karl Seguin
9845392b71
Simplify filter and try to make it work with progressive build info
2025-10-18 11:18:50 +08:00
Karl Seguin
0795b7a583
Filter out the huge compile command when using make test
...
I couldn't figure out how (or if it's possible) to do this with build.zig
2025-10-18 08:14:07 +08:00
Karl Seguin
29f0e71f10
Merge pull request #1158 from lightpanda-io/concurrent-waitformodule
...
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
handle multiple waiters for the same module
2025-10-18 07:46:30 +08:00
Karl Seguin
1a47f7b5a8
Merge pull request #1157 from lightpanda-io/rootNode_composed
...
support the composed option of getRootNode()
2025-10-18 07:44:38 +08:00
Karl Seguin
6a30ab7a57
Merge pull request #1156 from lightpanda-io/report_error
...
add window.reportError
2025-10-18 07:44:24 +08:00
Karl Seguin
758f7deb93
Merge pull request #1155 from lightpanda-io/composition_event
...
add CompositionEvent
2025-10-18 07:44:13 +08:00
Pierre Tachoire
9f4e3bf792
add a shared boolean to GetResult to avoid deinit
2025-10-17 18:02:21 +02:00
Pierre Tachoire
a5dfe8ab28
handle multiple waiters for the same module
2025-10-17 17:49:56 +02:00
Karl Seguin
c52dce1c48
Merge pull request #1154 from lightpanda-io/module_evalute_error_handling
...
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
Handle (log) module evaluation errors directly
2025-10-16 19:26:14 +08:00
Karl Seguin
288379aa7d
support the composed option of getRootNode()
2025-10-16 19:08:33 +08:00
Karl Seguin
a9739bf361
add window.reportError
2025-10-16 18:33:18 +08:00
Karl Seguin
c69adcb163
add CompositionEvent
2025-10-16 15:57:37 +08:00
Karl Seguin
0b4a1b4a1b
Handle (log) module evaluation errors directly
...
Some module evluation errors aren't handled by the normal TryCatch mechanism.
Instead, the exception needs to be retrieved directly from the module.
2025-10-16 15:10:30 +08:00
Karl Seguin
cc0c1bcf3a
Merge pull request #1153 from lightpanda-io/normalized_specifier_lifetime
...
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
Fix a potential segfault on log message for failing to load module
2025-10-16 15:01:50 +08:00
Karl Seguin
55746f1a1d
log the normalized specifier now that we've extended its lifetime to the page.arena
2025-10-16 14:34:07 +08:00
Karl Seguin
7bb8581a95
Fix referrer in log (was printing using the src instead :/)
2025-10-16 14:31:09 +08:00
Karl Seguin
521c0f8460
Fix a potential segfault on log message for failing to load module
...
Using the `call_arena` here is unsafe in the case of a failure. It's possible
for the call_arena to be reset during module processing, making the log crash.
The issue is that the lifetime of a URL is often conditional. If the stitched
URL has already been seen (i.e. is in the module_cache), then it can be short-
lived. EXCEPT, URL.stitch might require an allocation..and then you start to
think, well, if URL.stitch is going to allocate anyways...If we stitch with
the `page.arena`, and end up not needing a long lifetime, we've wasted memory.
If we stitch with `page.call_arena` and end up needing a long lifetime, we need
to dupe.
It's a bit messy, and I'd like to take a stab at improving it after:
https://github.com/lightpanda-io/browser/pull/1127 .
I'm thinking that we need a URL intern pool. HashMap with a composite key of
base + path -> resolved. Then all URLs are resolved using the page.arena, but
we don't have any duplicates, so it isn't wasteful.
2025-10-16 14:15:38 +08:00
Pierre Tachoire
14a23123c0
add Document.hasFocus placeholder
2025-10-15 15:34:06 +02:00
Pierre Tachoire
09be5e23f1
add input.select placeholder
2025-10-15 15:32:27 +02:00
Pierre Tachoire
0aaed08c1e
cdp: add input.insertText
2025-10-15 13:52:21 +02:00
Karl Seguin
4bfe3b6fe1
Merge pull request #1151 from lightpanda-io/unicode_nbsp_encoding
...
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
Encode UTF8 non breaking space (194, 160) as - same as chrome
2025-10-15 18:28:45 +08:00
Karl Seguin
b610aa1c0c
Encode UTF8 non breakingspace (194, 160) as - same as chrome
2025-10-15 17:34:23 +08:00
Karl Seguin
73da04bea2
Merge pull request #1150 from lightpanda-io/isdone-async
...
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
isDone must be run after script's deinit
2025-10-15 15:58:42 +08:00
Karl Seguin
18c851e53f
Merge pull request #1149 from lightpanda-io/iterators_and_walker_fix
...
Improve correctness of NodeIterator and Treewalker
2025-10-15 15:58:12 +08:00
Pierre Tachoire
41f4533bc0
isDone must be run after script's deinit
2025-10-15 09:50:17 +02:00
Karl Seguin
4db8a967b6
update netsurf deps
2025-10-15 14:35:58 +08:00
Karl Seguin
ff70f4e79f
Merge pull request #1147 from lightpanda-io/svg_tag_name_test
...
Add tests for svg tag names
2025-10-15 09:47:07 +08:00
Karl Seguin
c9517aff7d
Add tests for svg tag names
...
Depends on: https://github.com/lightpanda-io/libdom/pull/46
2025-10-15 09:37:56 +08:00
Karl Seguin
3657a49a2c
Improve correctness of NodeIterator and Treewalker
...
In their current implementation, both the NodeIterator and TreeWalker would
skip over ignored nodes. However, while the node itself should have been ignored
its children should still be iterated.
For example, when going over:
```
<div id="container">
<!-- comment1 -->
<span>
<!-- comment2 -->
</span>
</div>
```
With `SHOW_COMMENT`, the previous version would completely skip over `container`
and its children. Now the code still won't emit the `container` div itself,
it will still iterate through its children (and thus emit the two comments).
This change relates to ongoing react compatibility.
2025-10-15 09:23:54 +08:00
Karl Seguin
71e7aa5262
Merge pull request #1146 from lightpanda-io/test_normalized_text_nodes
...
add a test for the changes to parsing adjascent text ndoes
2025-10-15 08:13:52 +08:00
Karl Seguin
2e435f5d4e
Merge pull request #1145 from lightpanda-io/page_events
...
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
Fire page lifecycle events when all scripts are either inline or async
2025-10-14 19:48:59 +08:00
Karl Seguin
859b03c4a6
update libdom and libhubbub
2025-10-14 19:46:21 +08:00
Karl Seguin
ee8786444f
add another test
2025-10-14 13:48:23 +08:00
Karl Seguin
d87d782fd5
Merge pull request #1137 from lightpanda-io/profiler
...
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
Expose v8 CpuProfiler + add fast properties for some window properties
2025-10-14 05:45:31 +08:00
Karl Seguin
afac4fc37f
add a test for the changes to parsing adjascent text ndoes
2025-10-14 00:23:35 +08:00
Karl Seguin
de83521e08
Fire page lifecycle events when all scripts are either inline or async
...
This is how, for example, scripts on lightpanda.io are. Though fixing this
doesn't really change anything, it's good to make sure these events are firing
correctly.
2025-10-13 21:53:58 +08:00
Karl Seguin
99f8fe1592
Merge pull request #1139 from lightpanda-io/inspector-deinit
...
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
cdp: drain microtasks before inspector deinit
2025-10-11 08:14:37 +08:00
Pierre Tachoire
02c092a122
Merge pull request #1140 from lightpanda-io/invalid-errdefer
...
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
remove invalid errdefer
2025-10-10 18:54:16 +02:00
Pierre Tachoire
70ca74747f
remove invalid errdefer
2025-10-10 18:09:57 +02:00
Pierre Tachoire
594d754022
cdp: drain microtasks before inspector deinit
2025-10-10 17:43:08 +02:00
Karl Seguin
c381e4153d
Expose v8 CpuProfiler + add fast properties for some window properties
...
First, this exposes the v8 Profiler. Right now it's just a commented-out block
in `fetch` and meant for internal debugging.
Depends on: https://github.com/lightpanda-io/zig-v8-fork/pull/105
Use postAttach on Window to attach "static" properties. This comes from
profiling (lightpanda.io) and seeing window.get_self called tens of thousands
of times.
2025-10-10 19:51:29 +08:00
Halil Durak
e761c7e8f4
Merge pull request #1115 from lightpanda-io/nikneym/url-changes
...
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
Small URL & Location changes
2025-10-10 10:54:47 +03:00
Halil Durak
b8d4e3ac50
change after rebase
2025-10-10 10:43:04 +03:00
Halil Durak
4c2b95d00b
always prefer navigateFromWebAPI when navigating from a web API
2025-10-10 10:40:11 +03:00
nikneym
cea4f052ba
location: add href setter
...
* `page.navigateFromWebAPI` seem to be not working while testing; `page.navigate` is preferred instead.
2025-10-10 10:40:11 +03:00
nikneym
9b4ea7a040
add an invalid url test
...
* this test should not pass; it's related to implementation of `std.Uri` though.
2025-10-10 10:40:10 +03:00
nikneym
26c2b258b4
get_protocol: don't allocate for protocol string
2025-10-10 10:40:04 +03:00
Halil Durak
27c9e18535
Merge pull request #1134 from lightpanda-io/nikneym/default-location
...
Location: prefer `about:blank` when not navigated yet
2025-10-10 10:33:36 +03:00
Pierre Tachoire
b53c2bfa0c
Merge pull request #1135 from lightpanda-io/importmap
...
Importmap support
2025-10-10 09:33:23 +02:00
Pierre Tachoire
80605633c4
update wpt
2025-10-10 08:46:06 +02:00
Pierre Tachoire
acf06fdd8f
Resolve importmap against page's url
...
Co-authored-by: Karl Seguin <karlseguin@users.noreply.github.com >
2025-10-10 08:34:56 +02:00
Pierre Tachoire
58cc5b4684
typo fix
2025-10-10 08:02:45 +02:00
Karl Seguin
c502bd901e
Merge pull request #1136 from lightpanda-io/update_libdom
...
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
Update libdom
2025-10-10 13:15:11 +08:00
Karl Seguin
55027747fd
Update libdom
...
Apply case-preservation on all SVG elements.
2025-10-10 12:46:27 +08:00
Karl Seguin
f6d77afe2e
Merge pull request #1130 from lightpanda-io/intersection_observer
...
Rework IntersectionObserver
2025-10-10 11:10:08 +08:00
Pierre Tachoire
cd9466dafa
free importmap on reset and don't retain capacity
2025-10-09 16:30:29 +02:00
Pierre Tachoire
4bf79e4bc9
add importmap support
2025-10-09 16:09:25 +02:00
Pierre Tachoire
7afecf0f85
move mod specifier resolution js/context => script manager
2025-10-09 16:09:24 +02:00
Halil Durak
0b38b7d473
location: prefer about:blank when not navigated yet
2025-10-09 16:55:05 +03:00
Karl Seguin
1b462da4aa
Merge pull request #1133 from lightpanda-io/nikneym/cookie-validation
...
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
Add a fast path for validating cookie strings
2025-10-09 20:25:52 +08:00
Halil Durak
07948304b2
fix misleading comment
...
Co-authored-by: Karl Seguin <karlseguin@users.noreply.github.com >
2025-10-09 14:00:39 +03:00
Halil Durak
0634acdac4
add a fast path for validating cookie strings
...
This prefers `suggestVectorLength` in order to pick a vector size; for cookie strings shorter than, say 64, this might cause it to fallback to slow path on architectures that support larger vector sizes (like AVX-512). We may also add checks for smaller vector sizes if desired in the future.
2025-10-09 12:03:14 +03:00
Karl Seguin
75e0637d2d
Ensure page background tasks are re-registered on reset
2025-10-09 16:29:09 +08:00
Karl Seguin
852c30b2e5
Rework IntersectionObserver
...
1 - Always fire the callback on the next tick. This is probably the most
important change, as frameworks like React don't react well if the callback is
fired immediately (they expect to continue processing the page in its current
state, not in the mutated state from the callback)
2 - Always fire the callback for observed elements with a parent, whether or
not those intersect or are connected. From MDN, the callback is fired
"The first time the observer is initially asked to watch a target element."
3 - Add a mutation observer so that if a node is added to the root (or removed)
the callback is fired. This, I think, is the best we can currently do for
"intersection".
2025-10-09 14:17:03 +08:00
Karl Seguin
dc85c6552a
Merge pull request #1132 from lightpanda-io/reduce_http_tick_blocking
...
Remove potential processing blocking with CDP
2025-10-09 14:14:05 +08:00
Karl Seguin
76e8506022
Remove potential processing blocking with CDP
...
When using CDP, we poll the HTTP clients along with the CDP socket. Because this
polling can be long, we first process any pending message. This can end up
processing _all_ messages, in which case the poll will block for a long time.
This change makes it so that when the initial processing processes 1+ message,
we do not poll, but rather return. This allows the page lifecycle to be
processed normally (and not just blocking on poll, waiting for the CDP client
to send data).
2025-10-09 13:18:47 +08:00
Karl Seguin
2d6e2551f6
Merge pull request #1131 from lightpanda-io/microtask-queue-drain
...
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
drain micro task queue before reset ExecutionWorld and page
2025-10-09 08:36:26 +08:00
Pierre Tachoire
080b1d9a7c
drain micro task queue before reset ExecutionWorld and page
2025-10-08 13:55:17 +02:00
Karl Seguin
fe008b0966
Merge pull request #1128 from lightpanda-io/console_trace_svg_test
...
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
Add console.trace and svg attribute test
2025-10-08 00:25:20 +08:00
Karl Seguin
4ad10d057b
Add console.trace and svg attribute test
...
update to latest libdom
2025-10-07 22:26:38 +08:00
Karl Seguin
a65aa9f312
Merge pull request #1126 from lightpanda-io/add_debug_context
...
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
Attempt to add more context to debug logs.
2025-10-06 17:48:41 +08:00
Karl Seguin
5b43c16f35
Merge pull request #1125 from lightpanda-io/call_arena
...
Move the call_arena to the page.
2025-10-06 17:22:41 +08:00
Karl Seguin
9cb37dc011
Attempt to add more context to debug logs.
...
1 - On `unkown global property`, include the stack trace (this might be WAY too
verbose)
2 - On script get, include stack trace (when available)
3 - On script get, include referrer
4 - Stack traces will now include the script name/src when available
2025-10-06 16:56:54 +08:00
Karl Seguin
2ba6737c41
Merge pull request #1119 from lightpanda-io/cdp_log_entry
...
Emit Log.addEntry
2025-10-06 16:45:48 +08:00
Karl Seguin
33d737f957
Merge pull request #1123 from lightpanda-io/blocking_scripts
...
Remove the single-blocking-import restrictions
2025-10-06 15:57:29 +08:00
Karl Seguin
381a18a40e
Move the call_arena to the page.
...
The call_arena was previously owned by the js.Context, but it has to exist on
the page, and the page is created before the context, so it's set to undefined
on the page. While this has never caused an issue, there's no reason for the
page not to own this, and the context to simply reference it.
Also, renamed the js.Context.context_arena to simply `arena`, which is more
consistent with other arena names (e.g. page.arena).
2025-10-06 15:52:56 +08:00
Karl Seguin
207f0655dd
Merge pull request #1117 from lightpanda-io/cleanup_js
...
This is the last of the big changes to the js code
2025-10-06 15:33:21 +08:00
Karl Seguin
88d64da257
Merge pull request #1124 from lightpanda-io/brotli
...
Supports brotli compression
2025-10-06 14:33:25 +08:00
Karl Seguin
cf378dfd6d
add brotli include path
2025-10-06 12:39:30 +08:00
Karl Seguin
a3939d9a66
Supports brotli compression
...
Adds bortli as a submodules, and compiles the decoder, making it available to
libcurl.
Some websites appear to sent brotli encoded responses even though we don't
advertise support for it (e.g. https://movie.douban.com ).
2025-10-06 12:30:06 +08:00
Karl Seguin
ef363209a4
Remove the single-blocking-import restrictions
...
Remove the is_blocking variable (and checks) from the ScriptManager. This is a
holdover to when blocking imports had a dedicated connections, and thus couldn't
be loaded concurrently.
This changes two obvious things (and probably a few subtle ones). The first is
that plain async scripts are now free to be executed as soon as they are
completed. As far as I can tell, this is a safe behavior, is simpler and should
be a bit faster.
More importantly, it allows for chains of imports. normal import (A) -> dynamic
import (B) -> normal import (C). This would previously fail an assertion. The
superficial issue was that dynamic import handling didn't respect the
`is_blocking` flag. But if we did respect it, than module B would never be able
to load module C, which would block module A from ever completing. By removing
the flag, module C will now be properly evaluated, which unblocks module B which
allows module A to unblock.
(1) I believe this is the issue seen here:
https://github.com/lightpanda-io/browser/issues/1121
2025-10-06 09:48:57 +08:00
Karl Seguin
fe9a10c617
Emit Log.addEntry
...
Currently, this hooks a single log.Interceptor into the logging framework, but
changing it to take a list shouldn't be too hard. Biggest issue is who will own
it, as we'd need an allocator to maintain a list / lookup (which log doesn't
currently have).
Uses logFmt format, and, for now, always filters out debug messages and a few
particularly verbose scopes.
2025-10-03 17:29:01 +08:00
Karl Seguin
2e734fae57
This is the last of the big changes to the js code
...
This Pr largely tightens up a lot of the code. 'v8' is no longer imported
outside of js. A number of helper functions have been moved to the js.Context.
For example, js.Function.getName used to call:
```zig
return js.valueToString(allocator, name, self.context.isolate, self.context.v8_context);
```
It now calls:
```zig
return self.context.valueToString(name, .{ .allocator = allocator });
```
Page.main_context has been renamed to `Page.js`. This, in combination with new
promise helpers, turns:
```zig
const resolver = page.main_context.createPromiseResolver();
try resolver.resolve({});
return resolver.promise();
```
into:
```zig
return page.js.resolvePromise({});
```
2025-10-03 15:06:16 +08:00
Karl Seguin
432e3c3a5e
Merge pull request #1118 from lightpanda-io/inspector_linking
...
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
Make sure inspector implementation is always exported
2025-10-03 14:10:47 +08:00
Karl Seguin
a4b13a80ce
fix sloppiness
2025-10-03 13:50:53 +08:00
Karl Seguin
a6997a7e85
Make sure inspector implementation is always exported
2025-10-03 13:32:03 +08:00
Karl Seguin
a60d06af6b
Merge pull request #1114 from lightpanda-io/extract_js_structs_to_files
...
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
wpt / web platform tests json output (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
Start extract JS structs into their own files
2025-10-03 09:54:21 +08:00
Karl Seguin
dab8012b6a
Start extract JS structs into their own files
...
Renames JsContext -> js.Context, JsObject -> js.Object and JsThis -> js.This
which is more consistent with the other types. The JsObject -> js.Object is
the reason so many files were touched.
This is still a [messy] transition, with more refactoring planned to clean it
up.
2025-10-02 12:48:50 +08:00
Karl Seguin
66f82fd9cc
Merge pull request #1109 from lightpanda-io/remove_generic_js
...
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
Remove the generic nature of Env and most of the JS classes
2025-10-02 10:58:34 +08:00
Karl Seguin
0bff8ba632
Merge pull request #1113 from lightpanda-io/url-stitch-fix
...
Fix URL `stitch` Issue with parent traversal
2025-10-02 10:21:23 +08:00
Karl Seguin
32226297ab
Remove the generic nature of Env and most of the JS classes
...
Back in the zig-js-runtime days, globals were used for the state and webapi
declarations. This caused problems largely because it was done across
compilation units (using @import("root")...).
The generic Env(S, WebApi) was used to solve these problems, while still making
it work for different States and WebApis.
This change removes the generics and hard-codes the *Page as the state and
only supports our WebApis for the class declarations.
To accommodate this change, the runtime/*tests* have been removed. I don't
consider this a huge loss - whatever behavior these were testing, already
exists in the browser/**/*.zig web api.
As we write more complex/complete WebApis, we're seeing more and more cases
that need to rely on js objects directly (JsObject, Function, Promises, etc...).
The goal is to make these easier to use. Rather than using Env.JsObject, you
now import "js.zig" and use js.JsObject (TODO: rename JsObject to Object).
Everything is just a plain Zig struct, rather than being nested in a generic.
After this change, I plan on:
1 - Renaming the js objects, JsObject -> Object. These should be referenced in
the webapi as js.Object, js.This, ...
2 - Splitting the code across multiple files (Env.zig, Context.zig,
Caller.zig, ...)
2025-10-02 10:16:58 +08:00
Karl Seguin
ab18c90b36
Merge pull request #1112 from lightpanda-io/window_scroll
...
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
Improve window scroll
2025-10-02 09:22:39 +08:00
Karl Seguin
27b6fd561a
Merge pull request #1104 from lightpanda-io/fetch_wait
...
Add Session.fetchWait so that 'fetch' mode will follow navigation
2025-10-02 09:22:29 +08:00
Karl Seguin
15b64d5a25
Improve window scroll
...
scroll alias for scrollTo
add get_scrollX and get_scrollY, along with their aliases: pageXOffset and
pageYOffset. These always return 0, unless scroll or scrollTo are called.
2025-10-01 18:41:56 +08:00
Karl Seguin
08a50a8ada
Merge pull request #1110 from lightpanda-io/telemetry_leak
...
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
Fixes a 'leak' with telemetry
2025-10-01 17:29:59 +08:00
Karl Seguin
9d172bb29d
Fixes a 'leak' with telemetry
...
This is just something that isn't cleaned up on exit, so it isn't a "leak",
but better to be explicit with the free.
2025-10-01 16:41:20 +08:00
Karl Seguin
c891322129
Merge pull request #1108 from lightpanda-io/wpt_panic_handler
...
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 custom panic handler to printt which file caused a panic
2025-10-01 15:04:24 +08:00
Muki Kiboigo
77434850f7
url traverse down to the root
2025-09-30 22:13:25 -07:00
Karl Seguin
69b65dbd41
Add custom panic handler to printt which file caused a panic
2025-10-01 11:24:41 +08:00
Karl Seguin
c335a545a3
Merge pull request #1107 from lightpanda-io/mutation_observer_improvement
...
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 correct 'this' on MutationObserver callback
2025-10-01 08:44:07 +08:00
Karl Seguin
5bcccec610
Merge pull request #1103 from lightpanda-io/text_decode_view
...
Text decode view
2025-10-01 08:42:54 +08:00
Karl Seguin
20ae9c3a53
fix dep link
2025-09-30 21:41:08 +08:00
Karl Seguin
92ca7c5a4b
update zig-v8-form
2025-09-30 19:47:41 +08:00
Karl Seguin
37fa41b4a2
fix buffer ranges
2025-09-30 19:47:41 +08:00
Karl Seguin
298f959e13
Add broken TextDecoder test that should pass
2025-09-30 19:47:26 +08:00
Karl Seguin
1cb431f204
Better support for Uint8Array in ReadableStream
...
There's always going to be ambiguity between a string and a Uint8Array. We
already had TypedArray(u8) as a discriminator when _returning_ values. But now
the type is also used by mapping JS values to Zig. To support this efficiently
when probing the union, the typed array mapping logic was extracted into its
own function (so that it can be used by the probe).
2025-09-30 19:47:22 +08:00
Karl Seguin
74dc7b278b
Merge pull request #1105 from lightpanda-io/fix_bad_window_test
...
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
fix typo and wrong API in window test
2025-09-30 19:44:10 +08:00
Karl Seguin
b47d8a794c
Use correct 'this' on MutationObserver callback
...
Add support for MutationObserver.disconnect
2025-09-30 19:36:06 +08:00
Halil Durak
eaf845959c
Merge pull request #1106 from lightpanda-io/nikneym/window-onload-fix
...
Don't allow object to be set on `window.onload`
2025-09-30 14:12:01 +03:00
Karl Seguin
651521d346
Merge pull request #1102 from lightpanda-io/readable_stream_uint8array
...
Better support for Uint8Array in ReadableStream
2025-09-30 19:03:46 +08:00
nikneym
fb37b29671
don't allow object to be set on window.onload
2025-09-30 12:38:08 +03:00
Karl Seguin
2ecf9016ba
Better support for Uint8Array in ReadableStream
...
There's always going to be ambiguity between a string and a Uint8Array. We
already had TypedArray(u8) as a discriminator when _returning_ values. But now
the type is also used by mapping JS values to Zig. To support this efficiently
when probing the union, the typed array mapping logic was extracted into its
own function (so that it can be used by the probe).
2025-09-30 16:32:55 +08:00
Karl Seguin
444b08be32
fix typo and wrong API in window test
2025-09-30 16:28:47 +08:00
Karl Seguin
2b84712eee
Add Session.fetchWait so that 'fetch' mode will follow navigation
2025-09-30 13:36:05 +08:00
Karl Seguin
20cb6cdd8b
Merge pull request #1091 from lightpanda-io/concurrent_blocking_imports
...
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
Concurrent blocking imports
2025-09-30 12:30:42 +08:00
Karl Seguin
477a5e5338
Merge pull request #1088 from lightpanda-io/nonblocking_dynamic_imports
...
nonblocking dynamic imports
2025-09-30 12:30:31 +08:00
Karl Seguin
2a151229cb
Merge pull request #1101 from lightpanda-io/nikneym/window-onload
...
Add `window.onload` getter and setter
2025-09-30 09:15:40 +08:00
nikneym
1d50e091c7
add window.onload test
2025-09-29 14:45:47 +03:00
nikneym
c587e380a0
add window.onload getter and setter
2025-09-29 14:45:35 +03:00
Karl Seguin
54f9bfba84
Merge pull request #1099 from lightpanda-io/nikneym/qol-changes
...
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
Small changes
2025-09-29 17:39:32 +08:00
Karl Seguin
489ba131c5
Merge pull request #1097 from lightpanda-io/check_visibility_opts
...
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 missing checkVisibility options
2025-09-29 15:18:10 +08:00
Karl Seguin
5eac1a146f
Merge pull request #1098 from lightpanda-io/html_collection_indexed_accessor
...
Replace HTMLCollection postAttach's with indexed/named getter
2025-09-29 15:17:57 +08:00
Karl Seguin
d7ce6bdeff
Replace HTMLCollection postAttach's with indexed/named getter
...
This solves two issues. First, it's more correct, the indexers should be live.
Second, it makes sure that anything with an HTMLCollection prototype, like
HTMLOptionsCollection, also gets access to the index getters.
We could solve the 2nd issue by making `postAttach` work up the prototype
chain, but since postAttach is wrong (not live), I prefer this solution.
2025-09-29 14:03:59 +08:00
Karl Seguin
e88473d090
add missing checkVisibility options
2025-09-29 12:04:11 +08:00
nikneym
b9024ab032
set_innerHTML: simpler iteration
2025-09-26 15:38:23 +03:00
nikneym
98906be0f6
parseData: remove iterator variant
2025-09-26 15:38:22 +03:00
Pierre Tachoire
220775715d
Merge pull request #1094 from lightpanda-io/wpt-debug
...
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
ci: use debug mode for WPT tests
2025-09-26 13:54:17 +02:00
Pierre Tachoire
ecbf52157b
ci: use debug mode for WPT tests
2025-09-26 13:33:13 +02:00
Pierre Tachoire
a579977f66
Merge pull request #1086 from lightpanda-io/history
...
Implement `History` WebAPI.
2025-09-26 12:15:07 +02:00
Karl Seguin
418dc6fdc2
Start downloading all synchronous imports ASAP
...
This changes how non-async module loading works. In general, module loading
is triggered by a v8 callback. We ask it to process a module (a <script type=
module>) and then for every module that it depends on, we get a callback. This
callback expects the nested v8.Module instance, so we need to load it then and
there (as opposed to dynamic imports, where we only have to return a promise).
Previously, we solved this by issuing a blocking HTTP get in each callback. The
HTTP loop was able to continuing downloading already-queued resources, but if
a module depended on 20 nested modules, we'd issue 20 blocking gets one after
the other.
Once a module is compiled, we can ask v8 for a list of its dependent module. We
can them immediately start to download all of those modules. We then evaluate
the original module, which will trigger our callback. At this point, we still
need to block and wait for the response, but we've already started the download
and it's much faster. Sure, for the first module, we might need to wait the same
amount of time, but for the other 19, chances are by the time the callback
executes, we already have it downloaded and ready.
2025-09-26 15:38:50 +08:00
Karl Seguin
2aa4b03673
try to cleanup persisted references
2025-09-26 15:34:32 +08:00
Karl Seguin
f236a65a79
Merge pull request #1092 from lightpanda-io/nikneym/insert-adjacent-html
...
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
Support `Element#insertAdjacentHTML`
2025-09-26 14:51:08 +08:00
nikneym
f7b08a1160
prefer orelse return instead of orelse unreachable
2025-09-26 09:43:30 +03:00
Karl Seguin
eed10dd1bb
Apply suggestions from code review
...
fix typos
Co-authored-by: Pierre Tachoire <pierre@lightpanda.io >
2025-09-26 10:37:31 +08:00
Muki Kiboigo
9992bd0999
clean up history api
2025-09-25 12:33:30 -07:00
nikneym
6912175e7e
prefer $ instead of document.querySelector
2025-09-25 19:30:10 +03:00
nikneym
a59c32757e
assert that nodes exist
2025-09-25 19:29:44 +03:00
nikneym
2438a0e60b
fix comment
2025-09-25 19:17:08 +03:00
nikneym
a850a902ce
make sure parent is not Document in beforebegin and afterend
2025-09-25 15:04:26 +03:00
nikneym
b7ba993ba6
improve insertAdjacentHTML test
2025-09-25 14:42:58 +03:00
nikneym
3eb0d57d5b
correct element insertation in insertAdjacentHTML
...
* also DRY since the loop is repeated multiple times.
2025-09-25 14:41:50 +03:00
Karl Seguin
6bf2ff9168
Protect against context changing during module resolution.
2025-09-25 13:39:02 +08:00
Karl Seguin
92226a8d06
Merge pull request #1090 from lightpanda-io/script_data_url_test
...
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
add script dataurl test
2025-09-25 10:15:47 +08:00
Karl Seguin
134424dfdc
add script dataurl test
2025-09-25 08:18:59 +08:00
Karl Seguin
58ceb66452
Merge pull request #1089 from lightpanda-io/fix-datauri
...
fix data uri scripts
2025-09-25 08:15:36 +08:00
nikneym
902b8fc789
add insertAdjacentHTML test
2025-09-24 20:26:05 +03:00
nikneym
923491a510
make ref_node of nodeInsertBefore nullable
2025-09-24 20:21:48 +03:00
nikneym
255b45d07b
initial insertAdjacentHTML attempt
2025-09-24 20:21:08 +03:00
Pierre Tachoire
8f68b5b289
fix data uri scripts
2025-09-24 17:29:23 +02:00
Karl Seguin
252fd78473
remove duplicate put, add more assertions
2025-09-24 22:44:46 +08:00
Karl Seguin
b692c5db60
nonblocking dynamic imports
...
Allows dynamic imports to be loading asynchronously. I know reddit isnt the
best example, since it doesn't fully load, but this reduced the load time from
~7.2s to ~4.8s.
2025-09-24 22:28:22 +08:00
Pierre Tachoire
eff7d58f4b
Merge pull request #1087 from lightpanda-io/fix-beyboardevent
...
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 pointer parameter into KeyboardEvent contructor
2025-09-24 09:56:47 +02:00
Pierre Tachoire
17e9bdf8e8
fix pointer parameter into MouseEvent contructor
2025-09-24 09:40:24 +02:00
Pierre Tachoire
22d2694b71
fix pointer parameter into KeyboardEvent contructor
2025-09-24 09:29:37 +02:00
Muki Kiboigo
e74d7fa454
add popstate event for History
2025-09-24 00:22:20 -07:00
Muki Kiboigo
464f42a121
add history tests
2025-09-24 00:21:16 -07:00
Muki Kiboigo
05e7079178
functional history WebAPI
2025-09-24 00:21:16 -07:00
Muki Kiboigo
f03fcc9a31
support for returning Env.Value
2025-09-24 00:21:16 -07:00
Muki Kiboigo
c3ad054bb3
add toJson object and fromJson value
2025-09-24 00:21:16 -07:00
Karl Seguin
202e137d77
Merge pull request #1084 from lightpanda-io/slotchange
...
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
Dispatch slotchange event
2025-09-24 09:23:28 +08:00
Karl Seguin
6b35664e37
Merge pull request #1079 from lightpanda-io/dynamic_import_caching
...
Dynamic import caching
2025-09-24 09:23:16 +08:00
Karl Seguin
1a7dbd56ac
Dispatch slotchange event
...
The first time a `slotchange` event is registered, we setup a SlotChangeMonitor
on the page. This uses a global (ugh) MutationEvent to detect slot changes.
We could improve the perfomance of this by installing a MutationEvent per
custom element, but a global is obviously a lot easier.
Our MutationEvent currently fired _during_ the changes. This is problematic
(in general, but specifically for slotchange). You can image something like:
```
slot.addEventListener('slotchange', () => {
// do something with slot.assignedNodes()
});
```
But, if we dispatch the `slotchange` during the MutationEvent, assignedNodes
will return old nodes. So, our SlotChangeMonitor uses the page scheduler to
schedule dispatches on the next tick.
2025-09-23 17:41:05 +08:00
Karl Seguin
1a40853aae
Merge pull request #1082 from lightpanda-io/response_type
...
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
Set Response.type to basic on same-origin requests
2025-09-23 14:23:16 +08:00
Karl Seguin
6bad2b16e4
Set Response.type to basic on same-origin requests
2025-09-23 11:35:51 +08:00
Karl Seguin
db166b4633
Merge pull request #1081 from lightpanda-io/nikneym/link-rel
...
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
Add `rel` property to `HTMLLinkElement`
2025-09-22 22:35:34 +08:00
nikneym
71bc624a74
add a link element test
2025-09-22 16:35:06 +03:00
nikneym
907a941795
add rel setter to HTMLLinkElement
2025-09-22 16:34:37 +03:00
Pierre Tachoire
559783eed7
Merge pull request #1080 from lightpanda-io/bump-netsurf
...
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
update libdom version
2025-09-22 14:26:24 +02:00
nikneym
68585c8837
add rel getter to HTMLLinkElement
2025-09-22 15:08:07 +03:00
Pierre Tachoire
eccbc9d9b3
update libdom version
2025-09-22 11:19:28 +02:00
Karl Seguin
e7d1d55170
update zig-v8-fork
2025-09-22 15:19:28 +08:00
Karl Seguin
f04754c254
Correct dynamic module loading/caching
...
Refactors some of the module loading logic. Both normal modules import and
dynamic module import now share more of the same code - they both go through
the slightly modified `module` function.
Dynamic modules now check the cache first, before loading, and when cached,
resolve the correct promise. This can now happen regardless of the module
loading state.
Also tried to replace some page arenas with call arenas and added some basic
tests for both normal and dynamic module loading.
2025-09-22 15:15:00 +08:00
Karl Seguin
a8e5a48b87
Merge pull request #1074 from lightpanda-io/cdp-nodeid
...
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
cdp: start nodeId from 1 instead of 0
2025-09-20 07:21:20 +08:00
Pierre Tachoire
283a9af406
cdp: start nodeId from 1 instead of 0
...
chromedp expects the nodeId starts to 1.
A start to 0 make it enter in infinite loop b/c it expects the Go's
default int, ie 0, to be nil from a map to stop the loop.
If the 0 index is set, it will loop...
2025-09-19 17:58:37 +02:00
Karl Seguin
e3896455db
Merge pull request #1073 from lightpanda-io/increase_mimalloc_get_rss_buffer
...
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
Seems 4K isn't always enough
2025-09-19 19:38:28 +08:00
Karl Seguin
5e6d2700a2
Merge pull request #1070 from lightpanda-io/dump_strip_mode
...
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
Replace --noscript with more advanced --strip_mode
2025-09-19 19:25:06 +08:00
Karl Seguin
dfd0dfe0f6
Seems 4K isn't always enough
2025-09-19 19:22:02 +08:00
Pierre Tachoire
e6b9be5020
Merge pull request #1072 from lightpanda-io/assert_corretly_set_exit_when_done
...
Ensure extra_socket can't happen when exit_when_done == true
2025-09-19 12:20:33 +02:00
Pierre Tachoire
6f7c87516f
Merge pull request #1067 from lightpanda-io/more_testing_metrics
...
Add libdom RSS and v8 total_physical_size to testing --json output
2025-09-19 12:16:47 +02:00
Pierre Tachoire
516a78326d
Merge pull request #1066 from lightpanda-io/nikneym/relaxed-post-message
...
Relaxed `MessagePort.postMessage`
2025-09-19 11:14:35 +02:00
Karl Seguin
853b7f84ef
Ensure extra_socket can't happen when exit_when_done == true
...
exit_when_done is pretty much a sneaky way to get CDP knowledge into the page.
exit_when_done == true means "this isn't a CDP session".
extra_socket is another sneaky weay to get CDP knowledge into the page. When
we get an `extra_socket` message it means "Return control to the CDP server".
Therefore it should be impossible to get an `extra_socket` message (return to
CDP) when `exit_when_done == true` (this isn't a CDP session).
2025-09-19 16:59:36 +08:00
Karl Seguin
b248a2515e
Merge pull request #1071 from lightpanda-io/nikneym/element-dir
...
Add `element.dir` getter & setter
2025-09-19 16:51:32 +08:00
nikneym
6826c42c65
check for correct dir in HTML elements
2025-09-19 11:30:15 +03:00
nikneym
4f041e48a3
make sure dir attribute is parsed if provided
2025-09-19 11:26:53 +03:00
nikneym
ec6800500b
add a test for element.dir
2025-09-19 11:11:58 +03:00
nikneym
856d65a8e9
add element.dir getter & setter
2025-09-19 10:48:37 +03:00
Karl Seguin
8a2efde365
Merge pull request #1069 from lightpanda-io/response-gettype
...
Adds `Response.type`
2025-09-19 15:12:10 +08:00
Karl Seguin
2ddcc6d9e6
Replace --noscript with more advanced --strip_mode
...
--noscript is deprecated (warning) and automatically maps to --strip_mode js
--strip_mode takes a comma separated list of values. From the help:
- "js" script and link[as=script, rel=preload]
- "ui" includes img, picture, video, css and svg
- "css" includes style and link[rel=stylesheet]
- "full" includes js, ui and css
Maybe this is overkill, but i sometimes find myself looking --dump outputs over
and over again, and removing noise (like HUGE svgs) seems like a small
improvement.
2025-09-19 14:27:53 +08:00
Muki Kiboigo
25962326d2
add support for Response.type
2025-09-18 22:27:51 -07:00
Karl Seguin
bbc2fbf984
Merge pull request #1068 from lightpanda-io/fix_wpt_runner_user_agent
...
git wpt runner a (not required) user_agent
2025-09-19 13:07:14 +08:00
Karl Seguin
edc53d6de3
git wpt runner a (not required) user_agent
2025-09-19 12:38:40 +08:00
Karl Seguin
47710210bd
Add libdom RSS and v8 total_physical_size to testing --json output
...
https://github.com/lightpanda-io/browser/issues/1057
2025-09-19 10:21:39 +08:00
Pierre Tachoire
823b7f0670
Merge pull request #1064 from lightpanda-io/testing_metrics
...
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
Re-enable test metrics
2025-09-18 18:03:57 +02:00
Pierre Tachoire
f5130ce48f
Merge pull request #1061 from lightpanda-io/remove_inline
...
Remove all inlines
2025-09-18 17:59:35 +02:00
Halil Durak
347524a5b3
Add setImmediate, clearImmediate ( #1065 )
2025-09-18 17:56:09 +02:00
nikneym
51830f5907
relaxed MessagePort.postMessage
2025-09-18 17:07:12 +03:00
Karl Seguin
346f538c3b
Re-enable test metrics
...
Both the durations and allocations will be _much_ higher with the new htmlRunner
which, for example, does 2 HTTP requests per test (html, testing.js).
https://github.com/lightpanda-io/browser/issues/1057
2025-09-18 19:55:37 +08:00
Karl Seguin
9d2948ff50
Remove all inlines
...
Following Zig recommendation not to inline except in specific cases, none of
which I think applies to use.
Also, mimalloc.create can't fail (it used to be possible, but that changed a
while ago), so removed its error return.
2025-09-18 19:10:22 +08:00
Karl Seguin
36ce227bf6
Merge pull request #1055 from lightpanda-io/env_string
...
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
Introduces an Env.String for persistent strings
2025-09-18 19:06:46 +08:00
Karl Seguin
024f7ad9ef
Merge pull request #1056 from lightpanda-io/DOM_NO_ERR
...
Convert more DOM_NO_ERR cases to assertions
2025-09-18 19:06:32 +08:00
Karl Seguin
f8425fe614
Merge pull request #1063 from lightpanda-io/remove_jsrunner
...
Remove JSRunner
2025-09-18 18:46:59 +08:00
Karl Seguin
7802a1b5a4
Merge pull request #1062 from lightpanda-io/fetch_newHeaders
...
use client.newHeaders
2025-09-18 15:56:35 +08:00
Karl Seguin
17549d8a43
Remove JSRunner
...
It only had a few fetch tests still using it. But now everything is migrated
to the htmlRunner
2025-09-18 15:50:19 +08:00
Karl Seguin
f6ed706855
use client.newHeaders
2025-09-18 15:46:23 +08:00
Pierre Tachoire
89ef25501b
Merge pull request #1060 from lightpanda-io/fetch-ua
...
fetch: init headers w page's client UA
2025-09-18 09:44:00 +02:00
Pierre Tachoire
4870125e64
fetch: init headers w page's client UA
2025-09-18 09:34:55 +02:00
Pierre Tachoire
2d24e3c7f7
Merge pull request #972 from lightpanda-io/fetch
...
Fetch + ReadableStream
2025-09-18 09:29:05 +02:00
Karl Seguin
cdb3f46506
Merge pull request #1059 from lightpanda-io/user_agent_suffix
...
Add --user_agent_suffix argument
2025-09-18 15:06:21 +08:00
Karl Seguin
e225ed9f19
fix for telemetry and one-off requests
2025-09-18 11:40:25 +08:00
Karl Seguin
17bebf4f3a
Merge pull request #1058 from lightpanda-io/test_doctype
...
Give tests <!DOCTYPE html> so they work correct in browser
2025-09-18 11:29:31 +08:00
Karl Seguin
26550129ea
Add --user_agent_suffix argument
...
Allows appending a value (separated by a space) to the existing Lightpanda/X.Y
user agent.
2025-09-18 11:28:27 +08:00
Karl Seguin
66362c2762
Give tests <!DOCTYPE html> so they work correct in browser
2025-09-18 10:53:29 +08:00
Muki Kiboigo
f6f0e141a1
PeristentPromiseResolver with page lifetime
2025-09-17 12:12:10 -07:00
Muki Kiboigo
f22ee54bd8
use fetch logging scope, clean some comments
2025-09-17 08:46:35 -07:00
Muki Kiboigo
2a969f911e
stop using destructor callback for fetch
2025-09-17 08:46:29 -07:00
Muki Kiboigo
2a0964f66b
htmlRunner for ReadableStream tests, fix ReadableStream enqueue
2025-09-17 08:46:25 -07:00
Muki Kiboigo
c553a2cd38
use Env.PersistentPromiseResolver
2025-09-17 08:46:20 -07:00
Karl Seguin
24330a7491
remove meaningless text from test
2025-09-17 08:46:16 -07:00
Karl Seguin
cd763a7a35
fix arena, add fetch test
2025-09-17 08:46:03 -07:00
Muki Kiboigo
ed11eab0a7
use content length to reserve body size
2025-09-17 08:45:53 -07:00
Muki Kiboigo
a875ce4d68
copy our Request headers into the HTTP client
2025-09-17 08:45:46 -07:00
Muki Kiboigo
969bfb4e53
migrate fetch tests to htmlRunner
2025-09-17 08:45:42 -07:00
Muki Kiboigo
76dae43103
properly handle closed for ReadableStream
2025-09-17 08:45:37 -07:00
Muki Kiboigo
af75ce79ac
deinit persistent promise resolver
2025-09-17 08:45:30 -07:00
Muki Kiboigo
fe89c2ff9b
simplify cloning of Req/Resp
2025-09-17 08:45:25 -07:00
Muki Kiboigo
bb2595eca5
use call arena for json in Req/Resp
2025-09-17 08:45:20 -07:00
Muki Kiboigo
618fff0191
simplify Headers
2025-09-17 08:45:14 -07:00
Muki Kiboigo
9bbd06ce76
headers iterators should not allocate
2025-09-17 08:45:05 -07:00
Muki Kiboigo
20463a662b
use destructor callback for FetchContext
2025-09-17 08:45:00 -07:00
Muki Kiboigo
9251180501
support object as HeadersInit
2025-09-17 08:44:54 -07:00
Muki Kiboigo
2659043afd
add logging on fetch error callback
2025-09-17 08:44:47 -07:00
sjorsdonkers
7766892ad2
retain value, avoid str alloc
2025-09-17 08:44:36 -07:00
sjorsdonkers
a7848f43cd
avoid explicit memcpy
2025-09-17 08:44:31 -07:00
sjorsdonkers
cf8f76b454
remove length check of fixed size
2025-09-17 08:44:26 -07:00
sjorsdonkers
f68f184c68
jsValueToZig for fixed sized arrays
2025-09-17 08:44:12 -07:00
Muki Kiboigo
463440bce4
implement remaining ReadableStream functionality
2025-09-17 08:43:42 -07:00
Muki Kiboigo
51ee313910
working Header iterators
2025-09-17 08:43:36 -07:00
Muki Kiboigo
744b0bfff7
TypeError when Stream is locked
2025-09-17 08:43:31 -07:00
Muki Kiboigo
949479aa81
cleaning up various Headers routines
2025-09-17 08:43:22 -07:00
Muki Kiboigo
8743841145
use proper Headers in fetch()
2025-09-17 08:43:16 -07:00
Muki Kiboigo
6225cb38ae
expand Request/Response interfaces
2025-09-17 08:43:05 -07:00
Muki Kiboigo
8dcba37672
expand Headers interface
2025-09-17 08:42:59 -07:00
Muki Kiboigo
38b922df75
remove debug logging in ReadableStream
2025-09-17 08:42:50 -07:00
Muki Kiboigo
6d884382a1
move fetch() into fetch.zig
2025-09-17 08:42:41 -07:00
Muki Kiboigo
752e75e94b
add bodyUsed checks on Request and Response
2025-09-17 08:42:36 -07:00
Muki Kiboigo
5ca41b5e13
more Headers compatibility
2025-09-17 08:42:30 -07:00
Muki Kiboigo
1b3707ad33
add fetch to cdp domain
2025-09-17 08:42:20 -07:00
Muki Kiboigo
c6e82d5af6
add json response method
2025-09-17 08:42:12 -07:00
Muki Kiboigo
814e41122a
basic readable stream working
2025-09-17 08:42:07 -07:00
Muki Kiboigo
a133a71eb9
proper fetch method and body setting
2025-09-17 08:41:22 -07:00
Muki Kiboigo
dc2addb0ed
fetch callback logging
2025-09-17 08:41:16 -07:00
Muki Kiboigo
f9014bb90c
request url as null terminated
2025-09-17 08:41:11 -07:00
Muki Kiboigo
df0b6d5b07
initial fetch in zig
2025-09-17 08:40:32 -07:00
Muki Kiboigo
56c6e8be06
remove polyfill and add req/resp
2025-09-17 08:40:10 -07:00
Pierre Tachoire
b47b8297d6
Merge pull request #1021 from lightpanda-io/patchright
...
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
Patchright compatibility
2025-09-17 16:14:00 +02:00
Pierre Tachoire
5d1e17c598
cdp: use for...else instead of found bool
2025-09-17 14:42:08 +02:00
Pierre Tachoire
94fe34bd10
cdp: multiple isolated worlds
2025-09-17 14:42:08 +02:00
Pierre Tachoire
e68ff62723
cdp: use depth param on DOM.describeNode
2025-09-17 14:42:08 +02:00
Pierre Tachoire
04487b6b91
cdp: allow double isolated world with same world name
...
In this case we reuse the existing isolated world and isolated context
and we log a warning
2025-09-17 14:42:07 +02:00
Pierre Tachoire
49a27a67bc
cdp: send a warning for pierce parameter
2025-09-17 14:42:07 +02:00
Pierre Tachoire
745de2ede2
cdp: add Runtime.getProperties
2025-09-17 14:42:07 +02:00
Pierre Tachoire
82e5698f1d
cdp: accept neg depth in describeNode
2025-09-17 14:42:06 +02:00
Pierre Tachoire
c4090851c5
css: accept digit as name start
2025-09-17 14:42:06 +02:00
Pierre Tachoire
9cb4431e89
cdp: add initiator on request will be send
2025-09-17 14:42:06 +02:00
Pierre Tachoire
2221d0cb6f
cdp: send the chrome's error on missing node
2025-09-17 14:42:05 +02:00
Pierre Tachoire
5ea97c4910
cdp: add send error options with session id by default
2025-09-17 14:42:05 +02:00
Pierre Tachoire
a40590b4bf
cdp: add DOM.getFrameOwner
2025-09-17 14:42:00 +02:00
Karl Seguin
58acb2b821
Convert more DOM_NO_ERR cases to assertions
...
There is some risk to this change. The first is that I made a mistake. The
other is that one of the APIs that doesn't currently return an error changes
in the future.
2025-09-17 13:37:48 +08:00
Karl Seguin
6b9dc90639
Introduces an Env.String for persistent strings
...
If a webapi has a []const u8 parameter, then the page.call_arena is used. This
is our favorite arena to use, but if the string value has a lifetime beyond the
call, it then needs to be duped again (using page.arena).
When a webapi has a Env.String parameter, the page.arena will be used directly
to get the value from V8, removing the need for an intermediary dupe in the
call_arena.
This allows HTMLCollections to be streamlined. They no longer need to dupe the
filter (tag name, class name, ...), which means they can no longer fail. It also
means that we no longer need to needlessly dupe the string literals.
2025-09-17 12:12:42 +08:00
Karl Seguin
b7d26cf0d5
Merge pull request #1053 from lightpanda-io/nikneym/create-event-html-events
...
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
allow `HTMLEvents` in `createEvent`
2025-09-17 00:31:36 +08:00
Pierre Tachoire
59b4033ab2
Merge pull request #1052 from lightpanda-io/fix-auth-interception-overflow
...
Fix auth interception integer overflow
2025-09-16 16:31:07 +02:00
nikneym
13a7219dbd
allow HTMLEvents in createEvent
2025-09-16 17:24:50 +03:00
Pierre Tachoire
eae8a90a89
ci: add request interception through proxy test
2025-09-16 16:24:19 +02:00
Karl Seguin
a87f4abd5f
Merge pull request #1050 from lightpanda-io/event_window_bubble
...
Event window bubble
2025-09-16 18:44:22 +08:00
Karl Seguin
1b73691c69
update libdom dep
2025-09-16 18:21:16 +08:00
Pierre Tachoire
e00066466b
http: decrement intercepted on auth abortion
2025-09-16 12:18:49 +02:00
Pierre Tachoire
b87a8ba97d
http: increment intercepted counter on auth interception
2025-09-16 12:18:49 +02:00
Karl Seguin
57aa270032
Merge pull request #1048 from lightpanda-io/nikneym/mime-changes
...
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
Mime: charset identification changes
2025-09-16 16:13:46 +08:00
nikneym
90a96fd8a7
set a zero char right after attrib value instead of memset
2025-09-16 10:41:49 +03:00
nikneym
c05470515f
double quotes must be first and last argument of slice if provided
2025-09-16 10:40:38 +03:00
Pierre Tachoire
81ed4f3699
Merge pull request #1051 from lightpanda-io/explicit_microtask
...
Set Isolate Microtask to Explicit
2025-09-16 09:38:33 +02:00
Karl Seguin
c9ac1eab11
Set Isolate Microtask to Explicit
...
This defaults to Auto, which means it runs when the call stack reaches 0.
It appears that both Node and Deno set this to explicit.
I don't really understand why Auto doesn't work. It says the call stack is the
C++/C callstack, and I don't see what would block the current code from reaching
a depth of 0. Still, we already have explicit calls to performMicrotasksCheckpoint
which ties it holistically with our scheduler, so having it be explicit like
this should...well make it more explicit
This broke a test, but since the tests are being redone in the [fetch PR](https://github.com/lightpanda-io/browser/pull/972 ) I simply removed the offending one.
2025-09-16 14:52:31 +08:00
Karl Seguin
1ba542fb3b
use redispatch, check for stopped
2025-09-16 10:31:37 +08:00
Karl Seguin
4f127c9de3
Bubble events to the Window
2025-09-15 22:24:35 +08:00
Karl Seguin
16656f6c13
Merge pull request #1049 from lightpanda-io/netsurf_event_errors
...
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
Remove unnecessary error handling from non-erroring netsurf event fun…
2025-09-15 21:55:18 +08:00
Karl Seguin
0f13e062fe
Remove unnecessary error handling from non-erroring netsurf event functions
2025-09-15 21:37:53 +08:00
nikneym
2e68407fbe
update Mime tests
2025-09-15 15:15:29 +03:00
nikneym
974f350f27
store charset value directly in Mime
2025-09-15 15:15:08 +03:00
nikneym
27ffea9052
add vectorized parseCharset impl
2025-09-15 11:15:09 +03:00
Pierre Tachoire
9b2b35e8a2
Merge pull request #1047 from lightpanda-io/ci-cache-libiconv
...
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
ci: cache libiconv
2025-09-15 09:19:46 +02:00
Pierre Tachoire
3b51ca3947
make: download libiconv from GH fork
2025-09-15 08:59:30 +02:00
Pierre Tachoire
62a2d08b53
ci: cache libiconv
2025-09-15 08:43:48 +02:00
Pierre Tachoire
e790bde717
Merge pull request #1046 from lightpanda-io/fork-netsurf
...
submodule: use GH fork of netsurf buildsystem
2025-09-15 08:23:39 +02:00
Pierre Tachoire
0ab6b15292
submodule: use GH fork of netsurf buildsystem
2025-09-15 08:18:22 +02:00
Karl Seguin
2aeeb14c21
Merge pull request #1043 from lightpanda-io/html_slot_assigned_elements
...
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 assignedElements to HTMLSlotElement
2025-09-13 10:12:20 +08:00
Karl Seguin
e5e57ab3bd
Merge pull request #1044 from lightpanda-io/script_nonce_and_df_host
...
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
Add Script get/set nonce
2025-09-12 20:45:50 +08:00
Karl Seguin
f3ce5dcfbd
Add Script get/set nonce
2025-09-12 19:19:36 +08:00
Halil Durak
bc341e98fc
Merge pull request #1041 from lightpanda-io/nikneym/keyboard-event
...
KeyboardEvent support
2025-09-12 13:57:39 +03:00
nikneym
80851f4861
don't inline keyboardEventKeyIsSet
2025-09-12 13:39:15 +03:00
nikneym
22b4456bce
correct indentation in tests
2025-09-12 13:39:05 +03:00
nikneym
8d67502997
don't expose DOMErr function
2025-09-12 13:38:58 +03:00
nikneym
8f31fd778b
add KeyboardEvent tests
2025-09-12 13:38:47 +03:00
nikneym
f79f25bcf4
implement KeyboardEvent properties and methods
2025-09-12 13:38:41 +03:00
nikneym
68e237eec5
add license
2025-09-12 13:38:31 +03:00
nikneym
8895c70c7f
make toInterface be aware of KeyboardEvent
2025-09-12 13:38:04 +03:00
nikneym
3964f8649d
initial keyboard event
2025-09-12 13:33:30 +03:00
Karl Seguin
b7fb0ef1d3
add assignedElements to HTMLSlotElement
2025-09-12 17:40:29 +08:00
Karl Seguin
66e403c5b4
Merge pull request #1042 from lightpanda-io/textdecoder_decode
...
Improve TextDecoder.decode
2025-09-12 14:34:14 +08:00
Karl Seguin
0913abe806
Improve TextDecoder.decode
...
1 - Optional input (why? I don't know, but it's part of the spec and happens)
2 - Optional stream parameter
3 - More test cases
2025-09-12 12:31:28 +08:00
Karl Seguin
6d3065c4c6
Merge pull request #1037 from lightpanda-io/upgrade_v8
...
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
Upgrade v8
2025-09-12 08:29:20 +08:00
Karl Seguin
9092d1f8eb
update v8 deps
2025-09-12 07:55:27 +08:00
Karl Seguin
1bd1f123a3
Upgrade v8
...
Depends on https://github.com/lightpanda-io/zig-v8-fork/pull/93
2025-09-12 07:53:22 +08:00
Karl Seguin
44c072dcbb
Merge pull request #1040 from lightpanda-io/event_timestamp_resolution
...
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
Increase event timeStamp resolution
2025-09-11 21:08:09 +08:00
Karl Seguin
45c59e2990
update libdom
2025-09-11 20:43:32 +08:00
Karl Seguin
75f0cd6e62
fix test
2025-09-11 16:10:06 +08:00
Karl Seguin
80f758018c
Increase event timeStamp resolution
...
Depends on https://github.com/lightpanda-io/libdom/pull/36
The spec says this should be a High Definition timestamp. But browsers avoid
that in order to avoid fingerprinting. By default, FireFox rounds to 2ms (which
is what this PR does).
Previously, the timestamp was seconds, so you'd think: isn't that better? Well,
it's pretty far off the spec and what browsers do, but more importantly, it
crashes our WPT test. If you look at `Event-timestamp-safe-resolution.html`
you'll see that it's trying to find the delta between two timestamps, in an
endless loop (without a loop of many iterations). With second-resolution, it
just takes too long (and crashes..memory).
2025-09-11 15:53:34 +08:00
Karl Seguin
b5e2c62fdd
Merge pull request #1039 from lightpanda-io/migrate_some_tests_11
...
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
migrate more tests to htmlRunner
2025-09-11 14:12:39 +08:00
Karl Seguin
ede35718ae
migrate more tests to htmlRunner
2025-09-11 12:07:17 +08:00
Karl Seguin
31fe2807aa
Merge pull request #1038 from lightpanda-io/migrate_some_tests_10
...
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
migrate more tests to htmlRunner
2025-09-11 00:24:17 +08:00
Karl Seguin
f77693d768
migrate more tests to htmlRunner
2025-09-10 20:32:15 +08:00
Pierre Tachoire
96e3c16cca
Merge pull request #1036 from lightpanda-io/css-contains
...
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
CSS: move tests + implement :containsOwn
2025-09-10 13:59:27 +02:00
Karl Seguin
edd41b37f0
Merge pull request #1033 from lightpanda-io/nikneym/custom-event
...
Support for CustomEvent in document.createEvent
2025-09-10 15:23:34 +08:00
Karl Seguin
139d0038f2
Merge pull request #1035 from lightpanda-io/migrate_some_tests_9
...
migrate more tests to htmlRunner
2025-09-10 15:21:27 +08:00
Pierre Tachoire
d25fc64d7a
css: implement :containsOwn pseudo-selector
...
:containsOwn is implemented with case sensitive comparison.
2025-09-10 08:55:44 +02:00
nikneym
9c83b268b9
persist the detail if provided
2025-09-10 09:49:31 +03:00
Pierre Tachoire
42092ac16a
css: move match_test into selector
2025-09-10 08:41:15 +02:00
Pierre Tachoire
e4860d5bae
css: move libdom_test into libdom
...
To be added by the test_runner as part of used files.
2025-09-10 08:41:14 +02:00
Karl Seguin
a5d9b658fb
migrate more tests to htmlRunner
2025-09-10 11:54:03 +08:00
Karl Seguin
f464e89415
Merge pull request #1034 from lightpanda-io/persistent-promise
...
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
Clean Up Persistent Promises in Dynamic Import
2025-09-10 08:39:50 +08:00
Karl Seguin
cdc439c4ef
Merge pull request #1026 from lightpanda-io/network_idle_500ms_delay
...
Send NetworkIdle and NetworkAlmostIdle notifications after 500ms delay
2025-09-10 08:22:34 +08:00
Karl Seguin
746168f9ed
Merge pull request #1031 from lightpanda-io/migrate_some_tests_8
...
migrate more tests to htmlRunner
2025-09-10 08:22:21 +08:00
Karl Seguin
5ad4885102
Merge pull request #1028 from lightpanda-io/wpt_runner_tweak
...
Try to address WPT running OOM
2025-09-10 08:22:08 +08:00
Muki Kiboigo
7eb53ca2bc
deinit persistent in dynamic import
2025-09-09 15:02:26 -07:00
nikneym
10fc056184
createEvent should increase tag count by 1
2025-09-09 21:56:10 +03:00
nikneym
7517937155
add createEvent tests
2025-09-09 21:45:09 +03:00
nikneym
a86fa8cc37
add support for CustomEvent#initCustomEvent
2025-09-09 21:44:51 +03:00
nikneym
e1c765e78a
support CustomEvent in createEvent
2025-09-09 21:44:09 +03:00
Karl Seguin
56b08bddd8
migrate more tests to htmlRunner
2025-09-09 20:40:19 +08:00
Karl Seguin
2ed8a1c0ec
Merge pull request #1030 from lightpanda-io/update_libdom
...
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
this was already updated, but subsequent PR (by me) accidentally reve…
2025-09-09 19:53:54 +08:00
Pierre Tachoire
389dff7031
Merge pull request #1029 from lightpanda-io/remove_telemetry_debug_output
...
Remove a std.debug.print
2025-09-09 13:48:20 +02:00
Karl Seguin
123d69e595
this was already updated, but subsequent PR (by me) accidentally reverted it
2025-09-09 19:44:54 +08:00
Karl Seguin
4ab7fe26fc
Merge pull request #1025 from lightpanda-io/migrate_some_tests_7
...
migrate more tests to htmlRunner
2025-09-09 19:41:56 +08:00
Karl Seguin
0aa1e0200f
Merge branch 'wpt' into wpt_runner_tweak
2025-09-09 19:24:36 +08:00
Karl Seguin
575f827958
disable telemetry when running WPT action
2025-09-09 19:23:31 +08:00
Karl Seguin
7136851893
Remove a std.debug.print
...
Probably added in the Zig 0.15 migration. Sorry.
2025-09-09 19:19:36 +08:00
Karl Seguin
67935b11c9
Try to address WPT running OOM
...
- Continue to reuse the Browser/Env/Isolate, but no start a new session per test.
- Test http server now properly closes the sendFile fd
- Run WPT in ReleaseMode
- Add --quiet option to WPT and some commented out debug code for dumping v8
memory stats
2025-09-09 19:15:35 +08:00
Pierre Tachoire
85f60cbc7b
Merge pull request #1027 from lightpanda-io/libcurl-readme
...
add libcurl in the readme
2025-09-09 11:24:55 +02:00
Pierre Tachoire
9c35f8a24e
add libcurl in the readme
2025-09-09 11:22:56 +02:00
Karl Seguin
9971de2ccd
Send NetworkIdle and NetworkAlmostIdle notifications after 500ms delay
...
Like Chrome, the NetworkIdle and NetworkAlmostIdle will only be sent if the
condition (no network requests / <= 2 network requests) holds for at least 500ms
Also merged runHighPriority and runLowPriority as they are now always run
together (but we still only block/wait for high priority tasks).
2025-09-09 14:06:03 +08:00
Karl Seguin
1ca8dc0ac0
Merge pull request #1022 from lightpanda-io/slot
...
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
Start working on HTMLSlotElement
2025-09-09 11:52:04 +08:00
Karl Seguin
85d148822e
migrate more tests to htmlRunner
2025-09-09 11:48:08 +08:00
Karl Seguin
1e738dcf79
Merge pull request #1023 from lightpanda-io/migrate_some_tests_6
...
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
migrate more tests to htmlRunner
2025-09-08 20:58:41 +08:00
Karl Seguin
b5ffd8d046
Merge pull request #1024 from lightpanda-io/run_distant_tasks
...
Ability to run tasks even in the "distant" future.
2025-09-08 20:58:30 +08:00
Karl Seguin
21e354d252
Ability to run tasks even in the "distant" future.
...
We previously ignored tasks scheduled more than 5 seconds away. These tasks are
now scheduled on the low priority queue. This means that they won't stop a
page.wait for returning, but they'll still [eventually] be run if page.wait is
called multiple times.
Practically, this means that they'll never be run in `fetch` mode, but they
might be run from CDP if the driver waits.
Make queue names consistent, primary => high_priority, secondary => low_priority
(the same names used by the page)
2025-09-08 18:55:48 +08:00
Karl Seguin
15628d9b07
migrate more tests to htmlRunner
2025-09-08 18:40:59 +08:00
Karl Seguin
950182986a
Start working on HTMLSlotElement
2025-09-08 17:36:45 +08:00
Pierre Tachoire
bc82023878
Merge pull request #1020 from lightpanda-io/inline_script_ignore_defer
...
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
Inline script tags ignore defer/async
2025-09-05 17:44:45 +02:00
Pierre Tachoire
d5363e5993
Merge pull request #1018 from lightpanda-io/fix_screen_event_target_prototype
...
Fix the Screen and ScreenOrientation prototype
2025-09-05 17:44:09 +02:00
Pierre Tachoire
80adee8558
Merge pull request #1017 from lightpanda-io/fix_async_script_processing
...
Fix blockingGet during blockingGet
2025-09-05 17:43:40 +02:00
Pierre Tachoire
37fe6a661b
Merge pull request #1013 from lightpanda-io/reset_request_method
...
Reset CURLOPT_CUSTOMREQUEST for each request
2025-09-05 17:43:30 +02:00
Karl Seguin
eb453f471b
Inline script tags ignore defer/async
...
According to MDN, inline script tags should not have defer/async attributes. But
some do. This ignores those attributes for inline script tags.
(Previously, we were only half ignoring them. We were treating them as inline,
but flagging them as deferred or async, which was causing issues with cleanup)
Fixes: https://github.com/lightpanda-io/browser/issues/1014
2025-09-05 23:23:31 +08:00
Karl Seguin
afd278ca4e
Fix the Screen and ScreenOrientation prototype
2025-09-05 19:08:07 +08:00
Karl Seguin
ca8877da2d
Fix blockingGet during blockingGet
...
ScriptManager should only ever has one in-flight blockingGet. The is_blocking
flag is used to assert this, as well as enforce it in evaluate(). If is_blocking
is true, evaluate() exits.
This doesn't work for async scripts however, as they aren't executed via
evaluate(), but rather execute directly once complete.
This PR changes the execution behavior of async scripts. They are now only
executed in evaluate() (and thus won't execute when is_blocking == true).
However, unlike normal/deferred scripts, async scripts continue to execute in
their completion order (not their declared order).
Fixes https://github.com/lightpanda-io/browser/issues/1016
2025-09-05 18:17:55 +08:00
Pierre Tachoire
42828c64fb
Merge pull request #1012 from lightpanda-io/cdp_detached
...
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
Don't assume that page events means the BrowserContext has a page
2025-09-05 10:19:18 +02:00
Karl Seguin
6600626f4f
Reset CURLOPT_CUSTOMREQUEST for each request
2025-09-05 15:45:28 +08:00
Karl Seguin
ac10d5b2a3
Don't assume that page events means the BrowserContext has a page
...
CDP currently assumes that if we get a page-related notification (like a
request interception, or page lifecycle event), then we must have a session
and page.
But, Target.detachFromTarget can remove the session from the BrowserContext
while still having the page run (I wonder if we should stop the page at this
point??). So, remove these assumptions and make sure we have a page/session
in the handling of page events.
2025-09-05 15:07:30 +08:00
Pierre Tachoire
9f040025e7
Merge pull request #1010 from lightpanda-io/update_transfer_uri_on_redirect
...
Update the transfer.uri on redirect
2025-09-05 08:35:13 +02:00
Karl Seguin
2522e7fe9c
Merge pull request #1011 from lightpanda-io/migrate_some_tests_5
...
migrate to htmlRunne (plus zig fmt)
2025-09-05 14:16:10 +08:00
Karl Seguin
dd22c55d23
migrate to htmlRunne (plus zig fmt)
2025-09-05 13:52:08 +08:00
Karl Seguin
a6efa9e9b2
Update the transfer.uri on redirect
...
Ensures that cookies set on the redirect page use the correct host and we don't
incorrectly reject cookies.
https://github.com/lightpanda-io/browser/issues/947
2025-09-05 08:55:36 +08:00
Karl Seguin
5087b8004a
Merge pull request #1009 from lightpanda-io/migrate_some_tests_4
...
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
migrate to htmlRunner
2025-09-04 18:32:17 +08:00
Karl Seguin
d4c40242d0
Merge pull request #1008 from lightpanda-io/network_idle_page_lifecycle
...
Emit networkIdle and networkAlmostIdle Page.lifecycleEvent
2025-09-04 17:48:02 +08:00
Karl Seguin
5af55f1d5d
migrate to htmlRunner
2025-09-04 17:46:42 +08:00
Karl Seguin
55ef0a5e9e
fix some spelling in comments
2025-09-04 16:44:00 +08:00
Karl Seguin
5dda86bf4a
Emit networkIdle and networkAlmostIdle Page.lifecycleEvent
...
Most CDP drivers have a mechanism to wait for idle network, or an almost idle
network (sometimes called networkIdle2). These are events the browser must emit.
The page will now emit `networkIdle` when we are reasonably sure there's no more
network activity (this requires some slight changes to request interception,
since, I believe, intercepted requests should be considered).
`networkAlmostIdle` is currently _always_ emitted prior to emitting
`networkIdle`. We should tweak this but I can't, at a glance, think of a great
heuristic for when this should be emitted.
2025-09-04 16:36:29 +08:00
Karl Seguin
d81377b10d
Merge pull request #1007 from lightpanda-io/timeout_limit
...
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
Limit serve timeout to 1 week
2025-09-04 16:02:39 +08:00
Karl Seguin
da128f5d49
remove unecessary @intCast
2025-09-04 15:52:08 +08:00
Karl Seguin
6e5fe8e4a2
Add timeout limit to --help text
2025-09-04 15:48:01 +08:00
Karl Seguin
b3d350d41e
Limit serve timeout to 1 week
2025-09-04 15:27:03 +08:00
Karl Seguin
7c6870f8eb
Merge pull request #1006 from lightpanda-io/migrate_some_tests_3
...
migrate to htmlRunner
2025-09-04 13:18:44 +08:00
Karl Seguin
327b4e4e37
migrate to htmlRunner
2025-09-04 13:11:15 +08:00
Karl Seguin
7fdc857326
Merge pull request #1004 from lightpanda-io/migrate_some_tests_2
...
Migrate some tests 2
2025-09-04 12:19:36 +08:00
Karl Seguin
0382c2775e
Migrate more tests to html runner
...
Implement LocalStorage named get/set (i.e. localStorage["hi"])
2025-09-03 22:54:41 +08:00
Karl Seguin
a0374133cd
migrate tests to new html runner
2025-09-03 22:54:40 +08:00
Karl Seguin
055f697340
Merge pull request #1005 from lightpanda-io/e2e-output
...
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
ci: remove go runner verbose mode
2025-09-03 22:44:35 +08:00
Pierre Tachoire
ec8a9862c7
ci: remove go runner verbose mode
2025-09-03 15:42:35 +02:00
Karl Seguin
f393eb7b7d
Merge pull request #1003 from lightpanda-io/http_always_monitor_cdp
...
Http always monitor cdp
2025-09-03 20:35:49 +08:00
Karl Seguin
78285d7b1e
fix tests
2025-09-03 20:23:59 +08:00
Karl Seguin
b6137b03cd
Rework page wait again
...
Further reducing bouncing between page and server for loop polling. If there is
a page, the page polls. If there isn't a page, the server polls. Simpler.
2025-09-03 19:38:01 +08:00
Karl Seguin
e237e709b6
Change loader id on navigation
...
This appears to be what chrome is doing. I don't know why we weren't before.
2025-09-03 08:17:14 +08:00
Karl Seguin
2ac9b2088a
Always monitor the CDP client socket, even on page.wait
2025-09-03 08:17:13 +08:00
Karl Seguin
a791212d89
Merge pull request #1002 from lightpanda-io/nix-0.15.1
...
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 Nix Flake (Zig 0.15.1)
2025-09-03 08:07:34 +08:00
Muki Kiboigo
5cc5f45ef3
update zig-v8-fork
2025-09-02 09:25:33 -07:00
Muki Kiboigo
a11e50c087
nix flake for zig 0.15.1
2025-09-02 08:58:31 -07:00
Pierre Tachoire
4dc09360a1
Merge pull request #1001 from lightpanda-io/fix_abort_crash
...
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
fix segfault on abort if there are queued transfers
2025-09-02 15:45:51 +02:00
Karl Seguin
3a5528cc4d
Merge pull request #1000 from lightpanda-io/log_unhandled_promise_rejections
...
Log unhandled promise rejection
2025-09-02 21:18:28 +08:00
Karl Seguin
de533755e5
fix segfault on abort if there are queued transfers
2025-09-02 21:18:02 +08:00
Karl Seguin
024b69ee3e
update v8 dep
2025-09-02 19:48:56 +08:00
Karl Seguin
d7e7832e9f
Log unhandled promise rejection
2025-09-02 18:19:28 +08:00
Karl Seguin
8d4d72bf15
Merge pull request #998 from lightpanda-io/migrate_some_tests_1
...
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
Migrate some tests to the new htmlRunner
2025-09-02 16:11:08 +08:00
Pierre Tachoire
86a82d55fa
Merge pull request #999 from lightpanda-io/handle_no_certs
...
Don't panic if no certs are available
2025-09-02 08:03:44 +02:00
Karl Seguin
5a15066da3
Don't panic if no certs are available
...
https://github.com/lightpanda-io/browser/issues/982
2025-09-02 13:50:53 +08:00
Karl Seguin
81766c8517
Migrate some tests to the new htmlRunner
...
Fix events.get_timeStamp (was events.get_timestamp, wrong casing).
Rename `newRunner` to `htmlRunner`.
move tests to src/tests (from src/browser/tests). src/runtime and possibly other
parts might want to have html tests too.
2025-09-02 10:40:04 +08:00
Karl Seguin
e486f28a41
Merge pull request #995 from lightpanda-io/improved_test_runner
...
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
Looking for feedback on new test runner
2025-09-02 07:45:41 +08:00
Karl Seguin
8a9cbaf413
explicitly load testing.js
2025-09-02 07:38:03 +08:00
Karl Seguin
3a0a930b79
don't log 'long timeout ignored' during testing
2025-09-02 07:38:03 +08:00
Karl Seguin
c40704d2f3
Prototype new test runner
...
Follows up on https://github.com/lightpanda-io/browser/pull/994 and replaces
the jsRunner with a new page.navigation-based test runner.
Currently only implemented for the Window tests, looking for feedback and
converting every existing test will take time - so for a while, newRunner (to be
renamed) will sit side-by-side with jsRunner.
In addition to the benefits outlined in 994, largely around code simplicity and
putting more of the actual code under tests, I think our WebAPI tests
particularly benefit from:
1 - No need to recompile when modifying the html tests
2 - Much better assertions, e.g. you can assert that something is actually an
array, not just a string representation of an array
3 - Ability to test some edge cases (e.g. dynamic script loading)
I've put some effort into testing.js to make sure that, if the encapsulating
zig test passes, it's because it actually passed, not because it didn't run.
For the time being, console tests are removed. I think it's more useful to have
access to the console within tests, than it is to test the console (which is
just a wrapper around log, which is both tested and heavily used).
2025-09-02 07:38:02 +08:00
Karl Seguin
c0f0630e17
Merge pull request #997 from lightpanda-io/fix_build
...
fix build
2025-09-02 07:24:02 +08:00
Karl Seguin
19dbb3a778
fix build
2025-09-02 07:06:57 +08:00
Karl Seguin
d4fc6f1b35
Merge pull request #996 from lightpanda-io/revert-document-element
...
Revert "document.documentElement returns a *parser.Element"
2025-09-02 06:52:16 +08:00
Karl Seguin
7c82942912
Merge pull request #994 from lightpanda-io/test_http_server
...
Test http server
2025-09-02 06:51:52 +08:00
Karl Seguin
87d48b028b
Merge pull request #992 from lightpanda-io/http_buffer_presize
...
Pre-size the destination buffer when we know the response content length
2025-09-02 06:51:15 +08:00
Pierre Tachoire
d6640f4d15
Revert "document.documentElement returns a *parser.Element"
...
This reverts commit c1752ae5eb .
2025-09-01 15:46:16 +02:00
Karl Seguin
785a8da623
remove content-length limit
2025-09-01 18:53:00 +08:00
Karl Seguin
57dc303d90
Make getContentLength work on fulfilled responses
2025-09-01 18:40:50 +08:00
Pierre Tachoire
ce08cc9659
Merge pull request #993 from lightpanda-io/remove_unsafe_undefine
...
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
Remove [some] unsafe undefines from netsurf wrapper
2025-09-01 08:26:41 +02:00
Pierre Tachoire
866393743c
Merge pull request #991 from lightpanda-io/mimalloc_assertions
...
Switch mimalloc guards to assertions
2025-09-01 08:12:21 +02:00
Pierre Tachoire
ba255aa653
Merge pull request #989 from lightpanda-io/clocks
...
Improve clocks
2025-09-01 08:11:05 +02:00
Karl Seguin
7d46e8fe80
Start unifying test and code
...
Depends on https://github.com/lightpanda-io/browser/pull/993
There's currently 3 ways to execute a page:
1 - page.navigate (as used in both the 'fetch' and 'serve' commands)
2 - jsRunner as used in unit tests
3 - main_wpt as used in the WPT runner
Both jsRunner and main_wpt replicate the page.navigate code, but in their own
hack-ish way. main_wpt re-implements the DOM walking in order to extract and
execute <script> tags, as well as the needed page lifecycle events.
This PR replaces the existing main_wpt loader with a call to page.navigate. To
support this, a test HTTP server was added. (The test HTTP server is extracted
from the existing unit test test server, and re-used between the two).
There are benefits to this approach:
1 - The code is simpler
2 - More of the actual code and flow is tested
3 - There's 1 way to do things (page.navigate)
4 - Having an HTTP server might unlock some WPT tests
Technically, we're replacing file IO with network IO i.e. http requests). This
has potential downsides:
1 - The tests might be more brittle
2 - The tests might be slower
I think we need to run it for a while to see if we get flaky behavior.
The goal for following PRs is to bring this unification to the jsRunner.
2025-09-01 13:01:08 +08:00
Karl Seguin
6c41245c73
Remove [some] unsafe undefines from netsurf wrapper
...
Code like this:
```
var body: ?*ElementHTML = undefined;
const err = documentHTMLVtable(doc_html).get_body.?(doc_html, &body);
try DOMErr(err);
if (body == null) return null;
return @as(*Body, @ptrCast(body.?));
```
Isn't safe. It assumes that libdom will either return an error, or set body
to null or a value. However, there are cases (specifically for this API) where
libdom returns DOM_NO_ERR without ever setting body. In such cases, we return
a `body` initialized to a random (invalid) value.
This PR replaces the initial value of optional types from undefined to null
(within the libdom wrapper).
2025-09-01 11:41:37 +08:00
Karl Seguin
2a8e51c2d2
Pre-size the destination buffer when we know the response content length
2025-08-31 20:14:55 +08:00
Karl Seguin
b2cf5df612
Switch mimalloc guards to assertions
...
The thin mimalloc API is currently defensive around incorrect setup/teardown by
guarding against using/destroying the arena when the heap is null, or creating
an arena when it already exists.
The only time these checks will fail is when the code is wrong, e.g. trying
to use libdom before or after freeing the arena. The current behavior can mask
these errors, plus add runtime overhead.
2025-08-31 19:35:53 +08:00
Karl Seguin
ada9ddd5b8
Improve clocks
...
There's a flaky performance test that I wanted to fix (1). This led to a couple
changes.
1 - Add timestamp() and milliTimestamp() to datetime.zig. Reduce some code
duplication and use better clock_ids where available
2 - Change Performance API to use milliTimestamp and store a u64 instead of a
f64. While the spec says a float, Firefox deals with u64 and implicit
conversion is always available. Makes our APIs simpler.
(1) - https://github.com/lightpanda-io/browser/actions/runs/17313296490/job/49151366798#step:4:131
2025-08-30 13:45:12 +08:00
Karl Seguin
f66f4d9aeb
Merge pull request #987 from lightpanda-io/improve_server_shutdown
...
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
Ignore ConnectionClosed error on server shutdown
2025-08-30 12:35:12 +08:00
Pierre Tachoire
d02ba777f2
Merge pull request #984 from lightpanda-io/zig.0.15.1
...
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
Zig 0.15.1
2025-08-29 10:33:00 +02:00
Karl Seguin
aef614823b
Ignore ConnectionClosed error on server shutdown
...
Our shutdown could be cleaner, but this at least removes a meaningless (because
we're shutting down) log.err that was happening on every test run.
2025-08-29 16:21:26 +08:00
Karl Seguin
431db85ecb
Merge pull request #978 from lightpanda-io/dynamic_cdp_read_buffer
...
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
Make the CDP read buffer heap allocated & dynamic
2025-08-29 12:20:58 +08:00
Karl Seguin
1ebac06f4b
add debug line on cdp buffer growth
2025-08-29 10:55:36 +08:00
Karl Seguin
c7c5af4708
zig fmt
2025-08-29 10:51:19 +08:00
Karl Seguin
0b6a9d3a0b
use llvm. The new x86 backend crashes with v8.
2025-08-29 10:42:07 +08:00
Karl Seguin
23d6362058
fix telemetry, link libc and libcpp
2025-08-29 10:42:06 +08:00
Karl Seguin
1443f38e5f
Zig 0.15.1
...
Depends on https://github.com/lightpanda-io/zig-v8-fork/pull/89
2025-08-29 10:42:06 +08:00
Karl Seguin
94960cc842
Merge pull request #979 from lightpanda-io/app_owns_platform
...
App owns platform
2025-08-29 10:33:55 +08:00
Karl Seguin
efc983b009
Start with 16K buffer (down from 32K). Use array list growth algorithm
2025-08-29 10:33:27 +08:00
Karl Seguin
74d90f2892
fix tests
2025-08-29 10:14:59 +08:00
Karl Seguin
56f1b6cc19
Make the CDP read buffer heap allocated & dynamic
...
Rather than stack-allocating MAX_MESSAGE_SIZE upfront, we now allocate 32KB
and grow the buffer as needed for larger messages, up to MAX_MESSAGE_SIZE.
This will reduce memory usage for drivers that don't send huge payloads (like
playwright does).
While not implemented, this would also enable us to set the MAX_MESSAGE_SIZE
at runtime (e.g. via a command line option).
2025-08-29 10:14:58 +08:00
Karl Seguin
fa2cd9dfd9
Ability to start/stop CDP server.
...
Exists for cleaning up after tests.
2025-08-29 10:14:08 +08:00
Karl Seguin
687f09d952
Make the App own the Platform
...
Removes optional platform, which only existed for tests.
There is now a global `@import("testing.zig").test_app` available. This is setup
when the test runner starts, and cleaned up at the end of tests. Individual
tests don't have to worry about creating app, which I assume was the reason I
Platform optional, since that woul dhave been something else that needed to be
setup.
2025-08-29 10:14:06 +08:00
Karl Seguin
67b479b5c8
Merge pull request #983 from lightpanda-io/sigint
...
exit the browser on SIGINT signal
2025-08-29 10:10:49 +08:00
Pierre Tachoire
eac2140693
Merge pull request #986 from lightpanda-io/readme-interception
...
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
README: check request interception
2025-08-28 17:19:32 +02:00
Pierre Tachoire
7a3f5de9c2
Merge pull request #985 from lightpanda-io/fulfill-content-type-len
...
http: set content_type len on fulfill request
2025-08-28 17:19:23 +02:00
Pierre Tachoire
7005bf2481
README: check request interception
2025-08-28 17:18:42 +02:00
Pierre Tachoire
b80ee3342c
http: set content_type len on fulfill request
2025-08-28 16:28:41 +02:00
Pierre Tachoire
4c7b7b1e60
handle graceful shutdown
2025-08-28 12:44:16 +02:00
Pierre Tachoire
1a4a3608c8
exit the browser on SIGINT signal
2025-08-28 12:44:12 +02:00
Pierre Tachoire
6800d50339
Merge pull request #981 from lightpanda-io/page-navigate-event
...
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
page: ensure page navigate events order
2025-08-27 18:23:22 +02:00
Pierre Tachoire
036f808ec6
page: ensure page navigate events order
2025-08-27 17:36:36 +02:00
Pierre Tachoire
7647ce9e6d
Merge pull request #960 from lightpanda-io/auth-challenge
...
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
auth required interception
2025-08-27 15:34:51 +02:00
Karl Seguin
545d3f81ce
Merge pull request #977 from lightpanda-io/selector_by_ref
...
Select is relatively large (64 bytes), pass it by ref
2025-08-27 19:37:36 +08:00
Pierre Tachoire
455615b9c1
Merge pull request #980 from lightpanda-io/update-docker-readme
...
Update docker readme
2025-08-27 09:32:41 +02:00
Pierre Tachoire
d0e2a03da5
README: proxy support is ready
2025-08-27 09:30:43 +02:00
Pierre Tachoire
fa408e644c
cs fix
2025-08-27 09:26:10 +02:00
Pierre Tachoire
a22416584d
README: --privileged is not needed anymore
2025-08-27 09:25:51 +02:00
Karl Seguin
b8fc60df45
Merge pull request #975 from lightpanda-io/dynamic_script
...
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
Support dynamic scripts which are added to the DOM before src is set
2025-08-27 05:59:28 +08:00
Karl Seguin
c6455cf02e
Select is relatively large (64 bytes), pass it by ref
2025-08-27 05:55:04 +08:00
Pierre Tachoire
2ac1d39367
Merge pull request #976 from lightpanda-io/webapi_file_placeholder
...
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
The most basic File implementation.
2025-08-26 18:20:53 +02:00
Pierre Tachoire
041e014d68
Merge pull request #970 from lightpanda-io/remove_loop
...
Remove the loop
2025-08-26 18:17:32 +02:00
Pierre Tachoire
5defb5c442
http: build headers when auth challenge fails
2025-08-26 18:05:45 +02:00
Pierre Tachoire
520a572bb4
http: add reset and tries for transfer
2025-08-26 18:05:45 +02:00
Pierre Tachoire
4c602256da
http: remove useless field
2025-08-26 18:05:45 +02:00
Pierre Tachoire
5a40cbd655
cdp: use enum for AuthChallengeResponse
2025-08-26 18:05:45 +02:00
Pierre Tachoire
a75f9dd48d
cdp: set default username/passwd for authChallengeResponse
2025-08-26 18:05:44 +02:00
Pierre Tachoire
6b47aa2446
cdp: add auth required interception process
2025-08-26 18:05:44 +02:00
Pierre Tachoire
a847a1faae
http: replace _forbidden with _auth_challenge struct
2025-08-26 18:05:44 +02:00
Pierre Tachoire
bb381e522c
http: add creds into request
2025-08-26 18:05:39 +02:00
Karl Seguin
6962cfb91a
Merge pull request #973 from lightpanda-io/no-body-response
...
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
Handle response without body
2025-08-26 18:44:22 +08:00
Pierre Tachoire
302c50a90e
Merge pull request #964 from lightpanda-io/proxy-header
...
http: refacto headerCallback and get proxy CONNECT request details
2025-08-26 10:53:43 +02:00
sjorsdonkers
e2d47e1c86
fix merge conflict
2025-08-26 10:12:07 +02:00
Pierre Tachoire
7d51da1efb
Merge pull request #974 from lightpanda-io/ignore_non_js_script_tags
...
Removes the log for unknown script tags
2025-08-26 08:53:29 +02:00
Karl Seguin
c7674926c3
The most basic File implementation.
...
Almost silly as-is, but handles this case:
```
if (input instanceof File) {
throw Error('file not supported')
}
```
as seen on reddit.
2025-08-26 13:25:30 +08:00
Karl Seguin
f0ca9728ae
Support dynamic scripts which are added to the DOM before src is set
...
This should load the "src.js":
```
const s = document.createElement('script');
document.getElementsByTagName('body')[0].appendChild(s);
s.src = "src.js"
```
Notice that src is set AFTER the element is added to the DOM. This PR enables
the above, by
1 - skipping dynamically added scripts which don't have a src
2 - trying to load a script whenever `set_src` is called.
(2) is safe because the ScriptManager already prevents scripts from being
processed multiple times.
Additionally, not only can the src be set after the script is added to the DOM,
but onload and onerror can be set after the src:
```
s.src = "src.js"
s.onload = ...;
s.onerror = ...;
```
This PR also delays reading the onload/onerror callbacks until the script is
done loading.
This behavior is seen on reddit.
2025-08-26 13:10:55 +08:00
Karl Seguin
5fa8567801
Removes the log for unknown script tags
...
Some sites have a lot of text/template or application/json, and it just adds
noise to the logs.
2025-08-26 08:48:29 +08:00
sjorsdonkers
e5b1acb6e1
Handle response without body
2025-08-25 18:07:02 +02:00
Karl Seguin
8fdbaef4c7
Use posix.TCP.NODELAY now that it's available in MacOS also
2025-08-25 22:03:58 +08:00
Pierre Tachoire
7869159657
add e2e test through proxy
2025-08-25 14:18:15 +02:00
Pierre Tachoire
7046e18d7e
http: simplify header parsing
2025-08-25 14:18:14 +02:00
Pierre Tachoire
a7516061d0
http: move use_proxy from connection to client
2025-08-25 14:18:14 +02:00
Pierre Tachoire
e61d787ff0
http: move header done callback in its own func
...
And call it only after the headers are parsed, either from data callback
or end of the request.
2025-08-25 14:18:14 +02:00
Pierre Tachoire
25ad420f85
http: ajust header callback according to review
2025-08-25 14:18:14 +02:00
Pierre Tachoire
fcd49c000f
page: avoid crash on empty body
2025-08-25 14:18:13 +02:00
Pierre Tachoire
e2320ebe66
http: handle proxy's request header callback
2025-08-25 14:18:13 +02:00
Pierre Tachoire
5e78a26e3d
http: refacto http header parsing
2025-08-25 14:18:13 +02:00
Pierre Tachoire
159bd06a56
http: add use_proxy bool in connection
2025-08-25 14:18:12 +02:00
Pierre Tachoire
bc7e1e07f4
typo fix
2025-08-25 14:18:08 +02:00
Karl Seguin
ccc9618102
Merge pull request #971 from lightpanda-io/fix-send-error-json-format
...
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 sendError message's format
2025-08-25 19:05:47 +08:00
sjorsdonkers
0ad09cca9d
Fix sendError message's format
2025-08-25 12:51:47 +02:00
Karl Seguin
0959eea677
Remove the loop
...
Previously, the IO loop was doing three things:
1 - Managing timeouts (either from scripts or for our own needs)
2 - Handling browser IO events (page/script/xhr)
3 - Handling CDP events (accept, read, write, timeout)
With the libcurl merge, 1 was moved to an in-process scheduler and 2 was moved
to libcurl's own event loop. That means the entire loop code, including
the dependency on tigerbeetle-io existed for handling a single TCP client.
Not only is that a lot of code, there was also friction between the two loops
(the libcurl one and our IO loop), which would result in latency - while one
loop is waiting for the events, any events on the other loop go un-processed.
This PR removes our IO loop. To accomplish this:
1 - The main accept loop is blocking. This is simpler and works perfectly well,
given we only allow 1 active connection.
2 - The client socket is passed to libcurl - yes, libcurl's loop can take
arbitrary FDs and poll them along with its own.
In addition to having one less dependency, the CDP code is quite a bit simpler,
especially around shutdowns and writes. This also removes _some_ of the latency
caused by the friction between page process and CDP processing. Specifically,
when CDP now blocks for input, http page events (script loading, xhr, ...) will
still be processed.
There's still friction. For one, the reverse isn't true: when the page is
waiting for events, CDP events aren't going to be processed. But the page.wait
already have some sensitivity to this (e.g. the page.request_intercepted flag).
Also, when CDP waits, while we will process network events, page timeouts are
still not processed. Because of both these remaining issues, we still need to
jump between the two loops - but being able to block on CDP (even for a short
time) WITHOUT stopping the page's network I/O, should reduce some latency.
2025-08-25 17:27:28 +08:00
Pierre Tachoire
3316f2fcf4
Merge pull request #968 from lightpanda-io/normalize_cdp_response_headers
...
Normalize CDP response headers
2025-08-25 09:31:56 +02:00
Karl Seguin
390a21e4aa
Merge pull request #969 from lightpanda-io/fix_wpt_runner
...
Handle all case status (not just Pass and Fail)
2025-08-25 10:49:46 +08:00
Karl Seguin
70ce54a5cd
Handle all case status (not just Pass and Fail)
2025-08-25 10:40:23 +08:00
Karl Seguin
087e42a641
Normalize CDP response headers
...
chromedb doesn't support duplicate header names. Although servers _will_ send
this (e.g. Cache-Control: public\r\nCache-Control: max-age=60\r\n), Chrome
seems to join them with a "\n". So we do the same.
A note on curl_easy_nextheader, which this code ultimately uses to iterate
and collect the headers. The documentation says:
Applications must copy the data if they want it to survive subsequent API
calls or the life-time of the easy handle.
As-is, I'd understand this to mean that a given header name/value is only
valid until any API call, including another call to curl_easy_nextheader. So,
from this comment, we _should_ be duping the name/value. But we don't. Why?
Because, despite the note in the documentation, this doesn't appear to be how
it actually works, nor does it really make sense. If it's just a linked list,
there's no reason curl_easy_nextheader should invalidate previous results. I'm
guessing this is just a general lack of guarantee libcurl is willing to make re
lifetimes.
https://github.com/lightpanda-io/browser/issues/966
2025-08-25 09:25:15 +08:00
Karl Seguin
e26d4afce2
Merge pull request #963 from lightpanda-io/wpt_runner_fix_and_nodeiterator_tweak
...
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
Improves correctness of NodeIterator
2025-08-22 15:29:42 +08:00
Karl Seguin
b9ae4c6077
Update src/runtime/js.zig
...
Co-authored-by: Pierre Tachoire <pierre@lightpanda.io >
2025-08-22 15:17:59 +08:00
Pierre Tachoire
11485d24f5
Merge pull request #962 from lightpanda-io/compareBoundaryPoints
...
Add Range.compareBoundaryPoints
2025-08-22 09:08:22 +02:00
Karl Seguin
ce14f0b380
Improves correctness of NodeIterator
...
Minor improvement to correctness of TreeWalker.
Fun fact, this is the first time, that I've run into, where we have to default
null and undefined to different values.
Also, tweaked the WPT test runner. WPT test results use | as a field delimiter.
But a WPT test (and, I assume a message) can contain a |. So we had at least
a few tests that were being reported as failed, only because the result line
was weird / unexpected. No great robust way to parse this, but I changed it
to look explicitly for |Pass or |Fail and use those positions as anchor points.
2025-08-21 18:11:48 +08:00
Karl Seguin
8bb2158a2a
Add Range.compareBoundaryPoints
...
Also rename start_container and end_container to start_node and end_node.
2025-08-21 16:47:33 +08:00
Karl Seguin
1a9d4af565
Merge pull request #961 from lightpanda-io/cdp_getResponseBody
...
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
Implement Network.getResponseBody
2025-08-21 16:19:07 +08:00
Pierre Tachoire
a6f37633a1
Merge pull request #959 from lightpanda-io/html-pre
...
handle text content type with HTML
2025-08-21 09:38:36 +02:00
Pierre Tachoire
3182a47858
typo fix
2025-08-21 08:52:35 +02:00
Pierre Tachoire
7335b1d0a4
escape incoming plain text
2025-08-21 08:52:34 +02:00
Karl Seguin
cd33e9ad0e
Implement Network.getResponseBody
...
Add response_data event, CDP now captures the full body so that it can respond
to the Network.getResponseBody. This isn't memory efficient, but I don't see
another way to do it. At least this way, it's only capturing/storing every
response body when (a) CDP is used and (b) Network.enabled is called. That is,
as opposed to baking this into Http/Client.zig, which would force the memory
consumption for all use-cases.
There's arguably some optimizations we could make for XHR requests, which also
dupe/own the response. As of now, the response is dupe'd separately for CDP
and XHR.
2025-08-21 10:33:53 +08:00
Karl Seguin
557f8444b2
Merge pull request #955 from lightpanda-io/replace_deprecated_build
...
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
Makes build.zig Zig 0.15 ready
2025-08-21 10:09:59 +08:00
Karl Seguin
65088b8644
swap unnecessary addModule with createModule
2025-08-21 09:59:42 +08:00
Karl Seguin
7cc9521cbb
Merge pull request #958 from lightpanda-io/http_request_done_notification
...
Emits a http_request_done internal notification.
2025-08-21 09:23:41 +08:00
Karl Seguin
4ad19fc4d8
use merged v8 commit
2025-08-21 09:23:11 +08:00
Pierre Tachoire
ec71f8e2d9
handle text content type with HTML
...
For text content type (and application/json) we create a pseudo HTML
tree with the text value in a <pre> tag.
It allows CDP clients to interact with text content easily.
2025-08-20 15:27:15 +02:00
Pierre Tachoire
ff8a847795
Merge pull request #957 from lightpanda-io/remove_header_callback
...
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
Remove the http/Client.zig header_callback.
2025-08-20 14:35:06 +02:00
Karl Seguin
6b001c50a4
Emits a http_request_done internal notification.
...
With networking enabled, CDP listens to this event and emits a
`Network.loadingFinished` event. This is event is used by puppeteer to know that
details about the response (i.e. the body) can be queries.
Added dummy handling for the Network.getResponseBody message. Returns an
empty body. Needed because we emit the loadingFinished event which signals
to drivers that they can ask for the body.
2025-08-20 19:32:19 +08:00
Karl Seguin
5759c88932
Remove the http/Client.zig header_callback.
...
The callback which was called on a per-header basis is removed. Only XHR was
using this, and it was created before the HeaderIterator existed (because I
didn't know we could iterate through the response headers in curl after the fact).
The header_done_callback remains, but is now called header_callback (a bit
confusing in the short term).
The only difficulty was with fulfilled requests, which do not have an easy
handle for our HeaderIterator. The existing code would segfault if
transfer.responseHeaderIterator() was called on a fulfilled requests.
The HeaderIterator is now a tagged union that abstracts whether the source of
the response header is a curl easy, or just an injected list from the fulfilled
requests.
2025-08-20 17:49:37 +08:00
Karl Seguin
00c11d9bd4
Merge pull request #956 from lightpanda-io/typo-fix
...
typo fix
2025-08-20 17:06:16 +08:00
Pierre Tachoire
ed99acebfe
typo fix
2025-08-20 09:25:47 +02:00
Pierre Tachoire
bade412d30
Merge pull request #953 from lightpanda-io/is_navigation_and_arena
...
Use Transfer.arena in a few more places, correctly set is_navigation …
2025-08-20 08:59:32 +02:00
Pierre Tachoire
191e9ba073
Merge pull request #954 from lightpanda-io/remove_managed_arraylist
...
Replace all std.ArrayList with std.ArrayListUnmanaged
2025-08-20 08:55:03 +02:00
Karl Seguin
b21688a0ac
Makes build.zig Zig 0.15 ready
...
Our build.zig is using a number of deprecated features, which are removed in
0.15.
This updates build.zig so that it still works in 0.14 and [hopefully] will work
in 0.15.
Related: https://github.com/lightpanda-io/zig-v8-fork/pull/87
2025-08-20 14:54:27 +08:00
Karl Seguin
a4d4da4d96
Replace all std.ArrayList with std.ArrayListUnmanaged
...
Very minor, but the more we can do upfront to align the code for Zig 0.15, the
better.
2025-08-20 12:30:39 +08:00
Karl Seguin
16c85c5b8a
Use Transfer.arena in a few more places, correctly set is_navigation on redirect
...
Following up to Request Interception PR (1) and Cookie Redirect PR (2) which
both introduced features that were useful to the other. This PR closes that
loop.
(1) https://github.com/lightpanda-io/browser/pull/946
(2) https://github.com/lightpanda-io/browser/pull/948
2025-08-20 11:39:38 +08:00
Karl Seguin
2c7b39927a
Merge pull request #952 from lightpanda-io/fix_compilation_error
...
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
Fix compilation error
2025-08-20 10:28:54 +08:00
Karl Seguin
7f47692ad4
Fix compilation error
...
bad auto merge?
2025-08-20 10:04:15 +08:00
Karl Seguin
af4066da87
Merge pull request #946 from lightpanda-io/request_interception
...
Request Interception
2025-08-20 07:53:08 +08:00
Pierre Tachoire
4de4e7504d
Merge pull request #951 from lightpanda-io/wpt_range
...
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
Improve correctness of Node.compareDocumentPosition and Range api.
2025-08-19 17:23:39 +02:00
Karl Seguin
b46c181b07
zig fmt
2025-08-19 22:01:14 +08:00
Karl Seguin
e4f89092b3
add Range.intersectsNode and cover a few more edge-cases
2025-08-19 22:00:59 +08:00
Pierre Tachoire
4fbedf5b20
Merge pull request #948 from lightpanda-io/redirect-cookies
...
handle cookies on redirection manually
2025-08-19 14:48:37 +02:00
Karl Seguin
d51a03f1b6
Improve correctness of Node.compareDocumentPosition and Range api.
...
Should fix a good chunk (~20K I think) of the recently broken WPT tests.
2025-08-19 18:23:54 +08:00
Pierre Tachoire
f7eee0d461
http: add an arena to Transfer
2025-08-19 11:10:52 +02:00
Pierre Tachoire
39178d8d2b
http: remove uselesss Client.arena
2025-08-19 11:10:25 +02:00
Pierre Tachoire
7795916c08
apply review comments
2025-08-19 10:01:35 +02:00
Pierre Tachoire
0e2a3d8009
handle cookies on redirection manually
2025-08-19 10:01:11 +02:00
Karl Seguin
38a0b6905e
Merge pull request #949 from lightpanda-io/network_path_reference_stitch
...
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
Fix network-path reference stitching
2025-08-19 15:38:43 +08:00
Karl Seguin
8797549369
Fix network-path reference stitching
2025-08-18 23:05:11 +08:00
Karl Seguin
f5ec74252d
Add fulfillRequest and more complete continueRequest
2025-08-18 18:29:10 +08:00
Karl Seguin
211012d367
move intercept_state and extra_headers from CDP instance to BrowserContext
2025-08-18 13:23:17 +08:00
Karl Seguin
c1319d1f27
add proper resourceType
2025-08-18 12:42:18 +08:00
Pierre Tachoire
d4d8773fd1
Merge pull request #927 from lightpanda-io/window-frames
...
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
Partial window.frames implementation
2025-08-15 14:54:29 +02:00
Karl Seguin
01223601f2
Reduce allocations made during request interception
...
Stream (to json) the Transfer as a request and response object in the various
network interception-related events (e.g. Network.responseReceived).
Add a page.request_intercepted boolean flag for CDP to signal the page that
requests have been intercepted, allowing Page.wait to prioritize intercept
handling (or, at least, not block it).
2025-08-15 14:01:57 +08:00
Karl Seguin
d9ed4cfca8
Merge pull request #940 from lightpanda-io/redirect-cookies
...
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
enable curl cookie engine
2025-08-15 08:50:25 +08:00
Pierre Tachoire
7d0e4b6270
use CURLOPT_COOKIE to set cookies
2025-08-14 15:33:02 +02:00
Pierre Tachoire
b2f645a5ce
enable curl cookie engine
...
Enabling Curl cookie engine brings advantage:
* handle cookies during a redirection: when a srv redirects including
cookies, curl sends back the cookies correctly during the next request
2025-08-14 15:32:56 +02:00
Karl Seguin
6a29d6711c
Merge pull request #945 from lightpanda-io/remove_unecessary_content_type_parse
...
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
Remove unecessary content type parse
2025-08-14 19:07:41 +08:00
Karl Seguin
5b2806a784
expose response header amount
2025-08-14 18:57:57 +08:00
Karl Seguin
a2f15ce0b2
Remove unecessary content type parse
...
getResponseHeader takes header index
2025-08-14 18:26:01 +08:00
Karl Seguin
68400f3bcf
Merge pull request #944 from lightpanda-io/fix_memory_leak
...
fix memory leak
2025-08-14 18:20:53 +08:00
Karl Seguin
31f3c2771a
fix build error...sorry
2025-08-14 18:07:14 +08:00
Karl Seguin
f9352e26cb
same memory leak, different place
2025-08-14 18:00:56 +08:00
Karl Seguin
4fa542bc38
fix memory leak
2025-08-14 17:51:40 +08:00
Pierre Tachoire
a707e10af7
Merge pull request #922 from lightpanda-io/nonblocking_libcurl
...
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
Nonblocking libcurl
2025-08-14 11:43:19 +02:00
Pierre Tachoire
1e095fede5
zig fmt build.zig
2025-08-14 11:29:56 +02:00
Karl Seguin
96b10f4b85
Optimize Network.responseReceived
...
Add a header iterator to the transfer. This removes the need for NetworkState,
duping header name/values, and the http_header_received event.
2025-08-14 15:50:56 +08:00
Karl Seguin
5100e06f38
fix header done callback
2025-08-14 14:51:02 +08:00
Karl Seguin
35e2fa5058
Merge pull request #943 from lightpanda-io/integer-overflow
...
fix integer overflow for sleeping delay
2025-08-14 05:43:49 +08:00
Pierre Tachoire
8d2d4ffdd2
fix integer overflow for sleeping delay
2025-08-13 19:44:06 +02:00
sjorsdonkers
7d05712f40
setExtraHTTPHeaders
2025-08-13 14:54:59 +02:00
sjorsdonkers
c0106a238b
http_headers_done_receiving
2025-08-13 14:29:23 +02:00
Karl Seguin
f6c68e4580
fix release build (constness via telemetry, not seen in debug)
2025-08-13 20:16:14 +08:00
Karl Seguin
3c8065fdee
fix fmt
2025-08-13 20:12:39 +08:00
Karl Seguin
9bd8b2fc43
fix wpt runner
2025-08-13 19:39:49 +08:00
Karl Seguin
5a3d5f5512
improve elapsed display for larger numbers
2025-08-13 18:17:59 +08:00
Karl Seguin
ca9e850ac7
Create Client.Transfer earlier.
...
On client.request(req) we now immediately wrap the request into a Transfer. This
results in less copying of the Request object. It also makes the transfer.uri
available, so CDP no longer needs to std.Uri(request.url) anymore.
The main advantage is that it's easier to manage resources. There was a use-
after free before due to the sensitive nature of the tranfer's lifetime. There
were also corner cases where some resources might not be freed. This is
hopefully fixed with the lifetime of Transfer being extended.
2025-08-13 18:05:00 +08:00
Karl Seguin
2dc09c799f
Merge pull request #930 from lightpanda-io/request_interception
...
request interception
2025-08-13 14:44:26 +08:00
sjorsdonkers
a49154acf4
http_request_fail
2025-08-12 15:20:48 +02:00
sjorsdonkers
77eee7f087
Cookies
2025-08-12 14:40:23 +02:00
sjorsdonkers
03694b54f0
3# This is a combination of 3 commits.
...
intercept continue and abort
feedback
First version of headers, no cookies yet
2025-08-12 13:49:20 +02:00
Karl Seguin
bed320204d
Merge pull request #939 from lightpanda-io/raw-done
...
finalize document loading with non-HTML pages
2025-08-12 19:09:31 +08:00
Pierre Tachoire
971524fa3b
finalize document loading with non-HTML pages
...
Avoid infinite the loop of loading non-HTML documents with CDP.
2025-08-12 12:55:44 +02:00
Karl Seguin
4758456069
Merge pull request #938 from lightpanda-io/node_isConnected
...
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
Fix Node.isConnected
2025-08-12 18:17:28 +08:00
Karl Seguin
3ef4ba6b8b
Fix Node.isConnected
...
The previous implementation just checked if a node had a parent. But it should
check the node has a document ancestor:
```
const d1 = document.createElement('div');
document.createElement('div').appendChild(d1);
d1.isConnected
```
should be `false`.
In addition to this fix, also added support for DocumentFragments which are
part of the ShadowRoot. This, like events, is one of those apis that DOES break
the ShadowRoot isolation.
2025-08-12 17:23:38 +08:00
Karl Seguin
a504f051e7
Merge pull request #937 from lightpanda-io/event_composedPath
...
Add ShadowRoot get/set innerHTML
2025-08-12 17:22:25 +08:00
Karl Seguin
ea0bbaf332
Revert "Treat pending requests as active"
...
This reverts commit 19c908035b .
2025-08-12 11:27:28 +08:00
Karl Seguin
19c908035b
Treat pending requests as active
...
This ensures that page.wait won't unblock too early. As-is, this isn't an issue
since active can only be 0 if there are no active OR pending requests. However,
with request interception (https://github.com/lightpanda-io/browser/pull/930 )
it's possible to have no active requests and no pending requests - from the
http client's point of view - but still have pending-on-intercept requests.
An alternative to this would be to undo these changes, and instead change
Page.wait to be intercept-aware. That is, Page.wait would continue to block on
http activity and scheduled tasks, as well as intercepted requests. However,
since the Page doesn't know anything about CDP right now, and it does know
about the http client, maybe doing this in the client is fine.
2025-08-12 11:13:19 +08:00
Muki Kiboigo
05192b6850
update flake
2025-08-11 12:09:22 -07:00
Karl Seguin
079ce5e9de
whitelist application/ld+json
2025-08-11 21:38:36 +08:00
Karl Seguin
ff742c0169
don't allow concurrent blocking calls
2025-08-11 21:38:36 +08:00
Karl Seguin
332e264437
remove unimportant todos
2025-08-11 21:38:34 +08:00
Karl Seguin
3554634c1c
cleanup optional request headers
2025-08-11 21:37:03 +08:00
Karl Seguin
c96fb3c2f2
support CDP proxy override
2025-08-11 21:37:03 +08:00
Karl Seguin
1e612e4166
Add command line options to control HTTP client
...
http_timeout_ms
http_connect_timeout_ms
http_max_host_open
http_max_concurrent
2025-08-11 21:37:03 +08:00
Karl Seguin
06984ace21
fix overflow and debug units
2025-08-11 21:37:03 +08:00
Karl Seguin
cabd4fa718
re-enable datauris
2025-08-11 21:37:03 +08:00
Karl Seguin
ddb549cb45
cookie support
2025-08-11 21:37:02 +08:00
Karl Seguin
c7484c69c0
Increase max concurrent request to 10
...
Improve wait analysis dump.
De-prioritize secondary schedules.
Don't log warning for application/json scripts
Change pretty log timer to display time from start.
2025-08-11 21:37:02 +08:00
Karl Seguin
9876d79680
Add Accept-Encoding
...
This is necessary because of CloudFront which will send gzip content even if
we don't ask for it.
Properly handle scripts that are both async and defer.
Add a helper to print state of page wait. This can be helpful in identifying
what's causing the page to hang on page.wait.
2025-08-11 21:37:02 +08:00
Karl Seguin
32566ccc80
Set window location on load
...
Set SUPPRESS_CONNECT_HEADERS option.
2025-08-11 21:37:02 +08:00
Karl Seguin
7f9e309ae8
Shutdown clean async scripts
...
Set parent current script
2025-08-11 21:37:02 +08:00
Karl Seguin
7831aabe5a
connect proxy
2025-08-11 21:37:02 +08:00
Karl Seguin
74b40b97ec
fix ScriptManager wrong order execution
2025-08-11 21:37:02 +08:00
Karl Seguin
f45726d61f
ScriptManager & HttpClient support for JS modules
...
Improve cleanup/shutdown (*cough* memory leaks *cough*)
2025-08-11 21:37:01 +08:00
Karl Seguin
3c0d027306
dynamic script support
2025-08-11 21:37:01 +08:00
Karl Seguin
dc83765808
fix build
2025-08-11 21:37:01 +08:00
Karl Seguin
4244b572d1
Improve page.wait
...
Allow page.wait to transition page mode.
Optimize initial page load. No point running scheduler until the initial
page is loaded.
Support ISO-8859-1 charset
2025-08-11 21:37:01 +08:00
Karl Seguin
77475ca5e4
Re-enable --insecure_disable_tls_host_verification
...
Better error logs on http callback error
Fix wait timing
2025-08-11 21:37:01 +08:00
Karl Seguin
3555680335
Working navigation events (clicks, form submission)
2025-08-11 21:37:01 +08:00
Karl Seguin
f65a39a3e3
Re-enable telemetry
...
Start work on supporting navigation events (clicks, form submission).
2025-08-11 21:37:00 +08:00
Karl Seguin
94e8964f69
add custom scheduler
2025-08-11 21:37:00 +08:00
Karl Seguin
254d22e2cc
don't poll libcurl if we have no running transfers
2025-08-11 21:37:00 +08:00
Karl Seguin
54ab1326e5
Switch XHR to new http client
...
get puppeteer/cdp.js working again
make test are all passing
2025-08-11 21:37:00 +08:00
Karl Seguin
b0fe5d60ab
Initial work on integrating libcurl and making all http nonblocking
2025-08-11 21:36:56 +08:00
Karl Seguin
4b1eb2794f
Add ShadowRoot get/set innerHTML
...
Adds event.composedPath()
This depends on https://github.com/lightpanda-io/libdom/pull/34
2025-08-11 16:32:08 +08:00
Karl Seguin
6a2dd1111c
Merge pull request #928 from lightpanda-io/lit_compat
...
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
lit compatibility
2025-08-11 08:30:34 +08:00
Karl Seguin
f5da89b50b
lit compatibility
...
Aims to improve compatibility for the lit framework (e.g. what Reddit is using).
1 - Adds support for adoptedStyleSheets to the Document and ShadowRoot
2 - Adds mock support for replace and replaceSync to the CSSStyleSheet
3 - Optionally include shadowroot in dump
4 - Special-case setting innerHTML on a TemplateElement
2025-08-09 07:43:27 +08:00
Karl Seguin
bede244598
Merge pull request #934 from lightpanda-io/with-base
...
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 --with_base option to fetch
2025-08-09 07:37:32 +08:00
Karl Seguin
4df48c9695
Merge pull request #935 from lightpanda-io/mouse-event-log
...
use internal logger instead of std.log
2025-08-09 07:36:35 +08:00
Karl Seguin
05ad77ffbe
Merge pull request #936 from lightpanda-io/runtime-empty-array
...
Fix crashes with empty array
2025-08-09 07:36:09 +08:00
Pierre Tachoire
dc23a74e7b
add <base> in the DOM tree
2025-08-08 18:34:14 +02:00
Pierre Tachoire
f463cb16da
runtime: handle empty array parameter
2025-08-08 17:50:18 +02:00
Pierre Tachoire
b785884cd8
runtime: fix returning an empty array crash
2025-08-08 17:26:39 +02:00
Pierre Tachoire
f09caec09a
use internal logger instead of std.log
2025-08-08 16:21:23 +02:00
Pierre Tachoire
5e30a3997e
typo fix
...
Co-authored-by: Karl Seguin <karlseguin@users.noreply.github.com >
2025-08-08 16:17:52 +02:00
Karl Seguin
8552a5797c
Merge pull request #933 from lightpanda-io/document_fragment_get_element_by_id
...
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
Add DocumentFragment getElementById
2025-08-08 22:06:02 +08:00
Karl Seguin
a0d528981e
Merge pull request #932 from lightpanda-io/libdom_element_attributes
...
Updates libdom
2025-08-08 22:05:42 +08:00
Pierre Tachoire
7ffdee0d7f
node: add baseURI getter
2025-08-08 15:21:20 +02:00
Pierre Tachoire
3d0928a449
add a --with_base option to fetch
...
with_base option adds a <base> tag to the dump for better offline preview.
2025-08-08 15:18:11 +02:00
Pierre Tachoire
ea1bca05c7
fix no-script default value
2025-08-08 14:30:41 +02:00
Karl Seguin
df292a2103
Add DocumentFragment getElementById
2025-08-08 17:05:22 +08:00
Karl Seguin
7f2c360f33
Updates libdom
...
libdom's parsing is now less strict with respect to attribute names. See:
https://github.com/lightpanda-io/libdom/pull/33
However, the attribute name in setAttribute has stricter validation applied to
it, which we now handle directly.
2025-08-08 16:22:25 +08:00
Karl Seguin
fbd40a6514
Merge pull request #931 from lightpanda-io/element_getAttributeNames
...
add element.getAttributeNames()
2025-08-08 15:13:03 +08:00
Karl Seguin
9dd02ec67d
add element.getAttributeNames()
2025-08-08 10:23:45 +08:00
Karl Seguin
8e55082d4e
Merge pull request #929 from lightpanda-io/fix-webcomponents
...
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
webcomponent must be cast as HTMLElement
2025-08-07 19:04:31 +08:00
Pierre Tachoire
29378c57ea
node: cast the libdom document depending its type
2025-08-07 12:54:18 +02:00
Pierre Tachoire
16c74cf3b4
element: fix toInterface for webcomponents
...
The webcomponents tag can be anything. But we must return them as
HTMLElement for HTML documents.
2025-08-07 12:47:02 +02:00
Pierre Tachoire
b199925f91
iframe: move HTMLIFrameElement in its own file
2025-08-07 10:35:04 +02:00
Pierre Tachoire
28397bf9d0
window: frame is obsolete, ignore them from frames list
2025-08-07 10:04:42 +02:00
Pierre Tachoire
1b7abf9972
window: partial implementation for indexed_get
2025-08-06 18:29:26 +02:00
Pierre Tachoire
b98bdeaae7
window.length dynamically
2025-08-06 18:29:25 +02:00
Pierre Tachoire
221274b473
first change to start support frames
2025-08-06 16:19:52 +02:00
Karl Seguin
cc6d443113
Merge pull request #926 from lightpanda-io/noscript_exclude_preload
...
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
When --noscript is specified, also exclude <link rel=preload as=script>
2025-08-06 19:45:52 +08:00
Karl Seguin
b3c81c9e55
When --noscript is specified, also exclude <link rel=preload as=script>
2025-08-06 18:04:57 +08:00
Pierre Tachoire
84d07f3f18
Merge pull request #919 from lightpanda-io/html_element-and-element
...
Create HTMLElement instead of pure Element
2025-08-06 10:55:46 +02:00
Pierre Tachoire
0fee2bbf28
upgrade netsurf/libdom
2025-08-06 10:42:54 +02:00
Pierre Tachoire
ea38845622
detect HTML document
2025-08-06 10:42:54 +02:00
Pierre Tachoire
81a0e95916
netsurf: remove inline for documentCreateHTMLElement*
2025-08-06 10:42:54 +02:00
Pierre Tachoire
2a9feee476
init default HTML doc and Image w/ HTML Elements
2025-08-06 10:42:53 +02:00
Pierre Tachoire
c38c1fa93a
remove netsurf.elementHTMLGetTagType
2025-08-06 10:42:53 +02:00
Pierre Tachoire
8d7c35d034
refacto and use Element.toInterface
2025-08-06 10:42:53 +02:00
Pierre Tachoire
425f62607b
add Tag.fromString to get element tag from tagname
2025-08-06 10:42:52 +02:00
Pierre Tachoire
c1752ae5eb
document.documentElement returns a *parser.Element
...
For XML documents, the documentElement could be another element than
HTMLElement. So we don't want to pass to through the toInterface.
2025-08-06 10:42:52 +02:00
Pierre Tachoire
d61e91b949
Merge pull request #924 from lightpanda-io/fix-null-owner
...
node: check owner null before using it
2025-08-06 10:38:59 +02:00
Pierre Tachoire
090c0f8857
node: check owner null before using it
2025-08-05 18:23:41 +02:00
Pierre Tachoire
c453dd2b3c
Merge pull request #923 from lightpanda-io/doc-owner-next
...
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
node: don't call owner twice in _insertBefore
2025-08-05 15:59:16 +02:00
Pierre Tachoire
b2b2e97edc
zig fmt
2025-08-05 14:47:25 +02:00
Pierre Tachoire
bd9e4dbc79
node: don't call owner twice in _insertBefore
...
When the ref_node_ is null, call directly _appendChild w/o fixing the
node's owner.
2025-08-05 14:45:25 +02:00
Pierre Tachoire
0c19070800
Merge pull request #920 from SrikanthKumarC/main
...
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
Fix: Properly handle node ownership when using appendChild and insertBefore
2025-08-05 14:45:18 +02:00
Karl Seguin
07e37b257f
Merge pull request #921 from lightpanda-io/cdp-agent-commt
...
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
cdp: add comment for CDP_USER_AGENT
2025-08-05 07:38:43 +08:00
Srikanth
0a5f060d1b
add tests and simplify walker traversal
2025-08-04 23:53:29 +05:30
muki
6fcfcb630d
Merge pull request #916 from lightpanda-io/allow-nullable-listener
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
2025-08-04 06:15:39 -07:00
Pierre Tachoire
7aff90aec7
cdp: add comment for CDP_USER_AGENT
2025-08-04 14:40:44 +02:00
Srikanth
f1e513443b
refactor: use walker to traverse the nodes
2025-08-04 14:27:39 +05:30
Srikanth
c533b10e19
fix: traverse all children correctly
2025-08-04 13:00:03 +05:30
Srikanth
b4014e8c24
Fix: Properly handle node ownership when using appendChild and insertBefore
2025-08-03 20:27:32 +05:30
sjorsdonkers
478f3a5308
simplify statusText
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
2025-07-29 09:53:54 +02:00
sjorsdonkers
b98edf3d76
CDP response statusText
2025-07-29 09:53:54 +02:00
Karl Seguin
02fe46de58
Merge pull request #915 from lightpanda-io/css_tweaks
...
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
Tweak cssom
2025-07-24 19:28:21 +08:00
Karl Seguin
ab2fd0ad36
Merge pull request #911 from lightpanda-io/select_options
...
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
Implement select.options
2025-07-24 07:48:12 +08:00
Muki Kiboigo
88655d877b
handle null event listener
2025-07-23 06:53:44 -07:00
Karl Seguin
6e94affea6
Update src/browser/dom/html_collection.zig
...
Co-authored-by: Sjors <72333389+sjorsdonkers@users.noreply.github.com >
2025-07-23 21:34:42 +08:00
Karl Seguin
f7f382275a
Merge pull request #908 from lightpanda-io/guard_against_double_script_execution
...
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
Prevent double-execution of script tags.
2025-07-23 21:33:52 +08:00
Karl Seguin
23f3bf43c2
Merge pull request #910 from lightpanda-io/performance_getEntriesByX
...
Add placeholder performance getEntriesByName and Type
2025-07-23 21:19:01 +08:00
Karl Seguin
8a0c4909b9
fix file casing
2025-07-23 16:06:07 +08:00
Karl Seguin
2aeaf02d05
Tweak cssom
...
The only functionality change is adding a `named_set` to the CSSStyleDeclaration
so that styles can be set (`named_get` was already defined)
Combine the StringHashMapUnmanaged + ArrayListUnmanaged into a single
StringArrayHashMapUnmanaged.
Use file structs, because @import("css_style_declaration.zig").CSSStyleDeclaration
is a bit tedious.
Various micro-optimization around parsing CSS, e.g. ascii.eqlIgnoreCase in loops
replaced by 1 lowercase + N*mem.eql.
2025-07-23 15:34:32 +08:00
Karl Seguin
f4a6e34713
update libdom
2025-07-23 07:51:33 +08:00
Karl Seguin
3eb85da02c
Implement select.options
...
Add HTMLOptionsCollection and enhance HTMLOptionElement API.
Amazon.
2025-07-23 07:39:53 +08:00
Karl Seguin
6533456472
Add placeholder performance getEntriesByName and Type
2025-07-22 08:05:52 +08:00
Karl Seguin
7969e047c7
Merge pull request #909 from lightpanda-io/zig_fmt
...
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
zig fmt
2025-07-22 08:05:50 +08:00
Karl Seguin
f0d6d9d177
zig fmt
2025-07-22 07:57:17 +08:00
Karl Seguin
ca574df3be
Prevent double-execution of script tags.
...
Depends on https://github.com/lightpanda-io/libdom/pull/31
2025-07-22 07:54:39 +08:00
Karl Seguin
0b793d82fe
Merge pull request #907 from lightpanda-io/array_buffer_as_u8_slice
...
Map ArrayBuffer and ArrayBufferView to u8.
2025-07-22 07:13:57 +08:00
Karl Seguin
f6d51462eb
Merge pull request #906 from lightpanda-io/text_decoder
...
Add TextDecoder (utf8 support only)
2025-07-22 07:13:21 +08:00
Karl Seguin
5bdacbab61
Merge pull request #903 from lightpanda-io/MessageChannel
...
Add MessageChannel
2025-07-22 07:13:07 +08:00
Karl Seguin
e239cc962b
Merge pull request #904 from lightpanda-io/minor-refactor-prep-for-tls
...
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
Minor refactor prep for tls
2025-07-21 20:55:35 +08:00
sjorsdonkers
6ebd4fcf5b
fix unencrypted keepalive
2025-07-21 14:28:53 +02:00
Karl Seguin
ef427fa966
Map ArrayBuffer and ArrayBufferView to u8.
...
Depends on https://github.com/lightpanda-io/zig-v8-fork/pull/86
Built ontop of https://github.com/lightpanda-io/browser/pull/906 just because
this is the feature that uses it.
2025-07-21 19:46:57 +08:00
Karl Seguin
f4383a11d7
Merge pull request #905 from lightpanda-io/scheme_only_url
...
Allow scheme-only URLs
2025-07-21 19:36:24 +08:00
Karl Seguin
77b6377473
Add TextDecoder (utf8 support only)
2025-07-21 16:29:42 +08:00
Karl Seguin
7bf3cf999f
Allow scheme-only URLs
...
new URL('sveltekit-internal://') is valid. Used by amazon.
2025-07-21 15:46:23 +08:00
sjorsdonkers
4ab611de0c
minor refactor prep for tls
2025-07-21 09:30:22 +02:00
Karl Seguin
d7745a418f
Merge pull request #902 from lightpanda-io/window_DOMContentLoaded
...
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
Trigger the DOMContentLoaded on the Window
2025-07-19 08:51:12 +08:00
Karl Seguin
058a5a43ba
Add MessageChannel
2025-07-18 16:47:04 +08:00
Karl Seguin
878dbd81b1
Merge pull request #901 from lightpanda-io/url_stitch
...
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
Rework URL.stitch, handle ../ (for yahoo)
2025-07-17 21:44:24 +08:00
Karl Seguin
3c64ed1eb2
Merge pull request #899 from lightpanda-io/element_remove
...
Add element.remove() (needed by reddit)
2025-07-17 21:44:08 +08:00
Karl Seguin
ee50f1238c
Trigger the DOMContentLoaded on the Window
...
This is hacky, but it's inspired by how NetSurf does it. While the Window isn't
the parent of the Document, many events should bubble from the Document to the
Window. libdom simply doesn't handle this (it has no concept of a Window, and
the Document has no parent).
We potentially need to do this for multiple event types (NetSurf only does it
for the 'load' event as far as I can tell). It would be nice to find a generic
way to do this...maybe intercept any addEventListener on the body and
registering special events on the Window? For now, `DOMContentLoaded` is the
blocking (for finance.yahoo.com) and we can see if this is really an issue for
other event types.
2025-07-17 21:38:54 +08:00
Karl Seguin
1af2513fc0
zig fmt
2025-07-17 20:52:15 +08:00
Karl Seguin
9c0d26bc84
add note about incomplete removal
2025-07-17 20:51:05 +08:00
Karl Seguin
4d9053a83b
Update src/url.zig
...
Co-authored-by: Sjors <72333389+sjorsdonkers@users.noreply.github.com >
2025-07-17 20:45:42 +08:00
Karl Seguin
3f7e98c277
Update src/url.zig
...
Co-authored-by: Sjors <72333389+sjorsdonkers@users.noreply.github.com >
2025-07-17 20:45:35 +08:00
Karl Seguin
aebc877e7b
Merge pull request #900 from lightpanda-io/getDocument_depth
...
support `depth` parameter for DOM.getDocument
2025-07-17 20:44:58 +08:00
Karl Seguin
eef5f3fec2
support null params to CDP DOM.getDocument
2025-07-17 19:05:17 +08:00
Karl Seguin
16a1677fde
Rework URL.stitch, handle ../ (for yahoo)
...
Also handle ./ anywhere in the path.
2025-07-17 17:54:00 +08:00
Karl Seguin
f199816fcd
support depth parameter for DOM.getDocument
2025-07-17 14:17:33 +08:00
Karl Seguin
5e74e17b41
Merge pull request #888 from lightpanda-io/cdp_dom_requestChildNodes
...
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 support for CDP's DOM.requestChildNodes
2025-07-17 10:48:24 +08:00
Karl Seguin
98b041e84a
requestChildNode cannot have a depth of 0
2025-07-17 10:36:20 +08:00
Karl Seguin
bba9c8f652
Add element.remove() (needed by reddit)
2025-07-17 10:00:38 +08:00
Karl Seguin
1a05fe6ae1
Merge pull request #887 from lightpanda-io/go_rod
...
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
Noop CDP methods that go-rod requires
2025-07-16 20:01:03 +08:00
sjorsdonkers
16fcbf66ee
http_proxy_before ?? comment
2025-07-16 11:20:00 +02:00
Karl Seguin
b7fd4e90e2
Merge pull request #894 from lightpanda-io/HTMLStyleElement_get_sheet
...
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 HTMLStyleElement.get_sheet
2025-07-16 10:34:37 +08:00
Karl Seguin
b6341c10cc
Merge pull request #892 from lightpanda-io/set_timeout_params
...
Support params for setTimeout and setInterval
2025-07-16 08:17:11 +08:00
Karl Seguin
08487b0fcc
Merge pull request #891 from lightpanda-io/reattach_shadowroot
...
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
Add childElementCount and children to DocumentFragment
2025-07-15 23:36:26 +08:00
muki
b084dde22a
Merge pull request #872 from lightpanda-io/dynamic-import
2025-07-15 08:31:52 -07:00
Karl Seguin
5229a7c997
Merge pull request #897 from lightpanda-io/animate
...
Add Element.animate and Animation
2025-07-15 23:09:08 +08:00
Karl Seguin
e56c56e2fe
Merge pull request #895 from lightpanda-io/performance_clear
...
dummy performance clearMarks and clearMeasures
2025-07-15 21:40:31 +08:00
Karl Seguin
7374f956cf
Merge pull request #896 from lightpanda-io/dont_send_after_disconnect
...
Don't queue data to send after we've initiated a disconnect of the cl…
2025-07-15 21:29:01 +08:00
Muki Kiboigo
287df42994
log module specifier on dynamic import stages
2025-07-15 06:22:52 -07:00
Muki Kiboigo
06e514cc2e
use resource_str for stitching url
2025-07-15 06:22:52 -07:00
Muki Kiboigo
dffd8b5fec
use module() for dynamic imports
2025-07-15 06:22:52 -07:00
Muki Kiboigo
2a87337875
dynamicImportCallback in JsContext
2025-07-15 06:22:50 -07:00
Karl Seguin
a74f79118f
Merge pull request #893 from lightpanda-io/dump_noscript
...
Add a --noscript option to "improve" --dump
2025-07-15 21:22:33 +08:00
Muki Kiboigo
a13ed0bec3
add dynamic import callback to isolate
2025-07-15 06:22:13 -07:00
Karl Seguin
f8ca45f0f2
Add Element.animate and Animation
...
These are dummy implementations, but they do expose the ready and finished
promise, and do resolve the finished promise, so it should unblock basic cases.
2025-07-15 18:58:58 +08:00
Karl Seguin
4bf92a34f6
Don't queue data to send after we've initiated a disconnect of the client
2025-07-15 17:58:57 +08:00
Karl Seguin
4f1c84004a
dummy performance clearMarks and clearMeasures
2025-07-15 12:11:28 +08:00
Karl Seguin
1bd430598d
add HTMLStyleElement.get_sheet
2025-07-15 10:59:59 +08:00
Karl Seguin
3bc654bf97
Merge pull request #890 from lightpanda-io/xhr_cant_block_sync_requests
...
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
Always make sure we have 1 free http state available for synchronous …
2025-07-15 10:08:54 +08:00
Karl Seguin
3906acb83d
fix test
2025-07-14 18:42:25 +08:00
Karl Seguin
cfd62ac137
Add a --noscript option to "improve" --dump
...
Currently, fetch --dump includes <script> tag (either inline or with src). I
don't know what use-case this is the desired behavior. Excluding them, via the
new --noscript option has benefit that if you --dump --noscript and open the
resulting page in the browser, you don't re-execute JavaScript, which is
likely to break the page.
For example, opening a --dump of github makes it look like the page is broken
because it re-executes JavaScript that isn't meant to be re-executed.
Similarly, opening a --dump in a browser might execute JavaScript that
lightpanda browser failed to execute, making it looks like it worked better
than it did.
2025-07-14 18:24:36 +08:00
Karl Seguin
cd540dfae9
Support params for setTimeout and setInterval
2025-07-14 17:42:53 +08:00
Karl Seguin
74ad9ec8bf
Add childElementCount and children to DocumentFragment
...
Also, when shadowRoot is re-attached to an element, clear all existing children
(like we're supposed to)
2025-07-14 17:01:11 +08:00
Karl Seguin
4f8a3fe5b9
Always make sure we have 1 free http state available for synchronous requests
...
If it wasn't for the fact that the HTTP client is likely going to see a major
refactor, it would definitely be time to create a specific state instance for
synchronous requests.
2025-07-14 16:41:26 +08:00
Karl Seguin
09ca0e6ef0
Add support for CDP's DOM.requestChildNodes
...
https://github.com/lightpanda-io/browser/issues/866
2025-07-14 15:13:01 +08:00
Karl Seguin
fae2b5acfa
Noop CDP methods that go-rod requires
...
go-rod appears to stop processing when it receives an error, such as
UnknownMethod. Added placeholder handlers for Network.setUserAgentOverride and
Page.stopLoading.
Setting a custom user agent is something still being discussed, so no-oping it
seems reasonable. And, due to the currently synchronous nature of the initial
page load, no-oping stopLoading also seems reasonable.
https://github.com/lightpanda-io/browser/issues/867
2025-07-14 11:21:02 +08:00
Karl Seguin
d35a3eab6c
Merge pull request #880 from lightpanda-io/webcomponents
...
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
Add basic ShadowRoot implementation, polyfill webcomponents
2025-07-14 11:10:40 +08:00
Karl Seguin
7f7f47497a
Merge pull request #886 from lightpanda-io/scriptcompiler-compile
...
use ScriptCompiler to compile script
2025-07-14 11:07:29 +08:00
Karl Seguin
eb14ac3741
update build.zig.zon v8 version
2025-07-14 11:00:01 +08:00
Karl Seguin
22334faba3
update zig-v8-fork lib version
2025-07-14 10:51:27 +08:00
Karl Seguin
d08fd297e8
Merge pull request #881 from lightpanda-io/window_queueMicrotask
...
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 window.queueMicrotask
2025-07-13 09:03:57 +08:00
Pierre Tachoire
0dd664bfbf
use ScriptCompiler to compile script
2025-07-12 12:09:16 -07:00
Karl Seguin
1602932d72
Add a "pre" polyfill
...
This is always run, but only the full webcomponents polyfill, it's very
small and isn't intrusive. This introduces a layer of indirection so that,
if the full polyfill is loaded, its monkeypatched constructor will be called
2025-07-12 19:49:19 +08:00
Karl Seguin
98c8b7d2b0
Merge pull request #875 from lightpanda-io/async_forward_proxy_to_tls
...
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
Fix async https requests over a http forward proxy
2025-07-11 17:53:53 +08:00
Karl Seguin
b9ae24c42d
add window.queueMicrotask
2025-07-11 17:46:39 +08:00
Karl Seguin
b387fd2bd4
Update src/http/client.zig
...
Co-authored-by: Sjors <72333389+sjorsdonkers@users.noreply.github.com >
2025-07-11 17:38:31 +08:00
Karl Seguin
818f4540fd
Add basic ShadowRoot implementation, polyfill webcomponents
2025-07-11 17:32:01 +08:00
sjorsdonkers
49a97dbb66
fix callback crash with Node.Union
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
2025-07-11 10:05:44 +02:00
sjorsdonkers
a8b72c1d5f
Separate NodeIterator impl, fix _filter
2025-07-11 10:05:44 +02:00
sjorsdonkers
765b8dc97b
NodeIterator
2025-07-11 10:05:44 +02:00
sjorsdonkers
5123697afe
EventTarget internal type for all
2025-07-11 09:55:16 +02:00
sjorsdonkers
2a2a9d7941
EventTarget InternalType
2025-07-11 09:55:16 +02:00
sjorsdonkers
2873aa5f81
EventTarget constructor
2025-07-11 09:55:16 +02:00
Karl Seguin
795c925ba1
Revert "Update src/http/client.zig"
...
This reverts commit 4a12d045e4 .
2025-07-11 09:49:40 +08:00
Karl Seguin
d6ace3f695
Merge pull request #863 from lightpanda-io/innerHTML_head
...
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
Setting innerHTML now captures head elements
2025-07-11 08:03:14 +08:00
Karl Seguin
dd04759de7
Merge pull request #869 from lightpanda-io/performance_observer
...
more PerformnaceObserver placeholders
2025-07-11 08:03:01 +08:00
Pierre Tachoire
10fbde84ba
Merge pull request #879 from lightpanda-io/css-parser-error
...
Fix parser identifier with escaped string
2025-07-10 16:10:14 -07:00
Pierre Tachoire
2b5652e1e4
wip
2025-07-10 16:01:36 -07:00
Pierre Tachoire
18796ae44e
css: allow escaped first char in identifier name
2025-07-10 15:44:04 -07:00
Pierre Tachoire
a67692dc29
Merge pull request #877 from lightpanda-io/visible-pseudoclass
...
Visible Psuedoclass
2025-07-10 14:18:10 -07:00
Muki Kiboigo
1efd756a55
add visible pseudoclass
2025-07-10 12:40:44 -07:00
Pierre Tachoire
29671acdb6
Merge pull request #847 from lightpanda-io/name-property-handler
...
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
enable conditionnal loading for polyfill
2025-07-10 09:18:29 -07:00
Karl Seguin
e82240a60e
Setting innerHTML now captures head elements
...
I couldn't find where the behavior is described. AND, browsers seem to behave
differently depending on the state of the page (blank document vs actual page).
Still, some sites use innerHTML to load <script> tags, and, in libdom at least,
these are created in the implicit head. We cannot just copy the body nodes. To
keep it simple, I now copy all head and body elements.
2025-07-10 22:19:53 +08:00
Karl Seguin
72083c8614
Merge pull request #868 from lightpanda-io/element_hasAttributes_fix
...
Fix element.hasAttributes
2025-07-10 21:46:33 +08:00
Karl Seguin
8c2c1e534c
Merge pull request #865 from lightpanda-io/document_domain
...
Fix document.domain
2025-07-10 21:46:15 +08:00
Karl Seguin
bfc01d957b
Merge pull request #874 from lightpanda-io/document_styleSheets
...
add dummy document.get_styleSheets
2025-07-10 21:46:00 +08:00
Karl Seguin
4a12d045e4
Update src/http/client.zig
...
Co-authored-by: Sjors <72333389+sjorsdonkers@users.noreply.github.com >
2025-07-10 17:10:58 +08:00
Karl Seguin
2d78b2c219
add TODO note for dummy implementation
2025-07-10 17:03:51 +08:00
Karl Seguin
3049bb0b9f
Fix async https requests over a http forward proxy
...
XHR requests to https (which is most XHR requests) currently don't work with
the implementation proxy because of this.
2025-07-10 16:27:09 +08:00
Karl Seguin
34ab8152fb
add dummy document.get_styleSheets
2025-07-10 13:45:49 +08:00
Karl Seguin
fb58c50fb7
Merge pull request #870 from lightpanda-io/popover_open_pseudo_selector
...
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
Accept popover-over pseudo selector
2025-07-10 08:27:43 +08:00
Pierre Tachoire
955f917015
Merge pull request #873 from lightpanda-io/macos-build
...
ci: fix macos version for building
2025-07-09 15:35:09 -07:00
Pierre Tachoire
12c7df98e4
ci: fix macos version for building
2025-07-09 15:26:07 -07:00
Pierre Tachoire
889c29a163
Merge pull request #871 from lightpanda-io/ws-http-max
...
ws: increase max http message from 2kb to 4kb
2025-07-09 15:13:50 -07:00
Pierre Tachoire
886c1370e7
ws: increase max http message from 2kb to 4kb
2025-07-09 15:02:40 -07:00
Karl Seguin
febcc0a673
Merge pull request #864 from lightpanda-io/link_href
...
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 HTMLElementLink get/set href
2025-07-09 18:48:17 +08:00
Karl Seguin
98cad6bf8d
Accept popover-over pseudo selector
...
Optimize pseudo-selector parsing. Make comparison case insensitive, bucket
comparisons by length, and process input as integers.
2025-07-09 18:45:28 +08:00
Karl Seguin
7e5daedc8c
more PerformnaceObserver placeholders
2025-07-09 18:10:23 +08:00
Karl Seguin
da3fe6f7ea
fix test
2025-07-09 17:41:05 +08:00
Karl Seguin
f612ce262f
Update src/browser/html/elements.zig
...
Co-authored-by: Sjors <72333389+sjorsdonkers@users.noreply.github.com >
2025-07-09 16:16:45 +08:00
Karl Seguin
24ccfca279
Fix element.hasAttributes
...
libdom's hasAttributes is based on the type. Elements, according to libdom,
always have attributes, thus hasAttributes always return true, even when the
element in question has no attribute. Change our _hasAttributes to only return
true if the attribute count > 0.
2025-07-09 16:14:53 +08:00
Karl Seguin
34b3c3982b
Fix document.domain
...
Currently seems to always return null. Doesn't seem to be a way in libdom to
change this. The property is deprecated, and MDN recommends using location.host
instead, so change document.get_domain to wrap location.host.
2025-07-09 14:29:05 +08:00
Karl Seguin
7f732c94da
add HTMLElementLink get/set href
2025-07-09 13:28:32 +08:00
Karl Seguin
bdc49a65aa
Merge pull request #859 from lightpanda-io/document_fragment_query_selector
...
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 querySelect and querySelectorAll to DocumentFragment
2025-07-09 10:25:35 +08:00
Karl Seguin
73d82dd0ba
I guess we can't use the call_arena for querySelectorAll
2025-07-09 10:19:16 +08:00
Karl Seguin
dfa4403c8a
arena -> call_arena for querySelectorAll
2025-07-09 10:11:26 +08:00
Karl Seguin
b8f3b19499
Merge pull request #857 from lightpanda-io/improved_native_proto
...
Improve prototype resolution for native types
2025-07-09 10:01:38 +08:00
Karl Seguin
448718d112
Merge pull request #858 from lightpanda-io/callback_with_new_this
...
Allow JS Callback to be called with a previously-unseen this.
2025-07-09 09:34:14 +08:00
Pierre Tachoire
6de55df4bc
Merge pull request #856 from lightpanda-io/resize_observer
...
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
add dummy ResizeObserver
2025-07-08 15:50:08 -07:00
Pierre Tachoire
189fe26667
Merge pull request #862 from lightpanda-io/macos-14
...
ci: use macos-14 for nightly builds
2025-07-08 15:49:47 -07:00
Pierre Tachoire
7230884116
ci: use macos-14 for nightly builds
2025-07-08 08:27:45 -07:00
Karl Seguin
d7fba81f8f
Add querySelect and querySelectorAll to DocumentFragment
2025-07-08 19:24:35 +08:00
Karl Seguin
29ac13185c
Allow JS Callback to be called with a previously-unseen this.
2025-07-08 19:17:59 +08:00
Karl Seguin
3a49ee83ce
Improve prototype resolution for native types
...
Prototype resolution of Zig types previously had 2 limitations (bug?). The first
was that the Zig prototype chain could only be 1 deep. You couldn't do A->B->C
where each of those was a Zig type (but you could do A->B->C->D->E ... so long
as every other type was a C opaque value).
The other limitation was that Zig prototypes only worked when the nested field
was directly embedded in the struct (i.e. not a pointer). So you could do:
```zig
const X = struct {
proto: XParent,
};
```
But not:
```zig
const X = struct {
proto: *XParent,
};
```
This addresses both limitations. The first issue is solved by keeping track
of the cumulative offset
2025-07-08 18:37:24 +08:00
Karl Seguin
95cbbc3b45
add dummy ResizeObserver
2025-07-08 18:35:25 +08:00
Karl Seguin
2a5c7d139f
Merge pull request #855 from lightpanda-io/zig_fmt
...
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
zig fmt
2025-07-08 18:34:14 +08:00
Karl Seguin
b74863873b
zig fmt
2025-07-08 18:28:21 +08:00
Karl Seguin
7b46fe9cc8
Merge pull request #848 from lightpanda-io/fix_insecure_forward_proxy
...
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
Fix non-tls forward-proxy
2025-07-08 09:52:23 +08:00
Karl Seguin
afc8c69a82
Merge pull request #854 from lightpanda-io/remove_debug_log
...
remove std.debug.print
2025-07-08 09:39:19 +08:00
Karl Seguin
38bbad6e88
Revert "fix secure connection logic"
...
This reverts commit b6132f2497 .
2025-07-08 09:33:53 +08:00
Karl Seguin
1df47fd415
remove std.debug.print
2025-07-08 09:33:19 +08:00
Pierre Tachoire
faf21c5fff
Merge pull request #853 from lightpanda-io/typo-fix
...
typo fix
2025-07-07 17:24:28 -07:00
Karl Seguin
2aee580795
Merge pull request #849 from lightpanda-io/mutation_observer_loop
...
Rework MutationObserver callback.
2025-07-08 08:15:02 +08:00
Pierre Tachoire
404c027546
typo fix
2025-07-07 17:14:52 -07:00
Karl Seguin
04e59c6df2
Merge pull request #850 from lightpanda-io/set_attribute_value
...
Attribute.set_value uses element, if possible
2025-07-08 08:14:52 +08:00
Karl Seguin
835042b794
Merge pull request #851 from lightpanda-io/add_event_listener_signal
...
Add support for the signal option of addEventListener
2025-07-08 08:14:38 +08:00
Pierre Tachoire
907490e266
Merge pull request #852 from lightpanda-io/katie-lpd-patch-1
...
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 README.md
2025-07-07 17:01:09 -07:00
Pierre Tachoire
80fe167646
Update README.md
2025-07-07 17:00:54 -07:00
katie-lpd
d30631f991
Apply suggestions from code review
...
Co-authored-by: Pierre Tachoire <pierre@lightpanda.io >
2025-07-07 16:59:07 -07:00
katie-lpd
8956ab85f9
Update README.md
2025-07-07 16:50:32 -07:00
Pierre Tachoire
2cdc9e9f5f
cdp: use a polyfill loader per isolate
2025-07-07 16:31:54 -07:00
Pierre Tachoire
13c623755c
js: remove existing unknown property debug
...
Because it will be displayed only if the property is non-native.
So if your property is set in pureJS, you will still have the log...
2025-07-07 16:31:54 -07:00
Pierre Tachoire
bdfceec520
refacto a bit the missing callback into polyfill
...
Add a debug global unknown property
2025-07-07 16:31:53 -07:00
Pierre Tachoire
941dace7f9
enable conditionnal loading for polyfill
2025-07-07 16:31:53 -07:00
Karl Seguin
07693e54af
Add support for the signal option of addEventListener
2025-07-07 20:56:19 +08:00
Karl Seguin
b6132f2497
fix secure connection logic
2025-07-07 19:56:21 +08:00
Karl Seguin
b3fe3d02c9
Attribute.set_value uses element, if possible
...
Only when setAttribute is called directly on the element, does libdom raise
a `DOMAttrModified` event (which MutationObserver uses).
From what I can tell, libdom's element set attribute _does_ rely on the
underlying attribute set value, so the behavior should be pretty close, it just
does extra things on top of that.
2025-07-07 19:47:17 +08:00
Karl Seguin
e880b18bb1
Rework MutationObserver callback.
...
Previously, MutationObserver callbacks where called using the `jsCallScopeEnd`
mechanism. This was slow and resulted in records split in a way that callers
might not expect. `jsCallScopeEnd` has been removed.
The new approach uses the loop.timeout mechanism, much like a window.setTimeout
and only registers a timeout when events have been handled. It should perform
much better.
Exactly how MutationRecords are supposed to be grouped is still a mystery to me.
This new grouping is still wrong in many cases (according to WPT), but appears
slightly less wrong; I'm pretty hopeful clients don't really have hard-coded
expectations for this though.
Also implement the attributeFilter option of MutationObserver. (Github)
2025-07-07 19:29:10 +08:00
Karl Seguin
74a299eef7
Fix non-tls forward-proxy
2025-07-07 11:03:04 +08:00
Karl Seguin
300428ddfb
Merge pull request #840 from lightpanda-io/xhr_readystatechange
...
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 readystate change event to XHR
2025-07-06 08:59:19 +08:00
Pierre Tachoire
1c27f8251e
Merge pull request #846 from lightpanda-io/e2e-draft
...
ci: don't run 2e2 on draft
2025-07-05 16:46:04 -07:00
Pierre Tachoire
92badd3722
ci: don't run 2e2 on draft
2025-07-05 14:22:21 -07:00
Karl Seguin
8a80f0b3dd
Merge pull request #843 from lightpanda-io/empty_anchor_fix
...
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
An empty anchor should return empty strings for its getters
2025-07-04 23:43:10 +08:00
Karl Seguin
fcc74b63d3
correct comment
2025-07-04 23:17:48 +08:00
Karl Seguin
d7155e6662
An empty anchor should return empty strings for its getters
...
document.createElement('a').host or .href or .. should return an empty string.
However, URL.constructor(document.createElement('a')) should fail.
Because HTMLAnchorElement uses URL.constructor, we have the wrong behavior.
This adds a guard for an empty anchor. This might not cover all of the cases
which are valid for an anchor but invalid for a URL.constructor, but it's
the most common.
2025-07-04 19:23:19 +08:00
Karl Seguin
42c3841639
Merge pull request #842 from lightpanda-io/fix_elementFromPoint_crash
...
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
Rely on js.zig for float->int translation
2025-07-04 19:12:46 +08:00
Karl Seguin
c331713401
set correct state on xhr.abort and send correct events
2025-07-04 19:12:26 +08:00
Karl Seguin
002d9c1747
Merge pull request #841 from lightpanda-io/scroll_events
...
make window.scrollTo triggers scroll and scrollend events
2025-07-04 19:00:28 +08:00
Karl Seguin
2885ceceb1
document use of i32
2025-07-04 18:55:14 +08:00
sjorsdonkers
22a644ba01
rename tls_in_tls to tlsproxy
2025-07-04 10:00:22 +02:00
sjorsdonkers
bab120a75d
secure changes
2025-07-04 10:00:22 +02:00
Francis Bouvier
7a07c82f06
https-proxy: update upstream tls.zig
2025-07-04 10:00:22 +02:00
sjorsdonkers
e881d2f6cf
tls proxy tweaks
2025-07-04 10:00:22 +02:00
Francis Bouvier
c8d003a08f
https-proxy: update tls.zig
2025-07-04 10:00:22 +02:00
Francis Bouvier
e2cc404571
Handle TLS proxy, both for HTTP and HTTPS (tls in tls) endpoints
2025-07-04 10:00:22 +02:00
sjorsdonkers
be71eaae47
TLS connect proxy WIP
2025-07-04 10:00:22 +02:00
Karl Seguin
ed31a452b2
Rely on js.zig for float->int translation
...
Not only does this ensure compatibility with browsers, it doesn't crash when
the value is NaN of Infinity.
2025-07-04 11:34:34 +08:00
Pierre Tachoire
f51ee7f3a0
Merge pull request #829 from lightpanda-io/pumpmessageloop
...
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
add pump message loop calls
2025-07-03 10:11:26 -07:00
Pierre Tachoire
9d1dc97766
remove useless debug log
2025-07-03 09:49:01 -07:00
Pierre Tachoire
b78729f685
test: inject platform to the serveCDP app
2025-07-03 09:49:00 -07:00
Pierre Tachoire
44a76e59f9
run pumpmessageloop in its own loop
2025-07-03 09:49:00 -07:00
Pierre Tachoire
1504e36a68
use comptime test for platform existence
2025-07-03 09:49:00 -07:00
Pierre Tachoire
80348ef190
fix wpt tests with platform requirement
2025-07-03 09:48:59 -07:00
Pierre Tachoire
a3c14748d3
fix unit testing with platform deps requirement
2025-07-03 09:48:59 -07:00
Pierre Tachoire
3c0143af92
add runIdleTasks
2025-07-03 09:48:57 -07:00
Pierre Tachoire
22a93a9c39
add pump message loop calls
2025-07-03 09:47:50 -07:00
Karl Seguin
e8866a6431
Merge pull request #838 from lightpanda-io/improved_js_value_printing
...
Improve JS value printing
2025-07-04 00:30:35 +08:00
Karl Seguin
455ed79872
Remove HTTP client generic Loop parameter
...
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
I think we initially thought we might need different clients for different
parts of the system, each with a unique loop (e.g. we thought telemetry might
need some isolation). But that never happened, so it's just needless now,
especially since the async connect uses the non-generic *Loop type directly.
2025-07-03 15:10:47 +02:00
Karl Seguin
3d17c531d7
make window.scrollTo triggers scroll and scrollend events
2025-07-03 19:37:07 +08:00
Karl Seguin
dfe90243d6
Add readystate change event to XHR
...
Deal with non-node current target crashing. Builds ontop of abort_signal, but
with the new event-target specific union, I think this will work in for all
future cases.
2025-07-03 19:32:24 +08:00
Karl Seguin
bf1db50667
Merge pull request #839 from lightpanda-io/build_time
...
improve build times (a little)
2025-07-03 15:34:53 +08:00
Pierre Tachoire
a2565a7c83
range: add detach function
2025-07-03 09:16:36 +02:00
Pierre Tachoire
947d01a3c0
range starts and ends with the global document by default
2025-07-03 09:16:36 +02:00
Karl Seguin
be11d82c9c
improve build times (a little)
2025-07-03 13:56:01 +08:00
Karl Seguin
7a0e7fff13
Improve JS value printing
...
Don't error on JSON.stringify failure (likely caused by circular reference).
In debug mode, try to print [slightly] more meaningful value representation
when default serialization results in [object Object].
2025-07-03 10:35:09 +08:00
Karl Seguin
81fb71b7f7
Merge pull request #830 from lightpanda-io/SetHostInitializeImportMetaObjectCallback
...
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
Implement ImportMeta callback
2025-07-03 09:17:47 +08:00
Karl Seguin
b10f5ec99f
bump zig-v8-fork version
2025-07-02 13:38:01 +08:00
Karl Seguin
5abe7bdeef
Merge pull request #831 from lightpanda-io/log_invalid_cookie_expiry
...
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 logger for invalid cookie expiry
2025-07-02 10:11:20 +08:00
Karl Seguin
54be651415
Merge pull request #832 from lightpanda-io/range_selectNodeContents
...
range.selectNodeContents
2025-07-02 10:11:01 +08:00
Pierre Tachoire
cdbf6d7ae7
Merge pull request #834 from lightpanda-io/arm-generic
...
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
ARM generic
2025-07-01 12:08:30 -07:00
Pierre Tachoire
50349edf4d
ci: use a generic target for arm build
2025-07-01 07:55:32 -07:00
sjorsdonkers
da307c1b40
range.selectNodeContents
2025-07-01 15:11:01 +02:00
Karl Seguin
b50b96bd1d
Implement ImportMeta callback
...
The first time `import.meta` is called within a module, this callback is called
and we can populate it with whatever fields we want. For WebAPI, the important
field is `url`:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import.meta
Depends on: https://github.com/lightpanda-io/zig-v8-fork/pull/80
2025-07-01 15:59:24 +08:00
Karl Seguin
92654fc5aa
use logger for invalid cookie expiry
2025-07-01 12:25:25 +08:00
Pierre Tachoire
36b2de216b
Merge pull request #828 from lightpanda-io/arm-compat
...
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
Arm compat
2025-06-30 11:53:06 -07:00
Pierre Tachoire
8745c1016e
ci: use cpu cortex_a72 for arm build
2025-06-30 10:58:15 -07:00
Pierre Tachoire
f5a58c1ff0
Merge pull request #826 from lightpanda-io/upgrade-v8
...
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
Upgrade v8
2025-06-29 10:54:46 -07:00
Pierre Tachoire
d9e72049ae
ci: use ubuntu 22.04 for arm64 build
2025-06-29 10:48:04 -07:00
Pierre Tachoire
927ca01161
upgrade zig v8 version
2025-06-29 10:47:03 -07:00
Pierre Tachoire
3ea8d0b01c
Merge pull request #824 from lightpanda-io/dom-non-html
...
create a DOM tree for non-html files
2025-06-29 10:44:26 -07:00
Karl Seguin
c52d33e331
Merge pull request #822 from lightpanda-io/undefined_or
...
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 UndefinedOr(T) union
2025-06-28 09:09:45 +08:00
Karl Seguin
fd36606acc
change field order
2025-06-28 09:02:12 +08:00
Karl Seguin
1c6f4a79e0
Merge pull request #821 from lightpanda-io/abort_controller
...
Abort controller
2025-06-28 09:00:07 +08:00
Pierre Tachoire
7896d274a3
create a DOM tree for non-html files too.
2025-06-27 12:17:03 -07:00
Pierre Tachoire
6937c8ecb4
Merge pull request #823 from lightpanda-io/atob_btoa
...
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
add atob and btoa
2025-06-27 09:21:41 -07:00
Karl Seguin
f02b9566c5
add atob and btoa
2025-06-27 18:36:29 +08:00
Karl Seguin
c9936c2b7e
Add UndefinedOr(T) union
...
Some apis want a value or undefined. For these, we can't use an Optional
return type, null maps to JS null. Adds an Env.UndefinedOr(T) generic
union for such return types.
2025-06-27 17:55:13 +08:00
Karl Seguin
bbd9e5e07c
add AbortController API
2025-06-27 17:31:25 +08:00
sjorsdonkers
476fb7ec4e
DOMException constructor
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
2025-06-27 08:13:43 +02:00
Karl Seguin
7435274be2
Merge pull request #819 from lightpanda-io/update_tls_lib
...
Upgrade tlz.zig to latest version
2025-06-27 13:45:28 +08:00
Karl Seguin
08d2ea6a10
abort controller
2025-06-27 13:14:35 +08:00
Karl Seguin
41b7ed6938
Upgrade tlz.zig to latest version
...
Was seeing pretty frequent TLS errors on reddit. I think I had the wrong max
TLS record size, but figured this was an opportunity to upgrade tls.zig, which
has seen quite a few changes since our last upgrade.
Specifically, the nonblocking TLS logic has been split into two structs: one
for handshaking, and then another to be used to encrypt/decrypt after the h
andshake is complete. The biggest impact here is with respect to keepalive,
since what we want to keepalive is the connection post-handshake, but we don't
have this object until much later.
There was also some general API changes, with respect to state and partially
encrypted/decrypted data which we must now maintain.
2025-06-27 13:14:12 +08:00
Pierre Tachoire
7a311a181b
Merge pull request #820 from lightpanda-io/ci-e2e
...
ci: use hetzner for 2e2 regression perf
2025-06-26 22:12:34 -07:00
Pierre Tachoire
ddcb597710
ci: use hetzner for 2e2 regression perf
2025-06-26 17:37:35 -07:00
Pierre Tachoire
9c75f29875
ci: optimize 2e2 build
2025-06-26 17:04:05 -07:00
Pierre Tachoire
343f3885f7
Merge pull request #817 from lightpanda-io/script_tag_dump
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (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
dump script tag's text content as-is
2025-06-26 11:27:04 -07:00
Karl Seguin
ed7dfeab84
dump script tag's text content as-is
2025-06-26 12:41:22 +08:00
Karl Seguin
8de27b3674
Merge pull request #813 from lightpanda-io/crypto_get_random_values_fix
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (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
Crypto.getRandomValues consistency
2025-06-26 11:43:39 +08:00
Karl Seguin
f56b0a5f6d
Merge branch 'main' into crypto_get_random_values_fix
2025-06-26 10:25:53 +08:00
Karl Seguin
0a27e1254f
Merge pull request #814 from lightpanda-io/root_module_nested_modules
...
Allow root modules to imported modules
2025-06-26 10:25:10 +08:00
Karl Seguin
3f9b256fcb
Merge pull request #812 from lightpanda-io/identity_map_collision
...
We cannot have empty Zig structs mapping to JS instances
2025-06-26 10:24:09 +08:00
Karl Seguin
9ea9859150
Merge pull request #809 from lightpanda-io/html_element_dataset
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (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
wpt / web platform tests json output (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
Add element.dataset API
2025-06-26 09:18:19 +08:00
Pierre Tachoire
03e3f95d2e
Merge pull request #810 from lightpanda-io/proxy-authentication
...
basic/bearer proxy authentication
2025-06-25 17:31:47 -07:00
Pierre Tachoire
e721b0af92
Merge pull request #816 from lightpanda-io/connect_proxy
...
Connect proxy
2025-06-25 17:31:27 -07:00
Karl Seguin
e18c589de3
Allow root modules to imported modules
...
Root modules (non-cacheable) should register their module_id -> URL so that,
if they load a nested module, we can get the full URL of the nested module.
2025-06-25 18:20:55 +08:00
sjorsdonkers
aea34264a9
basic/bearer testing
2025-06-25 12:04:38 +02:00
Karl Seguin
8d3a04235d
Crypto.getRandomValues consistency
...
Crypto.getRandomValues should mutate the given parameter as well as return
the value. This return value must be the same (JsObject) as the input parameter.
There might be more magical ways to solve this, but I opted for both the
simplest and most flexible: adding a `toZig` function to JsObject which does
what js.zig does internally when mapping js values to Zig (and, of course, it
uses the same code).
This allows a caller to receive a JsObject (not too common, but we already do
that in a few places) and return that same JsObject (again, not too common, but
we do have support for returning JsObject directly already). With the main
addition that the JsObjet can now be turned into a Zig type by the caller.
2025-06-25 18:03:26 +08:00
Karl Seguin
9c4088b24c
We cannot have empty Zig structs mapping to JS instances
...
An empty struct will share the same address as its sibling (1) which will cause
an collision in the identity map.
(1) - This depends on Zig's non-guaranteed layout, so the collision might not
be with its sibling, but rather some other [seemingly random] field.
2025-06-25 14:58:09 +08:00
Karl Seguin
1e7ee4e0a1
proxy_type 'simple' renamed to 'forward'
2025-06-25 12:21:44 +08:00
Karl Seguin
ec92f110b3
Change dataset to work directly off DOM element
2025-06-25 12:16:08 +08:00
Karl Seguin
2aa5eb85ad
Add element.dataset API
...
Uses the State to store the dataset, but, on first load, loads the data
attributes from the DOM.
2025-06-25 12:16:08 +08:00
Karl Seguin
2815f02382
Merge pull request #811 from lightpanda-io/crypto-getrandomvalues-return
...
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
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (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
wpt / web platform tests json output (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
Return Random Array from crypto.GetRandomValues
2025-06-25 07:45:04 +08:00
Karl Seguin
8bd7c8dd41
Merge pull request #807 from lightpanda-io/css-util-iface
...
add CSS utility interface
2025-06-25 07:44:15 +08:00
Karl Seguin
269dcf071f
Merge pull request #806 from lightpanda-io/document-range
...
add AbstractRange and Range
2025-06-25 07:41:52 +08:00
Karl Seguin
997ec7f0bc
Merge pull request #805 from lightpanda-io/performance-mark
...
add PerformanceEntry and PerformanceMark
2025-06-25 07:41:19 +08:00
Muki Kiboigo
d9c26bb77f
return array in crypto.getRandomValues
2025-06-24 15:01:32 -07:00
Muki Kiboigo
c0fc3a19c8
add CSS utility interface
2025-06-24 13:55:47 -07:00
Muki Kiboigo
ce638c39e3
add AbstractRange and Range
2025-06-24 12:06:50 -07:00
Muki Kiboigo
6b651cd5e4
add PerformanceEntry and PerformanceMark
2025-06-24 12:04:28 -07:00
sjorsdonkers
4560f31010
basic/bearer proxy authentication
2025-06-24 16:38:58 +02:00
Karl Seguin
c97a32e24b
Initial work on CONNECT proxy.
...
Cannot currently connect to the proxy over TLS (though, once connected, it can
connect to the actual site over TLS). No support for authentication.
2025-06-24 15:10:20 +08:00
Karl Seguin
8a005bc5a1
Merge pull request #808 from lightpanda-io/accept-header
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (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
http: send an Accept: */* header
2025-06-24 09:42:14 +08:00
Pierre Tachoire
20aabee72e
http: send an Accept: */* header
2025-06-23 18:18:04 -07:00
Karl Seguin
a00c2345ee
Merge pull request #802 from lightpanda-io/endless_loop_fix_and_dot_slash_stitch
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (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
Don't allow timeouts to be registered when shutting down
2025-06-24 08:57:59 +08:00
Karl Seguin
cb35b3624a
Merge pull request #803 from lightpanda-io/inline_module_no_cache
...
Fix module caching
2025-06-24 08:55:23 +08:00
Karl Seguin
c6f59a7aa6
Merge pull request #804 from lightpanda-io/add_error_event_web_api
...
add ErrorEvent webapi
2025-06-24 08:54:01 +08:00
Karl Seguin
bf296ad797
add ErrorEvent webapi
2025-06-23 19:04:59 +08:00
Karl Seguin
256540934b
reject long timeouts as we're shutting down
2025-06-23 17:27:22 +08:00
Karl Seguin
3c07c0818d
improve variable names
2025-06-23 17:19:30 +08:00
Karl Seguin
a01d18ace1
Fix module caching
...
In https://github.com/lightpanda-io/browser/pull/798 module caching was added.
This was necessary as the same module loaded multiple time should result in the
same v8 module instance.
To make this work, modules became cached by their full URL. The full URL of one
module was also used to determine the full URL of nested modules (full url +
specifier).
With inline scripts, the page URL was used as the full URL. While this is
correct when resolving nested modules, it's incorrect for caching the module
itself. Two inline modules on a page share the same URL, but they aren't the
same and should be cached.
To fix this, inline modules still inherit the page URL, in order to resolve the
correct URL for nested modules, but are themselves never cached.
2025-06-23 17:10:54 +08:00
Karl Seguin
55e02f01dc
fix wpt runner
2025-06-23 16:47:31 +08:00
Karl Seguin
fe6ccad485
loop.run now takes a maximum wait time
2025-06-23 16:43:28 +08:00
Karl Seguin
11fe79312d
Don't allow timeouts to be registered when shutting down
...
Currently, a timeout that sets a timeout can cause loop.run to block forever.
Also, cleanup URL stitch with leading './'. The resulting URL was valid, but
since we use the URL as the module cache key, it's important to resolve various
representations of the same URL in the same way.
2025-06-23 15:01:58 +08:00
Karl Seguin
bdb2338b5b
Merge pull request #796 from lightpanda-io/docker
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (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
update dockerfile to multi-arch
2025-06-23 12:51:20 +08:00
Karl Seguin
bbafb048d0
Merge pull request #798 from lightpanda-io/module_loading
...
Fix module loading
2025-06-23 08:54:17 +08:00
Karl Seguin
9fc2fa51bd
Merge pull request #797 from lightpanda-io/template_content
...
add HTML Template's content attribute
2025-06-23 08:54:00 +08:00
Karl Seguin
d8ec50345a
Fix module loading
...
When V8 calls the ResolveModuleCallback that we give it, it passes the specifier
which is essentially the string given to `from`:
```
import {x} from './blah.js';
```
We were taking that specifier and giving it to the page. The page knew the
currently executing script, an thus could resolve the full URL. Given the full
URL, it could either return the JS content from its module cache or fetch
the source.
At best though, this isn't efficient. If two files import the same module, yes
we cache the src, but we still ask v8 to re-compile it. At worse, it crashes
due to resource exhaustion in the case of cyclical dependencies.
ResolveModuleCallback should instead detect that it has already loaded the
module and return the previously loaded module. Essentially, we shouldn't be
caching the JavaScript source, we should be caching the v8 module.
However, in order to do this, we need more than the specifier, which might only
be a relative path (and thus isn't unique). So, in addition to a module cache,
we now also maintain an module identifier lookup. Given a module, we can get
its full path. Thankfully ResolveModuleCallback gives us the referring module,
so we can look up that modules URL, stitch it to the specifier, and get the
full url (the unique identifier) within the JS runtime.
Need more real world testing, and a fully working example before I celebrate,
but for sites with many import, this appears to improve performance by many
orders of magnitude.
2025-06-20 19:17:55 +08:00
Karl Seguin
9f1cc09ca8
add HTML Template's content attribute
2025-06-20 14:36:56 +08:00
Karl Seguin
5dcc3db36b
Merge pull request #795 from lightpanda-io/performance_observer
...
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 / puppeteer-perf (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 dummy PerformanceObserver
2025-06-20 08:01:09 +08:00
Pierre Tachoire
898b73ffc8
update dockerfile to multi-arch
2025-06-19 10:10:14 -07:00
Karl Seguin
c5d49a9d34
Add dummy PerformanceObserver
...
Adds a dummy PerformanceObserver. Only the supportedEntryTypes static attribute
is supported, and it currently returns an empty array. This hopefully prevents
code from trying to use it. For example, before using it, reddit checks if
specific types are supported and, if not, doesn't use it.
This introduced complexity in the js runtime. Our current approach to
attributes only works with primitive types. Non-primitive types can't be
attached to a FunctionTemplate (v8 will crash saying only primitive types can
be set). Plus, all non primitive types require a context to create anyways.
We now detect "primitive" attributes and "complex" attributes. Primitive
attributes are setup as before. Complex attributes are setup per-context,
requiring another loop through our types to detect & setup on each context
creation.
2025-06-19 18:20:02 +08:00
Karl Seguin
ef9f828d35
Merge pull request #790 from lightpanda-io/css-stylesheet
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (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
Minimal CSSStyleSheet
2025-06-19 10:32:13 +08:00
Karl Seguin
c691764205
Merge pull request #794 from lightpanda-io/window-screen
...
add Screen and ScreenOrientation
2025-06-19 10:29:52 +08:00
sjorsdonkers
2c940d4fd6
browser context proxyServer
2025-06-19 10:26:33 +08:00
Karl Seguin
54bd55d45d
fix CSSStyleSheet prototype
2025-06-19 10:25:13 +08:00
Karl Seguin
0b846b15b1
Merge pull request #789 from lightpanda-io/browsercontext-proxyServer
...
browser context proxyServer
2025-06-19 10:22:17 +08:00
Muki Kiboigo
269eb7e154
add Screen and ScreenOrientation
2025-06-18 12:53:54 -07:00
Muki Kiboigo
97bc19e4ae
clean up various imports in CSSOM
2025-06-18 11:32:28 -07:00
Muki Kiboigo
2656cc7842
Add basic tests for CSSStyleSheet
2025-06-18 11:32:28 -07:00
Muki Kiboigo
ba94818415
add CSSStyleSheet
2025-06-18 11:32:27 -07:00
Pierre Tachoire
ac759a6eed
Merge pull request #793 from lightpanda-io/domrect-bottom
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (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
add top, left, bottom, right to DOMRect
2025-06-18 09:54:08 -07:00
Pierre Tachoire
1839b346a6
Merge pull request #792 from lightpanda-io/fix_current_script_scope
...
Fixes the scoping of page.current_script
2025-06-18 09:51:41 -07:00
Pierre Tachoire
c1ffe7f8e6
Merge pull request #791 from lightpanda-io/zig_event_target_fix
...
Fix crash when event.currentTarget is used with EventTargetTBase
2025-06-18 08:26:25 -07:00
Pierre Tachoire
833b4d10bd
add top, left, bottom, right to DOMRect
2025-06-18 08:21:33 -07:00
Pierre Tachoire
ce98c336c9
keep EventTargetTBase as the dom_event_target
...
Mimic a dom_node by adding the refcnt field right after the vtable
pointer.
2025-06-18 07:08:35 -07:00
Karl Seguin
d05619990a
Fixes the scoping of page.current_script
...
This was previously being set back to null before it was actually needed.
Also, added a more logs / log details.
2025-06-18 18:36:00 +08:00
Karl Seguin
8033e41d4a
Merge pull request #788 from lightpanda-io/dont_keepalive_unprocess_request
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (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
Delay setting the requests' keepalive flag until the request is fully…
2025-06-18 16:46:45 +08:00
sjorsdonkers
60f4eab759
handle no params
2025-06-18 10:07:37 +02:00
sjorsdonkers
d7656ea985
expires dashes and f64
2025-06-18 10:07:37 +02:00
sjorsdonkers
e402998577
JS may not set/get HttpOnly cookies
2025-06-18 10:07:37 +02:00
sjorsdonkers
073f75efa3
CDP Network cookie tests
2025-06-18 10:07:37 +02:00
sjorsdonkers
da414f7eb3
CDP.Storage cookies tests
2025-06-18 10:07:37 +02:00
sjorsdonkers
270b89830a
Cleaning up crumbles
2025-06-18 10:07:37 +02:00
sjorsdonkers
74ce7ca416
refactor path / domain parsing
2025-06-18 10:07:37 +02:00
sjorsdonkers
3f4338cb51
wip
2025-06-18 10:07:37 +02:00
sjorsdonkers
30ee41fd0e
Network.getCookies
2025-06-18 10:07:37 +02:00
sjorsdonkers
4965fec55c
storage cookies
2025-06-18 10:07:37 +02:00
sjorsdonkers
18dff8455c
lower case domain
2025-06-18 10:07:37 +02:00
sjorsdonkers
fe16f06aee
clearRetainingCapacity
2025-06-18 10:07:37 +02:00
sjorsdonkers
48c1c05a93
setCookie
2025-06-18 10:07:37 +02:00
sjorsdonkers
38dee1166d
setCookies
2025-06-18 10:07:37 +02:00
sjorsdonkers
0c6fc68eae
deleteCookies
2025-06-18 10:07:37 +02:00
Karl Seguin
223611d89e
Fix crash when event.currentTarget is used with EventTargetTBase
...
When EventTargetTBase is used, we pass the container as the target to libdom.
This is not safe, as libdom is expecting an event_target. We see, for example
that when _dom_event_get_current_target is called, the refcnt is increased.
This works if the current_target is a valid event_target, but if it's a
Zig instance (like the Window) ... we're just altering some bits of the
window instance.
This attempts to add a dummy target to EventTargetTBase which can acts as a
real event_targt in place of the Zig instance.
2025-06-18 14:49:15 +08:00
sjorsdonkers
6f5141d5fb
browser context proxyServer
2025-06-17 18:43:12 +02:00
Karl Seguin
a6ac7d9c4e
Delay setting the requests' keepalive flag until the request is fully processed
...
We currently set request._keepalive prematurely. There are [error cases] where
the request could be abandoned before being fully drained. While we do try to
drain in some cases, it isn't always possible. For this reason,
request.keepalive is only set at the end of the request lifecycle, at which
point we know the connection is ready to be re-used.
2025-06-17 19:55:36 +08:00
Karl Seguin
9b35736be3
Merge pull request #786 from lightpanda-io/custom-elements
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (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
add CustomElementRegistry
2025-06-17 15:53:34 +08:00
Karl Seguin
9f54cb35f4
remove unused import and debug stmt
2025-06-17 08:20:11 +08:00
Karl Seguin
329bffb127
Fix non-probing of union array failure
...
Probing a union match for an possible value should rarely hard-fail. Instead,
it should return an .{.invalid = {}} response to let the prober decide how to
proceed. This fixes a hard-fail when a JS value fails to probe as an array.
Also, add :modal pseudo-class.
(both issues came up looking at github integration)
2025-06-17 08:19:01 +08:00
Karl Seguin
e2542f41b5
Improve build and test speed
...
Test speed has been improved only slightly by tweaking a 2-second running tests.
Build has been improved by:
1 - moving logFunctionCallError out of js.Caller and to a standalone function
2 - removing some non-generic code from the generic portions of the logger
Caller.getter and Caller.setter have been removed in favor or calling
Caller.method. This wasn't previously possible - prior to our v8 upgrade, they
had different signatures.
Also removed a largely unused parser/str.zig file.
2025-06-17 08:19:01 +08:00
Karl Seguin
efc7b9d4a5
Add comment explaining why we're walking the form the way we are
2025-06-17 08:19:01 +08:00
Karl Seguin
72915760c4
Use css.querySelectorAll to find form elements
...
Libdom's formGetCollection doesn't work (like I would expect) for dynamically
added elements.
For example, given:
```
let el = document.createElement('input');
document.getElementsByTagName('form')[0].append(el);
```
(and assume the page has a form), I'd expect `el.form` to be equal to the form
the input was added to. Instead, it's null. This is a problem given that
`dom_html_form_element_get_elements` uses the element's `form` attribute to
"collect" the elements.
This uses our existing querySelector to find the form elements.
2025-06-17 08:19:01 +08:00
Karl Seguin
e9d7a946c5
Merge pull request #784 from lightpanda-io/union_param_array_fix
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (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
Fix non-probing of union array failure
2025-06-17 08:08:04 +08:00
Karl Seguin
714e5e0456
Merge pull request #785 from lightpanda-io/build_and_test_speed
...
Improve build and test speed
2025-06-17 08:07:43 +08:00
Karl Seguin
26e8642aca
Merge pull request #782 from lightpanda-io/form_support_dynamic_elements
...
Use css.querySelectorAll to find form elements
2025-06-17 08:07:30 +08:00
Karl Seguin
68dfb4ee86
fix custom elements when minified js is used
2025-06-16 07:47:53 -07:00
Karl Seguin
f1ff789334
implement custom elements - i think/hope
2025-06-16 07:45:49 -07:00
Muki Kiboigo
1f45d5b8e4
add CustomElementRegistry
2025-06-16 07:35:55 -07:00
Karl Seguin
c20052f314
Add comment explaining why we're walking the form the way we are
2025-06-16 19:56:19 +08:00
Karl Seguin
c28d87d59c
Improve build and test speed
...
Test speed has been improved only slightly by tweaking a 2-second running tests.
Build has been improved by:
1 - moving logFunctionCallError out of js.Caller and to a standalone function
2 - removing some non-generic code from the generic portions of the logger
Caller.getter and Caller.setter have been removed in favor or calling
Caller.method. This wasn't previously possible - prior to our v8 upgrade, they
had different signatures.
Also removed a largely unused parser/str.zig file.
2025-06-16 19:50:13 +08:00
Karl Seguin
237ddcba9a
Fix non-probing of union array failure
...
Probing a union match for an possible value should rarely hard-fail. Instead,
it should return an .{.invalid = {}} response to let the prober decide how to
proceed. This fixes a hard-fail when a JS value fails to probe as an array.
Also, add :modal pseudo-class.
(both issues came up looking at github integration)
2025-06-16 17:07:43 +08:00
Karl Seguin
eadb5b6461
Use css.querySelectorAll to find form elements
...
Libdom's formGetCollection doesn't work (like I would expect) for dynamically
added elements.
For example, given:
```
let el = document.createElement('input');
document.getElementsByTagName('form')[0].append(el);
```
(and assume the page has a form), I'd expect `el.form` to be equal to the form
the input was added to. Instead, it's null. This is a problem given that
`dom_html_form_element_get_elements` uses the element's `form` attribute to
"collect" the elements.
This uses our existing querySelector to find the form elements.
2025-06-16 13:49:34 +08:00
Karl Seguin
faebabe3c7
Merge pull request #781 from lightpanda-io/null-scriptname
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (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
handle null scriptname in stacktrace
2025-06-16 11:52:40 +08:00
Pierre Tachoire
02c510b07f
upgrade zig-v8
2025-06-13 19:19:10 +02:00
Pierre Tachoire
63541970eb
handle null scriptname in stack trace
2025-06-13 19:17:07 +02:00
Pierre Tachoire
a8a5605fe1
typo fix
2025-06-13 19:16:54 +02:00
sjorsdonkers
0c0ddc10ee
rename scope jscontext
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 / puppeteer-perf (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
2025-06-13 10:30:50 +02:00
Karl Seguin
9bd5ff69ef
Merge pull request #779 from lightpanda-io/waitForNavigation
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (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
Internal navigation should change the CDP loader-id
2025-06-13 09:38:33 +08:00
Karl Seguin
eadf351e82
Merge pull request #778 from lightpanda-io/terminate_execution
...
Terminate execution on internal navigation
2025-06-13 09:38:21 +08:00
Karl Seguin
e3afa294af
Merge pull request #776 from lightpanda-io/fix_internal_navigation_deadlocks
...
Rework internal navigation to prevent deadlocking
2025-06-13 09:38:09 +08:00
Pierre Tachoire
582894cdc3
Merge pull request #780 from lightpanda-io/fix_loop_run_wait
...
Fix loop run (Page.wait)
2025-06-12 17:26:05 +02:00
Karl Seguin
2788c36ca6
Fix loop run (Page.wait)
...
In https://github.com/lightpanda-io/browser/pull/767 I tried to call loop.run
from within a loop.run (spoiler, it didn't work), in order to make sure aborted
connections were properly cleaned up before starting a new navigation. That
resulted in having loop.run no longer wait for timeouts for fear of having to
wait on a long timeout. The ended up breaking page.wait (used in the fetch
command).
This commit brings back the original behavior where loop.run() waits for all
completions. Which is now safe to do since the nested loop.run() call has
been removed.
2025-06-12 23:01:07 +08:00
Karl Seguin
872a9d393d
Internal navigation should change the CDP loader-id
...
This is one of the ways that puppeteer knows that navigation happened
and is needed to support `waitForNavigation` which compares the
existing loader-id with the new one, so it has to change.
Also, fix a crash that could happen if CDP disconnects while
connections are being aborted.
2025-06-12 19:11:26 +08:00
Karl Seguin
b1ca242d89
Terminate execution on internal navigation
...
Currently, if there's an internal navigation event, we continue to process the
page normally. This has negative performance implication, and can result in
user-scripts producing unexpected results.
For example, imagine a page with a script that does.
```js
if (x) {
form.submit();
}
reloadProduct();
```
The call to `form.submit()` should stop the script from executing. And, if the
page has 10 other <script> tags after this, they shouldn't be loaded nor
executed.
This code terminates the execution of the current script on an internal
navigation event, and stops the rest of the page from load.
While I believe this creates a more "correct" behavior, it also introduces new
edge cases. There's no a period of time, between the termination being stopped
and then being resumed, where executing code is not safe.
2025-06-12 16:38:48 +08:00
Karl Seguin
97c769e805
Rework internal navigation to prevent deadlocking
...
The mix of sync and async HTTP requests requires care to avoid deadlocks.
Previously, it was possible for async requests to use up all available HTTP
state objects duration a navigation flow (either directly, or via an internal
redirect (e.g. click, submit, ...)). This would block the navigation, which,
because everything is single thread, would block the I/O loop, resulting in a
deadlock.
The correct solution seems to be to remove all synchronous I/O. And I tried to
do that, but I ran into a wall with module-loading, which is initiated from V8.
V8 says "give me the source for this module", and I don't see a great way to
tell it: wait a bit.
So I went back to trying to make this work with the hybrid model, despite last
weeks failures to get it to work. I changed two things:
1 - The http client will only directly initiate an async request if there's
at least 2 free state objects available (1 for the request, and leaving 1
free for any synchronous requests)
2 - Delayed navigation retries until there's at least 1 free http state object
available.
Commits from last week did help with this. First, we're now guaranteed to have
a single sync-request at a time (previously, we could have had 2). Secondly,
the async connection is now async end-to-end (previously, it could have blocked
on an empty state pool).
We could probably make this a bit more obviously by reserving 1 state object
for synchronous requests. But, since the long term solution is probably having
no synchronous requests, I'm happy with anything that lets me move past this
issue.
2025-06-12 12:34:51 +08:00
Karl Seguin
0de33b36f8
Merge pull request #773 from lightpanda-io/keydown_handling
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (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
Add basic support for key events
2025-06-12 12:32:09 +08:00
Karl Seguin
cf39bdc7f7
use inputGetType and add buttonGetType
2025-06-12 09:46:02 +08:00
Karl Seguin
34b49498c9
Making sure that the optional parameters have defaults
...
Co-authored-by: Sjors <72333389+sjorsdonkers@users.noreply.github.com >
2025-06-12 09:46:01 +08:00
Karl Seguin
3a4bd00020
Ignore dead keys
...
Submit form on "Enter" within text input.
Convert "Enter" to "\n" in textarea.
2025-06-12 09:46:01 +08:00
Karl Seguin
effd07d8c0
Add basic support for key events
...
Support CDP's Input.dispatchKeyEvent and DOM key events. Currently only
keydown is supported and expects every key to be a displayable character.
It turns out that manipulating the DOM via key events isn't great because the
behavior really depends on the cursor. So, to do this more accurately, we'd
have to introduce some concept of a cursor.
Personally, I don't think we'll run into many pages that are purposefully
using keyboard events. But driver (puppeteer/playwright) scripts might be
another issue.
2025-06-12 09:45:59 +08:00
sjorsdonkers
d9ce89ab31
import html_element
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 / puppeteer-perf (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
2025-06-10 11:28:28 +02:00
Karl Seguin
5483c52227
Merge pull request #771 from lightpanda-io/http_request_fail
...
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 / puppeteer-perf (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
Emit http_request_fail notification
2025-06-09 15:22:46 +08:00
sjorsdonkers
f12e9b6a49
use js try for errors
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 / puppeteer-perf (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
2025-06-06 14:06:25 +02:00
Karl Seguin
2b48902f1b
Emit http_request_fail notification
...
CDP translate this into a Network.loadingFailed. This is necessary to make sure
every Network.requestWillBeSent is paired with either a Network.loadingFailed
or a Network.responseReceived.
2025-06-06 19:15:47 +08:00
Karl Seguin
305460dedb
Merge pull request #768 from lightpanda-io/setExtraHTTPHeaders
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (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
setExtraHTTPHeaders
2025-06-06 16:45:07 +08:00
sjorsdonkers
bacef41a3b
extra header feedback
2025-06-06 10:33:15 +02:00
Karl Seguin
f789c84816
Merge pull request #767 from lightpanda-io/unblock_async_http_request
...
Unblock async http request
2025-06-06 13:22:29 +08:00
Karl Seguin
09466a2dff
Merge pull request #764 from lightpanda-io/url_search_parmas_from_object
...
URLSearchParam constructor support for object initialization
2025-06-06 13:22:17 +08:00
Karl Seguin
e77d888aab
Merge pull request #766 from lightpanda-io/slow_down_animation_frame
...
Delay requestAnimation
2025-06-06 13:22:04 +08:00
Karl Seguin
478d91928c
Merge pull request #765 from lightpanda-io/http_client_optimization
...
Optimize the lifecycle of async requests
2025-06-06 13:21:54 +08:00
Karl Seguin
fdd1a778f3
Properly drain event loop when navigating between pages
2025-06-06 12:53:45 +08:00
Karl Seguin
a5d87ab948
Reduce duration of the main request
...
We currently keep the main request open during loadHTMLDoc and processHTMLDoc.
It _has_ to be open during loadHTMLDoc, since that streams the body. But it
does not have to be open during processHTMLDoc, which can be log and itself
could make use of that same connection if it was released. Reorganized the
navigate flow to limit the scope of the request.
Also, just like we track pending_write and pending_read, we now also track
pending_connect and only shutdown when all are not pending.
2025-06-05 23:41:21 +08:00
sjorsdonkers
f1672dd6d2
setExtraHTTPHeaders
2025-06-05 16:42:29 +02:00
Karl Seguin
48c25c380d
Removing blocking code async HTTP request
...
The HTTP Client has a state pool. It blocks when we've exceeded max_concurrency.
This can block processing forever. A simple way to reproduce this is to go into
the demo cdp.js, and execute the XHR request 5 times (loading json/product.json)
To some degree, I think this is a result of weird / non-intuitive execution
flow. If you exec a JS with 100 XHR requests, it'll call our XHR _send function
but none of these will execute until the loop is run (after the script is done
being executed). This can result in poor utilization of our connection and
state pool.
For an async request, getting the *Request object is itself now asynchronous.
If no state is available, we use the Loop's timeout (at 20ms) to keep checking
for an available state.
2025-06-05 20:52:37 +08:00
Karl Seguin
3a5aa87853
Optimize the lifecycle of async requests
...
Async HTTP request work by emitting a "Progress" object to a callback. This
object has a "done" flag which, when `true`, indicates that all data has been
emitting and no future "Progress" objects will be sent.
Callers like XHR buffer the response and wait for "done = true" to then process
the request.
The HTTP client relies on two important object pools: the connection and the
state (with all the buffers for reading/writing).
In its current implementation, the async flow does not release these pooled
objects until the final callback has returned. At best, this is inefficient:
we're keeping the connection and state objects checked out for longer than they
have to be. At worse, it can lead to a deadlock. If the calling code issues a
new request when done == true, we'll eventually run out of state objects in the
pool.
This commit now releases the state objects before emit the final "done" Progress
message. For this to work, this final message will always have null data and
an empty header object.
2025-06-05 20:52:37 +08:00
Karl Seguin
f436744dd4
Delay requestAnimation
...
This is often called in a tight loop (the callback to requestAnimation typically
calls requestAnimation).
Instead, we can treat it like a setTimeout with a short delay (5ms ?). This has
the added benefit of making it cancelable, FWIW.
2025-06-05 20:35:46 +08:00
Karl Seguin
6df5e55807
Optimize the lifecycle of async requests
...
Async HTTP request work by emitting a "Progress" object to a callback. This
object has a "done" flag which, when `true`, indicates that all data has been
emitting and no future "Progress" objects will be sent.
Callers like XHR buffer the response and wait for "done = true" to then process
the request.
The HTTP client relies on two important object pools: the connection and the
state (with all the buffers for reading/writing).
In its current implementation, the async flow does not release these pooled
objects until the final callback has returned. At best, this is inefficient:
we're keeping the connection and state objects checked out for longer than they
have to be. At worse, it can lead to a deadlock. If the calling code issues a
new request when done == true, we'll eventually run out of state objects in the
pool.
This commit now releases the state objects before emit the final "done" Progress
message. For this to work, this final message will always have null data and
an empty header object.
2025-06-05 12:40:59 +08:00
Karl Seguin
c758054250
URLSearchParam constructor support for object initialization
...
This adds support for:
```
new URLSearchParams({over: 9000});
```
The spec says that any thing that produces/iterates a sequence of string pairs
is valid. By using the lower-level JsObject, this hopefully takes care of the
most common cases. But I don't think it's complete, and I don't think we
currently capture enough data to make this work. There's no way for the JS
runtime to know if a value (say, a netsurf instance, or even a Zig instance)
provides an string=>string iterator.
2025-06-05 09:44:36 +08:00
Karl Seguin
fff0a8a522
Merge pull request #757 from lightpanda-io/window_target_crash
...
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 / puppeteer-perf (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
Fix crash when event target is the window.
2025-06-05 07:55:59 +08:00
Karl Seguin
4ff978f318
Merge pull request #762 from lightpanda-io/url_constructor
...
Url constructor
2025-06-05 07:55:48 +08:00
Karl Seguin
b29e07faba
expose URLSearchParams toString and URL.toString
2025-06-04 21:41:49 +08:00
Karl Seguin
b35107a966
URL stitch avoid double /
2025-06-04 21:41:49 +08:00
Karl Seguin
1090ff0175
URL constructor overload support
...
Allow URL constructor to be created with another URL or an HTML element.
Add URL set_search method.
Remove no-longer-used url/query.zig
2025-06-04 21:41:49 +08:00
Karl Seguin
8de57ec0e0
Merge pull request #761 from lightpanda-io/pozo_for_custom_state
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (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
Improve usability of NodeWrapper
2025-06-04 21:38:50 +08:00
Karl Seguin
4165f47a64
merge all states
2025-06-04 19:52:23 +08:00
sjorsdonkers
f931026216
update libdom with embedder data fix
2025-06-04 12:38:26 +02:00
Karl Seguin
19df73729a
Improve usability of NodeWrapper
...
The NodeWrapper pattern attaches a Zig instance to a libdom Node. That works in
isolation, but for 1 given node, we might want to attach different instances.
For example, for an HTMLScriptElement we want to attach an `onError`, but for
that same node viewed as an HTMLElement we want to a `CSSStyleDeclaration`. We
can only have one. Currently, this code will crash if, for example, we create
the embedded data as an HTMLScriptElement, then try to read the embedded data
as an HTMLElement.
This PR introduces dedicated state class. So if you want the onError property,
you no longer ask the NodeWrapper for an HTMLSCriptElement. Instead, you ask
for a storage/HTMLElement.
Nothing fancy here, just memory-inefficient optional fields. If it gets out of
hand, we'll think of something more clever.
2025-06-04 18:04:39 +08:00
Karl Seguin
9efc1a1c09
Merge pull request #752 from lightpanda-io/url_search_params
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (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
Rework/fix URLSearchParams
2025-06-04 14:38:23 +08:00
Karl Seguin
234e7afb12
Merge pull request #721 from lightpanda-io/HTMLInputElement-properties
...
Input element properties
2025-06-04 14:22:45 +08:00
Karl Seguin
8904afaa74
Fix crash when event target is the window.
...
On page load, emitted by the page, the target is the window, but it's improperly
cast since the pointer is actually `window.base`. This is going to be a problem
in general for any Zig type dispatched as a target, but the Window one is the
most obvious and the easiest to fix. If this issue comes up with other types,
we'll need to come up with a more robust solution.
2025-06-04 11:17:57 +08:00
Karl Seguin
d95a18b6eb
Merge pull request #756 from lightpanda-io/nix-2505
...
Bump Nixpkgs to 25.05
2025-06-04 08:40:51 +08:00
Karl Seguin
bcd4bdb4e0
Merge pull request #754 from lightpanda-io/fix-makebuilddev
...
fix makebuilddev
2025-06-04 08:34:42 +08:00
Karl Seguin
73df41b5b2
Merge pull request #753 from lightpanda-io/console_error_stack_trace
...
Make stacktraces available in debug via `page.stackTrace()`
2025-06-04 08:34:09 +08:00
Karl Seguin
d32fbfd634
Merge pull request #749 from lightpanda-io/functions
...
Poor support for functions/namespaces.
2025-06-04 08:33:51 +08:00
Karl Seguin
6b0c532f48
Merge pull request #742 from lightpanda-io/focus_and_active_element
...
Focus and active element
2025-06-04 08:33:20 +08:00
Muki Kiboigo
9f4ee7d6a8
update nixpkgs to 25.05
2025-06-03 10:44:03 -07:00
sjorsdonkers
7da83d2259
fix makebuilddev
2025-06-03 16:25:35 +02:00
sjorsdonkers
ceb9453006
Simplify testing
2025-06-03 16:04:31 +02:00
Karl Seguin
7091b37f3a
Make stacktraces available in debug via page.stackTrace()
...
Automatically include the stack trace in a `console.error` output. This is
useful because code frequently does:
```
try blah();
catch (e) console.log(e);
```
Which we log, but, without this, don't get the stack.
2025-06-03 20:40:40 +08:00
Karl Seguin
18e6f9be71
Detached node can't have focus.
...
Refactor isNodeAttached because of the "law of three."
2025-06-03 20:25:15 +08:00
sjorsdonkers
19d40845a4
input prop testing
2025-06-03 14:11:35 +02:00
Karl Seguin
211ce20132
Add document.activeElement and HTMLElement.focus()
2025-06-03 20:10:33 +08:00
sjorsdonkers
275b97948b
input element properties
2025-06-03 14:08:54 +02:00
Karl Seguin
13d602a9e0
Rework/fix URLSearchParams
...
Extracts the FormData logic, which is both more complete and more correct and
reuses it between FormData and URLSearchParams.
This includes the additional iterator behavior, `set` and URLSearchParams
constructor from FormData.
2025-06-03 20:01:01 +08:00
Francis Bouvier
69215e7d27
Merge pull request #751 from lightpanda-io/dummy_window_scroll_to
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (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
add noop window.scrollTo
2025-06-03 13:49:29 +02:00
Karl Seguin
7e8df34681
add noop window.scrollTo
2025-06-03 18:43:35 +08:00
Karl Seguin
6451065c77
Poor support for functions/namespaces.
...
If you look at the specification for `console` [1], you'll note that it's a
namespace, not an interface (like most things). Furthermore, MDN lists its
methods as "static".
But it's a pretty weird namespace IMO, because some of its "functions", like
`count` can have state associated with them.
This causes some problems with our current implementation. Something like:
```
[1].forEach(console.log)
```
Fails, since `this` isn't our window-attached Console instance.
This commit introducing a new `static_XYZ` naming convention which does not
have the class/Self as a receiver:
```
pub fn static_log(values: []JsObject, page: *Page) !void {
```
This turns Console into a namespace for these specific functions, while still
being used normally for those functions that require state.
We could infer this behavior from the first parameter, but that seems more
error prone. For now, I prefer having the explicit `static_` prefix.
[1] https://console.spec.whatwg.org/#console-namespace
2025-06-03 14:40:10 +08:00
Karl Seguin
bde8c54e7e
Merge pull request #748 from lightpanda-io/test_leak
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (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
fix leak in test
2025-06-03 10:58:53 +08:00
Karl Seguin
97b17af056
fix leak in test
2025-06-03 10:49:52 +08:00
Karl Seguin
9c2e3e2c76
Merge pull request #740 from lightpanda-io/fix_anchor_href
...
Fix anchor href
2025-06-03 10:47:25 +08:00
Karl Seguin
3c637872f2
Merge pull request #743 from lightpanda-io/default_timeout_10s
...
Increase default timeout from 3s to 10s.
2025-06-03 10:47:10 +08:00
Karl Seguin
4c8e2a1258
Setting anchor href should consider document.url
2025-06-03 09:58:26 +08:00
Karl Seguin
e5a76d737c
Increase default timeout from 3s to 10s.
...
The wait_for_network_idle demo often times out for me. I don't see any reason
to have the default so low. More likely to cause user scripts to unnecessarily
fail.
2025-06-03 09:57:51 +08:00
Karl Seguin
a482d5998d
Merge pull request #739 from lightpanda-io/url_constructor
...
Fix url constructor
2025-06-03 09:55:47 +08:00
Karl Seguin
12bc540ec9
Merge pull request #744 from lightpanda-io/dockerfile_zig_path_fix
...
Update zig filename for new pattern used in 0.14.1+
2025-06-03 09:52:25 +08:00
Karl Seguin
b6a37f6fb8
Merge pull request #747 from lightpanda-io/fix_crash_on_error_exit
...
fix a silly log crash on exit error
2025-06-03 09:52:08 +08:00
Karl Seguin
bbdb25420a
Merge pull request #746 from lightpanda-io/null_object_guard
...
Guard against null object when trying to fetch a function
2025-06-03 09:51:54 +08:00
Karl Seguin
e3099a16d4
fix a silly log crash on exit error
2025-06-02 23:34:09 +08:00
Karl Seguin
167fe5f758
Guard against null object when trying to fetch a function
2025-06-02 23:27:29 +08:00
Karl Seguin
36f59da7cc
Update zig filename for new pattern used in 0.14.1+
...
https://github.com/lightpanda-io/browser/issues/711
2025-06-02 21:59:09 +08:00
Karl Seguin
1ac23ce191
Merge pull request #735 from lightpanda-io/improved_logging
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (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
Improved logging
2025-06-02 21:53:51 +08:00
Karl Seguin
a000dfe676
include stack trace in JS function call log errors
2025-06-02 21:43:24 +08:00
Karl Seguin
9e834e0db5
Revert "experiment with reducing retained arena size"
...
This reverts commit 2f6b4c04da3e4659a3ebe8bcb9195f4625feaa16.
2025-06-02 21:43:20 +08:00
Karl Seguin
021fc8fb59
experiment with reducing retained arena size
2025-06-02 21:41:53 +08:00
Karl Seguin
625fa03c22
fix tests
2025-06-02 21:38:57 +08:00
Karl Seguin
6e80b03faa
Improve script logging
...
1 - Add a custom console.lp function to make our debug logs stand out from
script logs.
2 - In some cases, significantly improve how JavaScript values are serialized
in debug logs and in console.log.
2025-06-02 21:38:57 +08:00
Karl Seguin
c3f3eea7fb
Improve logging
...
1 - Make log_level a runtime option (not a build-time)
2 - Make log_format a runtime option
3 - In Debug mode, allow for log scope filtering
Improve the general usability of scopes. Previously, the scope was more or less
based on the file that the log was in. Now they are more logically grouped.
Consider the case where you want to silence HTTP request information, previously
you'd have to filter out the `page`, `xhr` and `http_client` scopes, but that
would also elimiate other page, xhr and http_client logs. Now, you can just
filter out the `http` scope.
2025-06-02 21:38:56 +08:00
Karl Seguin
47da5e0338
Merge pull request #737 from lightpanda-io/release_fast
...
Run puppeteer-perf using ReleaseFast
2025-06-02 21:20:07 +08:00
Karl Seguin
2ef7ea6512
change stitch alloc default to .always
2025-06-02 19:24:08 +08:00
Karl Seguin
6b1f2c0ed2
Merge pull request #741 from lightpanda-io/2xx_status
...
Allow any 2xx status code for scripts
2025-06-02 19:20:59 +08:00
Karl Seguin
bb465ed1ed
Allow any 2xx status code for scripts
...
DDG will sometimes return a 202 for its result javascript, meaning it isn't
ready and the rest of the JS will then handle that case. It's weird, but there's
no reason for us to abort on a 2xx code.
2025-06-02 17:20:28 +08:00
Karl Seguin
ac75f9bf57
Fix url constructor
...
url, base were being joined in the wrong order. Switch to using URL.stitch if
a base is given.
2025-06-02 16:43:01 +08:00
Karl Seguin
c80deeb5ec
Merge pull request #738 from lightpanda-io/buttons_submit_form
...
Submit input and button submits can now submit forms
2025-06-02 16:30:51 +08:00
sjorsdonkers
1b87f9690c
remove superflous text
2025-06-02 10:23:06 +02:00
sjorsdonkers
e799fcd48a
xmlserializer for doctype
2025-06-02 10:23:06 +02:00
Karl Seguin
4644e55883
Do not reset transfer_arena if page navigation results in delayed navigation
...
We normally expect a navigation event to happen at some point after the page
loads, like a puppeteer script clicking on a link. But, it's also possible for
the main navigation event to result in a delayed navigation. For example, an
html page with this JS:
<script>top.location = '/';</script>
Would result in a delayed navigation being called from the main navigate
function. In these cases, we cannot clear the transfer_arena when navigate is
completed, as its memory is needed by the new "sub" delayed navigation.
2025-06-02 14:16:36 +08:00
Karl Seguin
747a8ad09c
Submit input and button submits can now submit forms
2025-06-02 11:27:44 +08:00
Karl Seguin
32dc19cb1c
Run puppeteer-perf using ReleaseFast
2025-06-01 19:30:33 +08:00
Karl Seguin
527579aef4
Merge pull request #720 from lightpanda-io/clean_xhr_shutdown
...
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 / puppeteer-perf (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
Clean Http Request Shutdown
2025-05-31 07:51:11 +08:00
Karl Seguin
1869ef0c38
Merge pull request #734 from lightpanda-io/url_resolve_buffer_size
...
increase buffer size 1024->4096
2025-05-31 07:50:57 +08:00
Karl Seguin
e7007b4231
fix test
2025-05-31 07:31:05 +08:00
Karl Seguin
6ca57c1f8c
Merge pull request #723 from lightpanda-io/form_submit
...
Form submit
2025-05-31 07:23:49 +08:00
Karl Seguin
f2f7a349ce
Merge pull request #715 from lightpanda-io/location_change
...
Implement location.reload(), location.assign() and location setter
2025-05-31 07:23:36 +08:00
Karl Seguin
f696aa3748
Merge pull request #726 from lightpanda-io/fix_set_innerhtml_and_html_collection
...
Fix set_innerHTML, fix HTMLCollection fixed (postAttached) return type
2025-05-31 07:23:24 +08:00
Karl Seguin
f35e3ec78a
Merge pull request #725 from lightpanda-io/dynamic_script_onload
...
Execute onload for dynamic script
2025-05-31 07:23:14 +08:00
Karl Seguin
e339ee3f0c
Clean Http Request Shutdown
...
The Request object now exists on the heap, allowing it to outlive whatever is
making the request (e.g. the XHR object). We can now wait until all inflight IO
events are completed before clearing the memory.
This change fixes the crash observed in:
https://github.com/lightpanda-io/browser/issues/667
2025-05-31 07:22:01 +08:00
Karl Seguin
c30b424f36
increase buffer size 1024->4096
2025-05-31 07:19:30 +08:00
Pierre Tachoire
0b0b405974
Merge pull request #733 from lightpanda-io/e2e-bench
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (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
ci: disable telemetry for 2e2 tests
2025-05-30 16:33:25 +02:00
Karl Seguin
ef64fa3794
Execute onload for dynamic script
...
Add support for onerror for static and dynamic scripts.
Make script type checking case insensitive.
2025-05-30 22:24:44 +08:00
Pierre Tachoire
2531aed50b
ci: disable telemetry for 2e2 tests
2025-05-30 16:22:59 +02:00
Karl Seguin
6adb46abd5
Merge pull request #727 from lightpanda-io/named_node_map_named_index_and_iteartor
...
Implement named_get and iterator on NamedNodeMap
2025-05-30 22:22:06 +08:00
Karl Seguin
3ef1d8b0b9
Merge pull request #729 from lightpanda-io/fix_node_insert_before_null_reference
...
support null referene node to Node.insertBefore
2025-05-30 22:21:29 +08:00
Karl Seguin
71b5dc2f81
Merge pull request #731 from lightpanda-io/minor_chores
...
Update zig-v8-fork + zig fmt fix
2025-05-30 22:21:18 +08:00
Karl Seguin
5909ab7641
Merge pull request #730 from lightpanda-io/fix_html_image
...
Fix HTMLImageElement
2025-05-30 22:21:06 +08:00
Pierre Tachoire
b7beb73a92
Merge pull request #728 from lightpanda-io/e2e-bench
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (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
ci: switch lpd_bench_cdp
2025-05-30 15:41:55 +02:00
Karl Seguin
0acbb20c00
Merge pull request #732 from lightpanda-io/intersection_observer_threshold
...
IntersectionObserver's threshold option should be an union
2025-05-30 21:28:18 +08:00
Karl Seguin
9a2c0067f1
IntersectionObserver's threshold option should be an union
2025-05-30 20:48:10 +08:00
Karl Seguin
ab45b42382
Update zig-v8-fork + zig fmt fix
...
zig-v8-fork update simply removes a couple std.debug statements
2025-05-30 20:08:52 +08:00
Karl Seguin
4a6cee0611
Fix HTMLImageElement
...
HTMLImageElement is the correct class name. However, it has a "legacy factory":
Image (i.e. new Image()).
2025-05-30 20:05:51 +08:00
Karl Seguin
d39cada0c6
support null referene node to Node.insertBefore
2025-05-30 18:03:03 +08:00
Pierre Tachoire
b7b67681c7
ci: give time to start services
2025-05-30 11:27:35 +02:00
Pierre Tachoire
8551e05808
ci: switch lpd_bench_cdp
2025-05-30 11:02:28 +02:00
Karl Seguin
cfdbd418c1
Implement named_get and iterator on NamedNodeMap
2025-05-30 14:42:54 +08:00
Karl Seguin
2a4feb7bee
Fix set_innerHTML, fix HTMLCollection fixed (postAttached) return type
2025-05-30 13:32:29 +08:00
Karl Seguin
7202d758a2
Merge pull request #714 from lightpanda-io/live_scripts
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (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
Load dynamically added <script> tags
2025-05-29 18:06:56 +08:00
Karl Seguin
dab59aded3
Merge pull request #707 from lightpanda-io/skip_large_headers
...
Skip large header lines that don't fit into the header buffer.
2025-05-29 18:06:40 +08:00
Karl Seguin
20d0b4ad16
update libdom dep
2025-05-29 16:00:41 +08:00
Karl Seguin
eed4fc7844
Load dynamically added <script> tags
...
Add a callback to libdom which triggers whenever a script tag is added. Page
registers the callback AFTER the HTML is parsed, but before any JS is processed
and loads the script tags.
2025-05-29 16:00:40 +08:00
Karl Seguin
0ccd9e0579
Merge pull request #716 from lightpanda-io/skip_long_timeouts
...
Skip long setTimeout/setInterval
2025-05-29 15:59:52 +08:00
Karl Seguin
74b36d6d32
support form.submit()
...
Only supports application/x-www-form-urlencoded
2025-05-29 14:10:07 +08:00
Karl Seguin
58215a470b
Implement location.reload(), location.assign() and location setter
...
I'm not sure that _any_ location instance should be able to change the page URL.
But you can't create a new location (i.e. new Location() isn't valid), and the
only two ways I know of are via `window.location` and `document.location` both
of which _should_ alter the location of the window/document.
2025-05-29 13:59:15 +08:00
Karl Seguin
608e0a0122
Skip long setTimeout/setInterval
...
I guess this should eventually become a configuration option - what time is too
long and should they be skipped or just be run sooner?
But for now, this unblocks from fetching a site like DDG which does a setTimeout
of 2 minutes.
2025-05-29 13:58:31 +08:00
Karl Seguin
bddb3f0542
Merge pull request #724 from lightpanda-io/apt_update
...
run apt-get update before trying to install
2025-05-29 13:57:02 +08:00
Karl Seguin
83da81839b
run apt-get update before trying to install
2025-05-29 13:50:22 +08:00
Karl Seguin
73d63293d9
Merge pull request #722 from lightpanda-io/nix
...
Update flake.nix for Zig 0.14.1
2025-05-29 08:10:15 +08:00
Muki Kiboigo
f49710f361
update flake.nix for Zig 0.14.1
2025-05-28 13:05:03 -07:00
Karl Seguin
dffbce1934
Merge pull request #712 from lightpanda-io/tweak_http_logs
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (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
Reduce info logs of HTTP event
2025-05-28 23:04:29 +08:00
Karl Seguin
06a33b0c8b
Merge pull request #717 from lightpanda-io/missing-t
...
Missing T
2025-05-28 23:02:40 +08:00
Karl Seguin
a1f140acf7
Merge pull request #718 from lightpanda-io/max_memory_30
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (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
increase max memory threshold to 30
2025-05-28 17:21:18 +08:00
Karl Seguin
fed37bcc48
increase max memory threshold to 30
2025-05-28 17:07:28 +08:00
sjorsdonkers
88df9f0134
missing t
2025-05-28 10:42:33 +02:00
Karl Seguin
79d1425530
Reduce info logs of HTTP event
...
In normal cases, only log a single info event HTTP request. In an error case or
when log-level=debug, more may be logged.
2025-05-28 11:18:38 +08:00
Karl Seguin
f9144378ae
Re-enable microtask loop
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (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
Must have gotten disabled in a merge?
2025-05-27 21:05:24 +02:00
Muki Kiboigo
d13d28e6f4
use single pointer to parser.MouseEvent
2025-05-27 20:55:54 +02:00
Muki Kiboigo
c438bb2fbe
fix style of MouseEvent interface
2025-05-27 20:55:54 +02:00
Muki Kiboigo
5f4dd43124
support int enums in jsValueToZig
2025-05-27 20:55:54 +02:00
Muki Kiboigo
e7f16f371c
add MouseEvent
2025-05-27 20:55:54 +02:00
Karl Seguin
30ff17df28
Skip large header lines that don't fit into the header buffer.
...
https://github.com/lightpanda-io/browser/issues/672
2025-05-28 00:14:51 +08:00
Karl Seguin
d7a3e2f450
Merge pull request #694 from lightpanda-io/add_event_listener_object
...
AddEventListener object listener
2025-05-27 21:05:52 +08:00
Karl Seguin
9ce3fc9f8e
Refactor events
...
Removes some duplication between xhr/event_target and dom/event_target.
Implement 'once' option of addEventListener.
2025-05-27 21:03:43 +08:00
Karl Seguin
f0017c3e92
No-op eventHandler's passive option
...
This is a hint to the brower that the listener won't call preventDefault. In
theory, we should enforce this. But in practice, ignoring it should be ok.
2025-05-27 20:59:16 +08:00
Karl Seguin
99b7508c7a
support object listener on removeEventListener also
2025-05-27 20:59:16 +08:00
Karl Seguin
cff8857a36
AddEventListener object listener
...
Instead of taking a callback function, addEventListener can take an object
that exposes a `handleEvent` function. When used this way, `this` is
automatically bound. I don't think the current behavior is correct when
`handleEvent` is defined as a property (getter), but I couldn't figure out how
to make it work the way WPT expects, and it hopefully isn't a common usage
pattern.
Also added option support to removeEventListener.
2025-05-27 20:59:14 +08:00
Karl Seguin
60395852d5
Merge pull request #706 from lightpanda-io/cookie-domain-localhost
...
cookies: accept localhost domain
2025-05-27 20:55:21 +08:00
Karl Seguin
edf125b4ba
Merge pull request #705 from lightpanda-io/page_as_state
...
Replace SessionState directly with the Page.
2025-05-27 20:55:01 +08:00
Pierre Tachoire
b731fa4b78
cookie: ignore case when comparing with localhost domain
...
Co-authored-by: Karl Seguin <karlseguin@users.noreply.github.com >
2025-05-27 14:31:59 +02:00
Karl Seguin
676e6ecec1
fix/revert debug code
2025-05-27 20:31:37 +08:00
Karl Seguin
7d9951aa3c
Replace SessionState directly with the Page.
2025-05-27 20:31:34 +08:00
Karl Seguin
1d0876af4d
Merge pull request #691 from lightpanda-io/logger
...
Replace std.log with a structured logger
2025-05-27 20:24:07 +08:00
Pierre Tachoire
c6f23eee77
cookies: accept localhost domain
2025-05-27 14:11:32 +02:00
Karl Seguin
8d3cf04324
re-enable log tests
2025-05-27 19:57:58 +08:00
Karl Seguin
fe9344ce57
Try stateless logger (to save memory)
2025-05-27 19:57:58 +08:00
Karl Seguin
d7c4824633
remove unused init, and remove magic pre-alloc
2025-05-27 19:57:58 +08:00
Karl Seguin
2feba3182a
Replace std.log with a structured logger
...
Outputs in logfmt in release and a "pretty" print in debug mode. The format
along with the log level will become arguments to the binary at some point in
the future.
2025-05-27 19:57:58 +08:00
Pierre Tachoire
e9920caa69
Merge pull request #703 from lightpanda-io/window_top
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (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
Simple window.top implementation (not frame-aware)
2025-05-27 09:48:52 +02:00
Karl Seguin
9bcaaab9d7
Simple window.top implementation (not frame-aware)
2025-05-27 15:25:27 +08:00
Pierre Tachoire
d47db317fb
Merge pull request #702 from lightpanda-io/ci-bench
...
ci: execute cdp bench on main only
2025-05-27 06:48:31 +02:00
Pierre Tachoire
287d0fad85
Merge pull request #701 from lightpanda-io/s3-nightly
...
ci: use GLACIER IR class storage for release
2025-05-27 06:40:35 +02:00
Pierre Tachoire
7c19de3d61
ci: execute cdp bench on main only
2025-05-27 06:38:14 +02:00
Pierre Tachoire
a76cdf7514
ci: use GLACIER IR class storage for release
2025-05-27 06:34:24 +02:00
Karl Seguin
9abead7c49
Merge pull request #690 from lightpanda-io/zig_0_14_1
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (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
Upgrade to Zig 0.14.1
2025-05-27 08:11:33 +08:00
Pierre Tachoire
5ff3f71f83
Merge pull request #700 from lightpanda-io/s3-nightly
...
S3 nightly
2025-05-26 21:57:31 +02:00
Pierre Tachoire
e2f9ca66b6
ci: upload artifact on s3
2025-05-26 21:43:14 +02:00
Pierre Tachoire
e90048e5a8
Merge pull request #696 from lightpanda-io/cli_argument_name_fix
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (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 insecure_disable_tls_host_verification in serve more
2025-05-26 20:35:21 +02:00
Pierre Tachoire
eb1795aff9
Merge pull request #699 from lightpanda-io/bench-runner
...
ci: add missing AWS creds
2025-05-26 18:59:11 +02:00
Pierre Tachoire
3a92f93e6f
ci: add missing AWS creds
2025-05-26 18:58:41 +02:00
Pierre Tachoire
d1bd358785
Merge pull request #698 from lightpanda-io/bench-runner
...
ci: refacto e2e http start/stop
2025-05-26 18:53:53 +02:00
Pierre Tachoire
f63ea62f2d
ci: refacto e2e http start/stop
2025-05-26 18:30:51 +02:00
Pierre Tachoire
3fd5ed4feb
Merge pull request #697 from lightpanda-io/bench-runner
...
ci:fix deps
2025-05-26 18:22:25 +02:00
Pierre Tachoire
ba7df8b9cf
ci:fix deps
2025-05-26 18:21:59 +02:00
Pierre Tachoire
18b97df619
Merge pull request #693 from lightpanda-io/bench-runner
...
ci: add cdp-bench
2025-05-26 18:20:30 +02:00
Pierre Tachoire
087d23269b
ci: add hyperfine test
2025-05-26 18:07:05 +02:00
Karl Seguin
c77fb98b1f
Fix insecure_disable_tls_host_verification in serve more
...
It's currently using `--insecure_tls_verify_host` which is inconsistent with
fetch-mode and not what the help text says.
2025-05-26 22:42:42 +08:00
Pierre Tachoire
8c1f38f74d
ci: e2e: build release w/ -Dcpu=x86_64 option
2025-05-26 13:16:36 +02:00
Pierre Tachoire
13091e0de4
ci: add cdp-bench
...
The cdp bench is run on self host machine.
2025-05-26 13:16:36 +02:00
Karl Seguin
1a72bf5962
Merge pull request #692 from lightpanda-io/get_computed_style
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (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
make getComptedStyle return an empty CSSStyleDeclaration
2025-05-26 17:24:31 +08:00
Karl Seguin
b8cd0c1a77
remove debug statement
2025-05-26 15:43:21 +08:00
Karl Seguin
ecd593fb53
Add dummy Element.checkVisibility
...
`checkVisibility` currently always return true. Also, when the visibility CSS
property is checked, always return 'visible'. This allows the playwright click
test to pass with a working getComputedStyle. It's also probably more accurate -
by default, most elements are probably visible. But it still isn't great.
Add named_get to CSSStyleDeclaration (allowing things like `style.display`).
2025-05-26 15:08:25 +08:00
Karl Seguin
b17f20e2c5
make getComptedStyle return an empty CSSStyleDeclaration
2025-05-26 11:16:51 +08:00
Karl Seguin
eae9f9ceee
Merge pull request #664 from lightpanda-io/treewalker
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (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 TreeWalker
2025-05-26 11:06:56 +08:00
Karl Seguin
d2c13ed32b
Merge pull request #680 from lightpanda-io/css_style_declaration
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (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
CSSStyleDeclaration implementation
2025-05-25 19:34:20 +08:00
Karl Seguin
6fb78a99bf
update mlugg/setup-zig action
2025-05-25 09:10:42 +08:00
Karl Seguin
bcc4980189
Upgrade to Zig 0.14.1
2025-05-24 19:55:50 +08:00
Karl Seguin
bed394db80
Prefix tests (easier to filter, i.e. make test F="CSSValue")
...
Don't dupe value if it doesn't need to be quoted.
2025-05-24 11:45:42 +08:00
Karl Seguin
1fe2bf5dd5
Use fetchRemove and getOrPut to streamline map manipulation
2025-05-24 10:24:32 +08:00
Karl Seguin
7cc332a96e
Merge pull request #675 from lightpanda-io/http_request_notifications
...
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 / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (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
HTTP request notification
2025-05-24 10:10:16 +08:00
Karl Seguin
6ce24b3443
Rename allocator to arena to make the intent more clear
...
Use expectEqual where possible
deduplicate finalize and finishDeclaration
2025-05-24 10:08:26 +08:00
Karl Seguin
1dc6e91ec4
increase max memory threshold
2025-05-24 09:53:45 +08:00
Karl Seguin
f59e3cd4da
Maybe retry on TlsAlertCloseNotify error
...
This might not be specific to network notification, but the issue happens all
the time testing scenarios that rely on network notification, so it's hard
to ignore.
2025-05-24 09:01:13 +08:00
Karl Seguin
94a30b2167
HTTP request notification
...
- Add 2 internal notifications
1 - http_request_start
2 - http_request_complete
- When Network.enable CDP message is received, browser context registers for
these 2 events (when Network.disable is called, it unregisters)
- On http_request_start, CDP will emit a Network.requestWillBeSent message.
This _does not_ include all the fields, but what we have appears to be enough
for puppeteer.waitForNetworkIdle.
- On http_request_complete, CDP will emit a Network.responseReceived message.
This _does not_ include all the fields, bu what we have appears to be enough
for puppeteer.waitForNetworkIdle.
We currently don't emit any other new events, including any network-specific
lifecycleEvent (i.e. Chrome will emit an networkIdle and networkAlmostIdle).
To support this, the following other things were done:
- CDP now has a `notification_arena` which is re-used between browser contexts.
Normally, CDP code runs based on a "cmd" which has its own message_arena, but
these notifications happen out-of-band, so we needed a new arena which is
valid for handling 1 notification.
- HTTP Client is notification-aware. The SessionState no longer includes the
*http.Client directly. It instead includes an http.RequestFactory which is
the combination fo the client + a specific configuration (i.e. *Notification).
This ensures that all requests made from that factory have the same settings.
- However, despite the above, _some_ requests do not appear to emit CDP events,
such as loading a <script src="X">. So the page still deals directly with the
*http.Client.
- Playwright and Puppeteer (but Playwright in particular) are very sensitive to
event ordering. These new events have introduced additional sensitivity.
The result sent to Page.navigate had to be moved to inside the navigate event
handler, which meant passing some cdp-specific data (the input.id) into the
NavigateOpts. This is the only way I found to keep both happy - the sequence
of events is closer (but still pretty far) from what Chrome does.
2025-05-24 09:01:12 +08:00
Raph
bd0fa1487f
Merge branch 'main' into css_style_declaration
2025-05-24 03:00:18 +02:00
Karl Seguin
d262f017c5
Merge pull request #689 from lightpanda-io/image
...
new Image constructor
2025-05-24 08:51:08 +08:00
Karl Seguin
a98c08c06c
Merge pull request #688 from lightpanda-io/connection_cleanup
...
Fix connection memory leak
2025-05-24 08:38:44 +08:00
Raph
a2e0fd28e0
added basic style test to HTMLElement
2025-05-24 02:20:15 +02:00
Raph
5dbdf8321a
removed unnecessary call to free
2025-05-24 02:13:08 +02:00
Raph
9d122bd181
Merge branch 'main' into css_style_declaration
2025-05-24 02:00:33 +02:00
Raph
09727101c1
various fixes according to PR review
2025-05-24 01:59:28 +02:00
sjorsdonkers
5fc9cd7d48
non deprecated netsurf image properties
2025-05-23 15:25:41 +02:00
sjorsdonkers
7adaa53f42
image constructor
2025-05-23 11:37:46 +02:00
Karl Seguin
cc82b1ae25
Fix connection memory leak
...
When the idle pool is full and the oldest connection is freed, free the
connection instance.
2025-05-23 17:11:14 +08:00
Karl Seguin
0df531a646
Merge pull request #687 from lightpanda-io/always_gc_hints
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (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
Remove --gc_hints option, apply the --gc_hints behavior by default
2025-05-23 14:47:03 +08:00
Karl Seguin
b1d0368479
Remove --gc_hints option, apply the --gc_hints behavior by default
2025-05-23 14:15:55 +08:00
Karl Seguin
46c6a0b4ff
Merge pull request #683 from lightpanda-io/libc_v8_out_path_include_os
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (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
wpt / web platform tests json output (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
include OS in libc_v8 lib path
2025-05-23 08:40:44 +08:00
Muki Kiboigo
97d414aa00
Fixing TreeWalker Filtering
2025-05-22 12:23:00 -07:00
Pierre Tachoire
ab8da3965b
Merge pull request #685 from lightpanda-io/rsync-v8
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (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
README: rsync is used to get v8 sources
2025-05-22 14:45:44 +02:00
Pierre Tachoire
589fa4c9de
README: rsync is used to get v8 sources
2025-05-22 14:45:10 +02:00
Karl Seguin
f4a27af37e
zig fmt build.zig
2025-05-22 16:58:29 +08:00
Karl Seguin
ca0f407b7b
include OS in libc_v8 lib path
2025-05-22 16:45:06 +08:00
Karl Seguin
4810a5643e
Merge pull request #682 from lightpanda-io/make_debug_and_formdata_wpt
...
Add debug log level to make build-dev and add new make run-debug
2025-05-22 15:56:22 +08:00
Karl Seguin
72a983f6d8
Apply suggestions from code review
...
Co-authored-by: Pierre Tachoire <pierre@lightpanda.io >
2025-05-22 15:36:55 +08:00
Karl Seguin
a720333c0f
Add debug log level to make build-dev and add new make run-debug
...
Update WPT submodule, now includes xhr/formdata tests.
2025-05-22 15:28:07 +08:00
Karl Seguin
38c6fa9c76
Don't error when failing to convert type to function.
...
Because jsValueToStruct is now used in union probing, it shouldn't fail on a
mismatch, but rather return null. It's up to the caller to decide whether that's
an error or not.
2025-05-22 13:02:08 +08:00
Karl Seguin
eed3d27665
Merge pull request #678 from lightpanda-io/ExecutionWorld
...
Rename to ExecutionWorld
2025-05-22 08:56:06 +08:00
Raph
450e345b28
fixed self fetching for HTMLElement
2025-05-22 02:01:11 +02:00
Raph
913568aba2
Added support for CSSStyleDeclaration API
2025-05-22 01:51:03 +02:00
Muki Kiboigo
3c3de9d325
use Env.Function instead of Env.Callback
2025-05-21 16:29:48 -07:00
Muki Kiboigo
fada732b33
add NodeFilter
2025-05-21 09:46:43 -07:00
Muki Kiboigo
152d0fdda7
add TreeWalker
2025-05-21 09:46:43 -07:00
Pierre Tachoire
6506fa792d
Merge pull request #679 from lightpanda-io/increase-MAX_MESSAGE_SIZE
...
Increase MAX_MESSAGE_SIZE
2025-05-21 18:03:16 +02:00
Pierre Tachoire
867c72ba90
fix comment
2025-05-21 18:02:33 +02:00
sjorsdonkers
3f6b095da4
Increase MAX_MESSAGE_SIZE
2025-05-21 17:51:25 +02:00
Karl Seguin
f1d6d386c5
Merge pull request #669 from lightpanda-io/form_data_from_form
...
FormData constructor form & submitter parameter
2025-05-21 23:36:12 +08:00
Karl Seguin
72944a4e5e
Support submit button submitters and check for disabled option on select
2025-05-21 21:47:33 +08:00
sjorsdonkers
193e012aa6
Rename to ExecutionWorlds
2025-05-21 14:34:23 +02:00
Karl Seguin
3ee17e01e1
Merge pull request #677 from lightpanda-io/move_jsValueToZig
...
Move jsValueToZig from Caller to the Scope
2025-05-21 20:21:48 +08:00
sjorsdonkers
7421fa0a33
dom.getBoxModel
2025-05-21 13:28:31 +02:00
sjorsdonkers
2cdfc3f4c3
setChildNodes checks
2025-05-21 12:36:31 +02:00
sjorsdonkers
4322d8e494
dom.querySelector
2025-05-21 12:36:31 +02:00
Karl Seguin
73a59dcd7d
Move jsValueToZig from Caller to the Scope
...
Caller is a transient object that exists only for calling Zig functions from
JS. But jsValueToZig is more generally useful and can be used outside of an
explicit JS call. The scope is a better place for these as it's generally
referenced already by any code that would need to map values (i.e. a Callback).
2025-05-21 18:32:50 +08:00
Karl Seguin
3a15790847
Merge pull request #671 from lightpanda-io/webapi_destructor
...
Allow webapis to register a destructor to do cleanup on scope (page) end
2025-05-21 18:09:42 +08:00
sjorsdonkers
3f31573bcb
No need to navigate to about:blank
2025-05-21 09:43:15 +02:00
sjorsdonkers
967ab18d53
default:blank as default document
2025-05-21 09:43:15 +02:00
sjorsdonkers
0929bd217d
load aboutblank doc
2025-05-21 09:43:15 +02:00
Karl Seguin
ce832a8063
Rollback XHR/HTTP.client change
...
This PR will be only for having the destructor hook. XHR/http.client changes to
leverage this will be done in a subsequent PR.
2025-05-21 11:38:26 +08:00
Karl Seguin
fc0281b563
Merge pull request #665 from lightpanda-io/log_debug
...
Tweak debug logging
2025-05-21 09:03:06 +08:00
Karl Seguin
f42bd02cfc
Don't crash on success
...
Keep request around, as the http/client needs it for cleanup. Calling abort
on an already deinit'd request is safe.
2025-05-20 19:22:43 +08:00
Karl Seguin
52634ddeb3
Allow webapis to register a destructor to do cleanup on scope (page) end
...
Add destructor to XHR to abort any inflight requests.
2025-05-20 18:56:22 +08:00
Karl Seguin
ed79b4ebd8
FormData constructor form & submitter parameter
...
FormData takes two optional parameters: a form and a submitter.
Building the FormData from these is a first step in supporting form submission.
Basic extension of the HTMLForm element. There was more work done on the Select
web api, because the netsurf implementation isn't great. But all of the input
elements will need to have their web api extended.
2025-05-20 18:18:03 +08:00
Pierre Tachoire
36ca7839d6
Merge pull request #666 from lightpanda-io/playwright-support-disclaimer
...
Playwright support disclaimer
2025-05-20 10:20:13 +02:00
Pierre Tachoire
fa5d583657
fix space
2025-05-20 10:19:56 +02:00
Sjors
5e67f09583
Disclaimer feedback
2025-05-20 09:48:08 +02:00
Sjors
8b74d96f12
Playwright support disclaimer
2025-05-20 09:26:51 +02:00
Karl Seguin
769d99e7bd
Tweak debug logging
...
1 - Add a log_level build option to control the default log level from
the build (e.g. -Dlog_level=debug). Defaults to info
2 - Add a new boolean log_unknown_properties build option to enable
logging unknown properties. Defautls to false.
3 - Remove the log debug for script eval - this can be a huge value
(i.e. hundreds of KB), which makes the debug log unusable IMO.
2025-05-20 11:29:14 +08:00
Karl Seguin
812f4d2699
Merge pull request #650 from lightpanda-io/http_client_async_gzip
...
Add support for gzip responses in AsyncHandler
2025-05-20 11:26:58 +08:00
sjorsdonkers
f95defe82f
Do not getComputedStyle
2025-05-19 17:52:00 +02:00
sjorsdonkers
226dafa9e3
refix rebase regressions
2025-05-19 16:53:59 +02:00
sjorsdonkers
6c92d50c68
elementsFromPoint cleanup
2025-05-19 16:53:59 +02:00
sjorsdonkers
384e74fe7e
Also return body and html elements
2025-05-19 16:53:59 +02:00
sjorsdonkers
216f6cc8e8
handle detached elements
2025-05-19 16:53:59 +02:00
sjorsdonkers
333c377bc7
make elementFromPoint more robust against future changes
2025-05-19 16:53:59 +02:00
sjorsdonkers
59b33faf61
confirm data is retained in elementFromPoint
2025-05-19 16:53:59 +02:00
sjorsdonkers
b87003427c
fix unset heap_ptr
2025-05-19 16:53:59 +02:00
sjorsdonkers
cb48000df7
elementsFromPoint
2025-05-19 16:53:59 +02:00
Pierre Tachoire
58cc5d8d1a
Merge pull request #660 from lightpanda-io/implementation-update
...
implementation: remove the setTitle method call
2025-05-19 16:14:46 +02:00
Karl Seguin
39799d3006
Merge pull request #662 from lightpanda-io/fix_broken_test_build
...
fix broken test build
2025-05-19 22:14:16 +08:00
Karl Seguin
73bf4479b5
fix broken test build
2025-05-19 22:03:34 +08:00
Pierre Tachoire
9f0f84bbee
Merge pull request #658 from lightpanda-io/ready_state
...
Add document.readyState
2025-05-19 15:49:31 +02:00
Karl Seguin
1ff422a29c
Merge pull request #659 from lightpanda-io/dedup-document
...
Deduplicate document
2025-05-19 19:07:16 +08:00
Pierre Tachoire
8daa525cc1
implementation: remove the setTitle method call
...
Libdom uses the doc's body and title attributes by default.
But it fallback to the DOM tree if the attributes are NULL.
I think it's better to have only the DOM tree set on document creation.
2025-05-19 12:16:07 +02:00
sjorsdonkers
76f1fcb634
dedup document
2025-05-19 11:35:29 +02:00
Karl Seguin
2b6cf95752
Add document.readyState
...
To support this, add the ability to embedded data into libdom nodes, so that
we can extend libdom without having to alter it.
2025-05-19 16:48:11 +08:00
Pierre Tachoire
a99d193b12
Merge pull request #653 from lightpanda-io/document_default_view
...
add defaultView getter to HTMLDocument
2025-05-19 10:19:54 +02:00
Pierre Tachoire
a3b576abd8
Merge pull request #656 from lightpanda-io/module-exception
...
module: report module's evaluation error
2025-05-17 11:17:28 +02:00
Pierre Tachoire
2261eac288
expection: fix non-nullable return
2025-05-17 11:02:37 +02:00
Karl Seguin
9366729d7a
Merge pull request #655 from lightpanda-io/dom-parser
...
e2e-test / zig build release (push) Waiting to run
e2e-test / puppeteer-perf (push) Blocked by required conditions
e2e-test / demo-scripts (push) Blocked by required conditions
zig-test / zig build dev (push) Waiting to run
zig-test / browser fetch (push) Blocked by required conditions
zig-test / zig test (push) Waiting to run
zig-test / perf-fmt (push) Blocked by required conditions
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 DOMParser
2025-05-17 09:56:32 +08:00
Karl Seguin
ad1a4fe450
Merge pull request #652 from lightpanda-io/transfer_arena
...
Introduce a "transfer_arena"
2025-05-17 09:44:21 +08:00
Pierre Tachoire
9f97725894
module: report module's evaluation error
2025-05-16 20:27:41 +02:00
Muki Kiboigo
bff3d27518
add DOMParser
2025-05-16 09:56:18 -07:00
Karl Seguin
2bc1192ad3
reduce lifetime of transfer_arena
2025-05-16 22:04:13 +08:00
Karl Seguin
f165131da8
add defaultView getter to HTMLDocument
2025-05-16 20:33:28 +08:00
Karl Seguin
afd29fef81
Merge pull request #651 from lightpanda-io/html_all_collection
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (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
Rework HTMLAllCollection
2025-05-16 17:26:26 +08:00
Karl Seguin
071a4f97e5
Introduce a "transfer_arena"
...
Some data has to exist specifically for the navigation of one page to another.
For example, if a hyperlink is clicked, the URL begins its life with the
original page, but is transferred to the new page. The page_arena cannot be used
for such data.
It's possible to use the session_arena, but it's lifetime is much longer and,
given enough navigation, could accumulate a lot of memory.
The new transfer_arena exists within the session, but only exists until the
next navigation.
While currently only used for the navigation URL, the main goal here is to have
a place to put the request body on form submission, which has a lifetime similar
to a click url.
While I'm at it, I promoted the existing session arena and the new transfer
arena to the browser, allowing better memory re-use between sessions.
2025-05-16 15:53:25 +08:00
Karl Seguin
04c990de89
Merge pull request #649 from lightpanda-io/html_collection_named_properties
...
Fix HTMLCollection named property issues
2025-05-16 14:47:02 +08:00
Karl Seguin
b08ffcc437
Rework HTMLAllCollection
...
Capture its unique properties:
1- instances are falsy, and
2- instance can be called as a function
The behavior is used for browser detection (i.e. duckduckgo treats us as a
legacy browser because we document.all != false)
2025-05-16 13:39:27 +08:00
Karl Seguin
7156df8d9a
Add support for gzip responses in AsyncHandler
...
Compliments https://github.com/lightpanda-io/browser/pull/601 which added this
behavior to the SyncHandler.
2025-05-16 12:51:53 +08:00
Karl Seguin
1a83e69669
Fix HTMLCollection named property issues
...
1 - Named properties should not be enumerable
2 - Empty key should always result in a null/undefined (depending on the API)
even if there's an element with an empty id/name
To address the first issue, we now require PropertyAttributes to be specified
when setting an object's value.
2025-05-16 11:31:52 +08:00
Karl Seguin
210d4f6aa1
Merge pull request #620 from lightpanda-io/upgrade_v8
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (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
Upgrade v8
2025-05-16 08:17:15 +08:00
Karl Seguin
b559506d4e
remove unecessary space
2025-05-16 08:10:16 +08:00
Karl Seguin
3fec6ff5bc
Merge pull request #643 from lightpanda-io/add_event_listener_options
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (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
Support the capture field of the addEventListener option
2025-05-15 22:48:55 +08:00
Karl Seguin
ce74307172
Merge pull request #646 from lightpanda-io/split_browser_file
...
Move Session, Page and Renderer into their own respective files
2025-05-15 22:48:35 +08:00
Karl Seguin
e44e68f8fc
Move Session, Page and Renderer into their own respective files
2025-05-15 22:43:50 +08:00
Karl Seguin
eff1341088
Merge pull request #647 from lightpanda-io/form_data
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (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 FormData web API
2025-05-15 17:34:02 +08:00
Karl Seguin
ddd35e3d80
Merge pull request #641 from lightpanda-io/js_debug_helpers
...
Make Callback.printFunc public
2025-05-15 16:44:31 +08:00
Karl Seguin
265272b9d3
move FormData to xhr folder
2025-05-15 16:39:49 +08:00
Karl Seguin
206e34ac80
Explicit error if an AddEventListenerOption flag is set that we dont' support
2025-05-15 13:32:40 +08:00
Karl Seguin
ea556ff201
Merge pull request #635 from lightpanda-io/http_proxy
...
add direct http proxy support
2025-05-15 12:58:54 +08:00
Karl Seguin
110dc751a4
add FormData web API
2025-05-15 12:44:24 +08:00
Karl Seguin
46546def28
Merge pull request #638 from lightpanda-io/DOM-scoll-and-quads
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (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
scrollIntoViewIfNeeded, getContentQuads, innerWidth/Heigh
2025-05-15 09:12:00 +08:00
sjorsdonkers
48de14ade3
null JS tests where we are not checking the output
2025-05-14 17:17:58 +02:00
sjorsdonkers
f74647ccfc
Allign error detection
2025-05-14 17:13:56 +02:00
sjorsdonkers
b92a85f0a9
Cleanup and inner dimensions
2025-05-14 17:13:55 +02:00
sjorsdonkers
853965e7a9
scollifneeded and contentQuads wip
2025-05-14 17:13:55 +02:00
Karl Seguin
6f9dd8d7cd
Make expected runtime runner value optional to skip assertion
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (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
2025-05-14 16:18:53 +02:00
Karl Seguin
905eb1a93f
Make expected runner value optional to skip assertion
2025-05-14 16:18:53 +02:00
Karl Seguin
7862fc7cb7
Merge pull request #640 from lightpanda-io/script_nomodule
...
Don't load script tags with the nomodule attribute
2025-05-14 18:30:26 +08:00
Karl Seguin
903168b3a6
Support the capture field of the addEventListener option
...
addEventListener can take a boolean (capture, already supported) or an object
of options. This adds union support for the two, but only supports the `capture`
field of the options object.
The other fields are not supported by netsurf.
2025-05-14 18:24:41 +08:00
Karl Seguin
5e8fcb579f
print value using toDetailString
2025-05-14 17:56:00 +08:00
Karl Seguin
fae018b4ea
Make Callback.printFunc public
...
When calling a Zig function from JS fails due to a parameter type error,
log.debug information about the function and parameters.
2025-05-14 17:37:46 +08:00
Karl Seguin
dc0e278a24
Don't load script tags with the nomodule attribute
...
These tags should not be loaded as we support ES modules.
2025-05-14 16:50:34 +08:00
Karl Seguin
aaa34ab860
link libc_v8.a in correct directory
2025-05-14 15:19:47 +08:00
Karl Seguin
66638cab33
update v8 revision
2025-05-14 15:02:55 +08:00
Karl Seguin
a729a61100
zig fmt build.zig
2025-05-14 11:27:49 +08:00
Karl Seguin
23b39c6a63
return explicit intercept state from named/indexed getters
2025-05-14 11:27:48 +08:00
Karl Seguin
37467d3753
remove debug statement
2025-05-14 11:27:39 +08:00
Karl Seguin
8d3a378761
remove unused import, add debug statement
2025-05-14 11:27:39 +08:00
Karl Seguin
3993f9c2bb
update to latest zig-v8-fork add unzip to apt get install sample
2025-05-14 11:27:37 +08:00
Karl Seguin
b542762dce
update zig-v8 dep for proper named property masking flag
2025-05-14 11:27:25 +08:00
Karl Seguin
35b2ea870d
use zig-v8-fork v8_upgrade branch
2025-05-14 11:26:48 +08:00
sjorsdonkers
b2605dd30c
cancelAnimationFrame and test
2025-05-13 18:24:10 +02:00
sjorsdonkers
18b04e2999
requestAnimationFrame
2025-05-13 18:24:10 +02:00
sjorsdonkers
54c2dedac0
expectEqual and naming
2025-05-13 17:42:35 +02:00
sjorsdonkers
0efa6661b8
fix units of reslution to microsec
2025-05-13 17:42:35 +02:00
sjorsdonkers
42d0532580
cleanup
2025-05-13 17:42:35 +02:00
sjorsdonkers
8d5f7c8d3e
performance now
2025-05-13 17:42:35 +02:00
Karl Seguin
04214200b8
Merge pull request #626 from lightpanda-io/text-encoder
...
WIP implement TextEncoder
2025-05-13 22:49:10 +08:00
Pierre Tachoire
99229513ba
implement TextEncoder
2025-05-13 16:41:59 +02:00
Karl Seguin
c3a992e6d4
Merge pull request #632 from lightpanda-io/module-map
...
Page Module Map
2025-05-13 21:46:11 +08:00
Muki Kiboigo
e15c80927b
check page module_map before fetching
2025-05-13 06:39:45 -07:00
Karl Seguin
e918a0bf26
add direct http proxy support
2025-05-13 18:21:27 +08:00
Karl Seguin
35bff8cc67
Merge pull request #631 from lightpanda-io/element_closest
...
Element closest
2025-05-13 16:40:25 +08:00
sjorsdonkers
0998ae753c
use log an brievity
2025-05-13 10:31:40 +02:00
Karl Seguin
7bb6506709
Merge pull request #623 from lightpanda-io/http_client_keepalive
...
add keepalive to http client
2025-05-13 10:51:07 +08:00
Karl Seguin
64f80312de
fix formatting
2025-05-13 10:42:51 +08:00
Karl Seguin
ce2eed28c1
Fix memory leaks
2025-05-13 10:42:16 +08:00
Karl Seguin
505fa91d7d
add keepalive to http client
2025-05-13 10:42:16 +08:00
sjorsdonkers
dd7e6d3831
Element closest
2025-05-12 17:20:43 +02:00
Pierre Tachoire
b086337dbe
Merge pull request #629 from lightpanda-io/return_typed_arrays
...
Ability to return typed arrays
2025-05-12 14:31:04 +02:00
Karl Seguin
49562f50f2
update zig-v8-fork build version
2025-05-12 18:43:40 +08:00
Karl Seguin
884ec05a1e
Merge pull request #628 from lightpanda-io/init_netsurf_at_page_creation
...
Init netsurf at page creation
2025-05-12 17:57:59 +08:00
Karl Seguin
212d7f1865
Ability to return typed arrays
2025-05-12 17:47:05 +08:00
sjorsdonkers
9ab8a2cbd2
remove manual test parser.init
2025-05-12 11:34:57 +02:00
Pierre Tachoire
f633eddd73
Merge pull request #624 from lightpanda-io/document_fragment_apis
...
Add prepend, append and relpaceChildren to DocumentFragment
2025-05-12 11:31:23 +02:00
sjorsdonkers
f5761ee69d
Init netsurf at page creation
2025-05-12 11:19:19 +02:00
Karl Seguin
b8cdc0f145
Add prepend, append and relpaceChildren to DocumentFragment
2025-05-12 09:35:33 +08:00
Karl Seguin
b5eea2136b
Merge pull request #612 from lightpanda-io/fix-url-resolving
...
Fix URL Resolving
2025-05-11 08:38:57 +08:00
Pierre Tachoire
deded47da2
Merge pull request #622 from lightpanda-io/wpt-fix
...
ci: fix workflows dependency for wpt tests
2025-05-10 08:36:05 +02:00
Pierre Tachoire
fdc0e2597d
Merge pull request #621 from lightpanda-io/attributes
...
A few attribute fixes
2025-05-10 08:30:29 +02:00
Pierre Tachoire
da5b0260f2
ci: fix workflows dependency for wpt tests
2025-05-10 08:28:07 +02:00
Karl Seguin
beb960b753
A few attribute fixes
...
Driven by dom/nodes/attributes.html. However, many issues remain and seem
complicated to fix. Some of the remaining issues are documented in
https://github.com/lightpanda-io/project/discussions/124
2025-05-10 14:17:15 +08:00
Karl Seguin
5cc338dedc
Merge pull request #609 from lightpanda-io/ddg_compat
...
Work on DDG support (but still not working)
2025-05-10 10:32:50 +08:00
Muki Kiboigo
15be42340d
handling relative base URLs
2025-05-09 07:00:57 -07:00
Muki Kiboigo
f10bee8cb0
fix single slash url resolving issue
2025-05-09 06:59:12 -07:00
Pierre Tachoire
eadf18821f
Merge pull request #616 from lightpanda-io/wpt-nightly
...
ci: run wpt test nightly
2025-05-09 13:39:15 +02:00
Pierre Tachoire
56b1c7b11a
ci: run wpt test nightly
2025-05-09 13:28:34 +02:00
Pierre Tachoire
e4513976f7
Merge pull request #617 from lightpanda-io/before_and_after
...
Add before and after functions
2025-05-09 12:00:39 +02:00
Pierre Tachoire
b71ea3852e
Merge pull request #618 from lightpanda-io/action-timeouts
...
Timouts for all GH actions
2025-05-09 11:55:57 +02:00
sjorsdonkers
ae6c29ccff
Timouts for all GH actions
2025-05-09 11:20:51 +02:00
sjorsdonkers
1820e79617
Renable microtask_node that was fixed in main
2025-05-09 10:44:07 +02:00
sjorsdonkers
2a95b7a37c
Reduce url buffer
2025-05-09 10:44:07 +02:00
sjorsdonkers
fb95df66c9
redisable microtask_node
2025-05-09 10:44:07 +02:00
sjorsdonkers
3c76284d89
Print error on navigation failure
2025-05-09 10:44:07 +02:00
sjorsdonkers
29967fde50
delay navigate on click
2025-05-09 10:44:07 +02:00
sjorsdonkers
bd65e4084c
renderer fix & url buffer
2025-05-09 10:44:07 +02:00
Karl Seguin
a2a9977af6
Merge pull request #614 from lightpanda-io/browser_controlled_gc_hints
...
Move call/control of gc_hint to browser.
2025-05-09 12:26:14 +08:00
Karl Seguin
0369b490b8
Add before and after functions
...
Element and CharData both have a before & after function.
Also, changed the existing functions that took a Node but should take
a Node or Text, i.e append, prepend and replaceChildren. These functions, along
with the new before/after all take a new NodeOrText union.
2025-05-09 12:23:31 +08:00
Pierre Tachoire
d9e5821d31
Merge pull request #613 from lightpanda-io/css_selector_parsing_tweaks
...
"Improve" css selector parsing
2025-05-08 14:43:43 +02:00
Karl Seguin
54a7df8d40
Move call/control of gc_hint to browser.
...
It has more context than the env about when this should be called. Specifically
it can be called once per session, whereas, in the env, we can only call it
once per context - which could be too often.
2025-05-08 18:31:46 +08:00
Karl Seguin
17ed502123
Merge pull request #601 from lightpanda-io/http_gzip
...
Support gzip compressed content for the synchronous http client
2025-05-08 13:52:05 +08:00
Karl Seguin
56eef2ec94
"Improve" css selector parsing
...
This is driven by dom/nodes/ParentNode-querySelector-escapes.html
It seems like invalid unicode and null terminating characters should be replaced
with the replacement character (i.e. �).
Also, allow escape sequence to be at the end of the string.
For the functions I changed, I added:
```zig
const sel = p.s;
const sel_len = sel.len
```
To improve readability (`selector` can't be used because it shadows the import).
Tests went from 39/68 -> 66/68.
2025-05-08 11:34:04 +08:00
Karl Seguin
200036efc9
undo microtask change, do it in a separate PR
2025-05-08 07:46:05 +08:00
Karl Seguin
7fa7f4ed8a
Work on DDG support (but still not working)
...
- Add dummy MediaQueryList and window.matchMedia
- Execute deferred scripts after non-deferred
I realize this doesn't change much, given how we currently load all scripts
after the document is parsed, but scripts _could_ depend on execution order.
- Add support for executing the `onload` attribute of <scripts>
I also cleaned up some of the Script code, i.e. removimg `unknown` kind and
simply returning a null script, and removing the EmptyBody error and returning
a null body string.
Finally, I re-enabled the microtask loop which I must have previously disabled.
2025-05-08 07:46:04 +08:00
Karl Seguin
3466325d4d
Merge pull request #610 from lightpanda-io/loop_interval_cleanup
...
Optimize intervals, and make sure they're probably cleaned up.
2025-05-08 07:44:59 +08:00
muki
1613345dec
Merge pull request #611 from lightpanda-io/nix
...
Add Nix Development Support
2025-05-07 06:19:22 -07:00
Muki Kiboigo
759accef07
add README entry about Nix
2025-05-07 06:16:32 -07:00
Muki Kiboigo
6d02669fc3
add flake.nix
2025-05-07 06:16:32 -07:00
Karl Seguin
6d8d688063
Optimize intervals, and make sure they're probably cleaned up.
...
A loop interval will no longer stop the loop from returning from `run`, and
no longer requires mutating event_nb on each iteration.
Re-enable microtask loop, which I accidentally stopped in a previous commit.
2025-05-07 19:20:26 +08:00
Karl Seguin
5207bdfd85
Merge pull request #608 from lightpanda-io/wpt-opts-url
...
wpt: use local url for wpt tests
2025-05-07 16:07:24 +08:00
Karl Seguin
690d4238e8
Merge pull request #607 from lightpanda-io/fix_int_overflow
...
fix overflow when setting timeout/interval
2025-05-07 16:05:37 +08:00
Pierre Tachoire
95ee78b1bd
wpt: use local url for wpt tests
2025-05-07 09:43:18 +02:00
Karl Seguin
25eadc2263
fix overflow when setting timeout/interval
2025-05-07 15:37:47 +08:00
Pierre Tachoire
28e4065890
Merge pull request #606 from lightpanda-io/no_owned_slice
...
remove unecessary toOwnedSlice
2025-05-07 08:47:37 +02:00
Karl Seguin
e44388b506
remove unecessary toOwnedSlice
2025-05-07 14:40:03 +08:00
Pierre Tachoire
540dea9fc3
Merge pull request #604 from lightpanda-io/non_generic_named_function
...
Change NamedFunction from a generic to a normal struct.
2025-05-07 08:32:14 +02:00
Karl Seguin
c31290b794
Change NamedFunction from a generic to a normal struct.
...
NamedFunction is important for displaying good error messages when there's
something wrong with the Zig structs we're trying to bind to JS. By making it
a normal struct, it's easier and cheaper to pass wherever an @compileError
might be needed.
2025-05-07 13:50:25 +08:00
Pierre Tachoire
f1fe4c0c70
Merge pull request #600 from lightpanda-io/timeouts_and_intervals
...
Make intervals easier and faster, add window.setInterval and clearInt…
2025-05-06 15:18:15 +02:00
Pierre Tachoire
921ac18876
Merge pull request #602 from lightpanda-io/Subpixel-mouse-events
...
Subpixel mouse events
2025-05-06 15:11:40 +02:00
sjorsdonkers
505ad0380e
typo
2025-05-06 12:52:08 +02:00
sjorsdonkers
2b7a7c0054
floor the pixels
2025-05-06 12:45:18 +02:00
sjorsdonkers
0dea4c51b7
Subpixel mouse events
2025-05-06 12:45:17 +02:00
Karl Seguin
3095f2110e
Merge pull request #599 from lightpanda-io/NativeIntersectionObserver
...
Native IntersectionObserver
2025-05-06 17:36:56 +08:00
sjorsdonkers
e32d35b156
no reobserve rootbounds for Window
2025-05-06 11:28:08 +02:00
sjorsdonkers
db28336e5d
Support options in observer and tests
2025-05-06 11:28:07 +02:00
sjorsdonkers
c5c5accaa8
Native IntersectionObserver
2025-05-06 11:28:06 +02:00
Karl Seguin
78bfdd4515
Support gzip compressed content for the synchronous http client
2025-05-06 16:23:44 +08:00
Karl Seguin
01aa826a24
Make intervals easier and faster, add window.setInterval and clearInterval
...
When the browser microtask was added, zig-specific timeout functions were
added to the loop. This was necessary for two reasons:
1 - The existing functions were JS specific
2 - We wanted a different reset counter for JS and Zig
Like we did in https://github.com/lightpanda-io/browser/pull/577 , the loop is
now JS-agnostic. It gets a Zig callback, and the Zig callback can execute JS
(or do whatever). An intrusive node, like with events, is used to minimize
allocations.
Also, because the microtask was recently moved to the page, there is no longer
a need for separate event counters. All timeouts are scoped to the page.
The new timeout callback can now be used to efficiently reschedule a task. This
reuses the IO.completion and Context, avoiding 2 allocations. More importantly
it makes the internal timer_id static for the lifetime of an "interval". This
is important for window.setInterval, where the callback can itself clear the
interval, which we would need to detect in the callback handler to avoid
re-scheduling. With the stable timer_id, the existing cancel mechanism works
as expected.
The loop no longer has a cbk_error. Callback code is expected to try/catch
callbacks (or use callback.tryCall) and handle errors accordingly.
2025-05-05 19:03:45 +08:00
Pierre Tachoire
7f2506d8a6
Merge pull request #598 from lightpanda-io/unused_imports
...
e2e-test / zig build release (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / 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
remove unused code, mostly imports
2025-05-05 12:07:29 +02:00
Karl Seguin
7c2f7b6338
Merge pull request #595 from lightpanda-io/env_debug_ergonomics
...
Improve the debug ergonomics of the Env generic.
2025-05-05 16:22:05 +08:00
Karl Seguin
5f05de30a6
Improve the debug ergonomics of the Env generic.
...
Previously, we were passing our WebAPIs directly as an anonymous tuple. This
resulted in Env(T) having an _awful_ name - a name composed of hundreds of
classes.
By wrapping the anonymous tuple into a normal struct, the Env now gets a sane
name which helps improve stack traces (and profiling, and debugging, ...)
2025-05-05 16:03:55 +08:00
Pierre Tachoire
7741de7ae0
Merge pull request #597 from lightpanda-io/fix_undefined_access
...
Remove undefined that causes crash
2025-05-05 09:54:54 +02:00
Karl Seguin
d4c8e8c50e
Merge pull request #592 from lightpanda-io/isolated-polyfill-+-create-when-needed
...
Isolated polyfill & create world when needed
2025-05-05 15:03:05 +08:00
Pierre Tachoire
bf36ff9cb9
Merge pull request #593 from lightpanda-io/crypto_web_api
...
add crypto web api
2025-05-05 08:56:27 +02:00
Pierre Tachoire
8eadccdee2
Merge pull request #587 from lightpanda-io/dom-setchildnodes
...
cdp: dispatch DOM.setChildNodes event for search results
2025-05-05 08:56:04 +02:00
Kilari Teja
b32839292c
Support Data URI in scripts tags ( #596 )
...
* Support text/javascript mime type
* Support base64 encoded scripts
Related to https://github.com/lightpanda-io/browser/issues/412
2025-05-05 14:48:21 +08:00
Pierre Tachoire
2402443dcc
cdp: add comments on setChildNodes event
...
Co-authored-by: Karl Seguin <karlseguin@users.noreply.github.com >
2025-05-05 08:48:04 +02:00
sjorsdonkers
9f72c98967
Error on null page/scope
2025-05-05 08:46:33 +02:00
sjorsdonkers
f6f744aea1
Fix gc_hints not being send
2025-05-05 08:46:33 +02:00
sjorsdonkers
cddc55694a
load polyfills on creation
2025-05-05 08:46:32 +02:00
sjorsdonkers
8930e2f06e
isolated polyfill + create when needed
2025-05-05 08:46:32 +02:00
Karl Seguin
b8e5e130b9
remove unused code, mostly imports
2025-05-05 13:29:41 +08:00
Karl Seguin
a8c5087a38
Remove undefined that causes crash
...
These values are set to undefined, and used (in the item function) before ever
being set. Causes crashes in release mode.
2025-05-04 21:18:30 +08:00
Karl Seguin
d9f21e0475
add empty cases to empty test suite ( #594 )
e2e-test / zig build release (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / 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
2025-05-03 14:11:39 +08:00
Karl Seguin
ca3fa3dc40
Rework WPT runner ( #589 )
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / 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
* Rework WPT runner
We have no crashing tests, remove safe mode. Allows better re-use of arenas,
and if we do introduce a crash, it won't be easy to ignore. Could allow for
re-using the environment across tests to further improve performance.
Remove console now that we have a working console api.
* Update workflows, add summary
Remove --safe option from WPT workflows (it's no longer valid)
Include a total test/case summary when --summary or --text (default) is used.
* remove wpt --safe flag from Makefile
* handle tests in the root of the test folder
* Fix a couple possible segfaults base on strange usage (WPT stuff)
* generate proper JSON
* generate proper JSON (for real this time?)
* fix tag type check
2025-05-03 07:53:02 +08:00
Karl Seguin
ddd0a42b26
add crypto web api
2025-05-03 07:52:12 +08:00
Pierre Tachoire
f884627927
cdp: sent setchildnodes once per node
2025-05-02 22:10:26 +02:00
Pierre Tachoire
9373cf9cf6
cdp: refacto sendChildNodes
2025-05-02 21:55:14 +02:00
Pierre Tachoire
f04030904e
cdp: fix tests for setchildnodes
2025-05-02 15:55:49 +02:00
Pierre Tachoire
271b2a0417
Merge pull request #591 from lightpanda-io/element_matches
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / 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
add Element.matches web api
2025-05-02 11:57:55 +02:00
Karl Seguin
a4f7393fc8
Merge pull request #590 from lightpanda-io/zig_fmt
...
zig fmt
2025-05-02 16:40:24 +08:00
Karl Seguin
8f851beda1
add Element.matches web api
2025-05-02 16:30:49 +08:00
Karl Seguin
4489efa8d9
zig fmt
2025-05-02 16:03:13 +08:00
Pierre Tachoire
8b9084cb73
cdp: dispatch the correct dom hierarchy wit setChildNodes
2025-05-01 19:42:04 +02:00
Pierre Tachoire
1146453dc2
cdp: add session to setChildNodes event
2025-05-01 16:51:02 +02:00
Pierre Tachoire
bd54395948
Merge pull request #588 from lightpanda-io/custom_events
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / 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
Add CustomEvent api
2025-05-01 16:29:57 +02:00
Karl Seguin
89ac27ba97
Add CustomEvent api
2025-05-01 19:33:22 +08:00
Karl Seguin
74eaee53a4
Merge pull request #585 from lightpanda-io/union_params
...
Support union parameters
2025-05-01 19:20:21 +08:00
Karl Seguin
20e4261aa7
Support union parameters
...
There's ambiguity in mapping due to the flexible nature of JavaScript. Hopefully
most types are unambiguous, like a string or am *parser.Node.
We need to "probe" each field to see if it's a possible candidate for the JS
value. On a perfect match, we stop probing and set the appropriate union field.
There are 2 levels of possible matches: candidate and coerce. A "candidate"
match has higher precedence. This is necessary because, in JavaScript, a lot
of things can be coerced to a lot of other, seemingly wrong, things.
For example, say we have this union:
a: i32,
b: bool,
Field `a` is a perfect match for the value 123. And field b is a coerce match
(because, yes, 123 can be coerced to a boolean). So we map it to `a`.
Field `a` is a candidate match for the value 34.2, because float -> int are both
"Numbers" in JavaScript. And field b is a coerce match. So we map it to `a`.
Both field `a` and field `b` are coerce matches for "hello". So we map it to `a`
because it's declared first (this relies on how Zig currently works, but I don't
think the ordering of type declarations is guaranteed, so that's an issue).
2025-05-01 18:31:55 +08:00
Pierre Tachoire
312189fbde
Merge pull request #586 from lightpanda-io/cancel_via_lookup
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / 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
Change the Linux cancel implementation to match MacOS'
2025-05-01 10:18:35 +02:00
Karl Seguin
d05063ec61
Merge pull request #579 from lightpanda-io/console
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / 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 console web api
2025-05-01 09:50:37 +08:00
Karl Seguin
47c14db54c
Merge pull request #577 from lightpanda-io/unified_intrusive_events
...
Unify the Zig and JS events using an intrusive node.
2025-05-01 09:50:19 +08:00
Karl Seguin
f0e0650244
Merge pull request #568 from lightpanda-io/notifications
...
Introduce more general notification capabilities
2025-05-01 09:50:06 +08:00
Pierre Tachoire
d2a68e62e9
cdp: add attributes to the node's writer
2025-04-30 15:56:06 +02:00
Pierre Tachoire
09fbbc1e17
netsurf: node's attributes can be null
2025-04-30 15:55:34 +02:00
Karl Seguin
8971822247
Change the Linux cancel implementation to match MacOS'
...
cancel on linux was a "real" cancel, but the implementation was unsafe. It took
whatever `id` it was given and @ptrFromInt'd it. This is problematic since the
`id` is user-supplied with virtually no validation.
Using the existing MacOS canceled lookup seems both easier and safer than trying
to validate the cancellation id.
2025-04-30 21:41:52 +08:00
Karl Seguin
1f0d1920bf
Merge branch 'main' into unified_intrusive_events
2025-04-30 21:32:34 +08:00
Karl Seguin
cb7c8502b0
add console web api
2025-04-30 20:50:31 +08:00
Karl Seguin
27d1f79839
Merge pull request #583 from lightpanda-io/share-state-and-global-with-the-isolated
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / 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
Share underlying DOM global Window with the isolated World
2025-04-30 19:55:14 +08:00
sjorsdonkers
83ef21e699
page handlescope clarification
2025-04-30 12:01:56 +02:00
Karl Seguin
6c592669da
Introduce more general notification capabilities
...
Replaces the existing, very specialized Notification with something more
general.
Currently, the existing page_navigate and page_navigated have been migrated.
Telemetry's page navigation event now also hooks into these events to generate
the telemetry record.
2025-04-30 17:33:51 +08:00
Pierre Tachoire
88f7687646
cdp: dispatch DOM.setChildNodes on performSearch
2025-04-30 09:19:59 +02:00
Pierre Tachoire
f12a527ae3
cdp: add ParentId to Node.Writer
2025-04-30 09:01:56 +02:00
sjorsdonkers
7dde0be043
share sessionstate and underlying DOM global with the isolated
2025-04-29 23:17:39 +02:00
Pierre Tachoire
2910f4f527
Merge pull request #581 from lightpanda-io/svgelement_dummy2
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / 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
Svgelement dummy2
2025-04-29 18:50:16 +02:00
Pierre Tachoire
93c0df33c2
Merge pull request #578 from lightpanda-io/scope_tightening
...
Reorganize v8 contexts and scope
2025-04-29 18:46:31 +02:00
sjorsdonkers
7d9f6eef27
instanceof svgelement test
2025-04-29 18:11:47 +02:00
sjorsdonkers
7d742d62b8
SVGElement dummy
2025-04-29 18:11:47 +02:00
sjorsdonkers
4db80cb9e7
Adopt state into the isolated world
2025-04-29 18:10:55 +02:00
Pierre Tachoire
addfbcb68f
Merge pull request #582 from lightpanda-io/remove_main_shell
...
Remove unused main_shell
2025-04-29 17:31:42 +02:00
sjorsdonkers
fac46d9d0b
Redo resolveNode
2025-04-29 16:56:50 +02:00
sjorsdonkers
e38ff08de2
Remove unused main_shell
2025-04-29 14:43:14 +02:00
sjorsdonkers
c31e2d91dd
Remove global scope
2025-04-29 11:59:14 +02:00
Karl Seguin
7309fec51d
Fully fake contextCreated
...
emit contextCreated when it's needed, not when it actually happens.
I thought we could make this sync-up, but we'd need to create 3 contexts to
satisfy both puppeteer and chromedp. So rather than having it partially
driven by notifications from Browser, I rather just fake it all for now.
2025-04-29 13:29:42 +08:00
Karl Seguin
2e01fa738a
Make undefined->null safer, and apply the same trick to BrowserContext
2025-04-29 11:28:43 +08:00
Karl Seguin
9044925f32
emit context created on createTarget event for chromedp
2025-04-29 10:58:23 +08:00
Karl Seguin
2d5ff8252c
Reorganize v8 contexts and scope
...
- Pages within the same session have proper isolation
- they have their own window
- they have their own SessionState
- they have their own v8.Context
- Move inspector to CDP browser context
- Browser now knows nothing about the inspector
- Use notification to emit a context-created message
- This is still a bit hacky, but again, it decouples browser from CDP
2025-04-29 10:22:08 +08:00
Karl Seguin
072110481f
Unify the Zig and JS events using an intrusive node.
...
The approach borrows heavily from Zig's new LinkedList API.
The main benefit is that it unifies how event callbacks are done. When the
Page.windowClick event was added, the Event structure was changed to a union,
supporting a distinct Zig and JS event.
This new approach more or less treats everything like a Zig event. A JS event
is just a Zig struct that has a Env.Callback which it can invoke in its handle
method.
The intrusive nature of the EventNode means that what used to be 1 or 2
allocations is now 0 or 1.
It also has the benefit of making netsurf completely unaware of Env.Callbacks.
2025-04-26 22:22:34 +08:00
Pierre Tachoire
0fb0532875
Merge pull request #562 from lightpanda-io/mutation_observer
...
e2e-test / zig build release (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / 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
Improve MutationObserver
2025-04-25 10:53:48 +02:00
Pierre Tachoire
d8dd94c679
Merge pull request #569 from lightpanda-io/make_cdp_less_generic
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / 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
Make CDP less generic.
2025-04-25 09:50:17 +02:00
Karl Seguin
f3d7736acf
Update src/browser/dom/mutation_observer.zig
...
Co-authored-by: Pierre Tachoire <pierre@lightpanda.io >
2025-04-25 15:48:46 +08:00
Pierre Tachoire
8fbf5590f8
Merge pull request #573 from lightpanda-io/typed_arrays
...
add support for mapping integer typed arrays into zig slices
2025-04-25 09:30:44 +02:00
Pierre Tachoire
b8ac93045e
Merge pull request #574 from lightpanda-io/enable_icu
...
initialize ICU
2025-04-25 09:29:34 +02:00
Karl Seguin
89fea9b4df
initialize ICU
...
This makes functions like new Intl.DateTimeFormat() not crash.
2025-04-25 13:15:38 +08:00
Karl Seguin
a3323dc8a7
add support for mapping integer typed arrays into zig slices
2025-04-25 13:01:43 +08:00
Karl Seguin
ba0505c13c
Merge pull request #571 from lightpanda-io/remove-log.zig
...
Remove log.zig
2025-04-25 08:47:30 +08:00
Karl Seguin
dd8432e8fd
Merge pull request #572 from lightpanda-io/framenavigated-order
...
cdp: dispatch Page.frameNavigated before DOM.documentUpdated
2025-04-25 08:47:07 +08:00
Pierre Tachoire
11c7f57745
cdp: dispatch Page.frameNavigated before DOM.documentUpdated
...
chromedp client expects to receive Page.frameNavigated before
DOM.documentUpdated.
2025-04-24 18:28:43 +02:00
sjorsdonkers
89a3fac316
log.zig does not appear to be used
2025-04-24 15:17:16 +02:00
Karl Seguin
b0b3e92600
remove Browser.EnvType
2025-04-24 19:48:27 +08:00
Karl Seguin
1fca035cfe
Make CDP less generic.
...
It's still generic over the client - we need to assert messages written to and
be able to send specific commands, but it's no longer generic over Browser/
Session/Page/etc..
2025-04-24 18:06:55 +08:00
Karl Seguin
4c89bb0e0a
Improve MutationObserver
...
- Fix get_removedNodes (it was returning addedNodes)
- get_removedNodes and get addedNodes now return references
- used enum for dispatching and clean up dispatching in general
- Remove MutationRecords and simply return an array
- this allows the returned records to be iterable (as they should be)
- jsruntime ZigToJs will now map a Zig array to a JS array
-Rely on default initialize of NodeList
-Batch observed records
- Callback only executed when call_depth == 0
- Fixes crashes when a MutationObserver callback mutated the nodes being
observes.
- Fixes some WPT issues, but Netsurf's mutationEventRelatedNode does not
appear to be to spec, so most tests fail.
- Allow zig methods to execute arbitrary code when call_depth == 0
- This is a preview of how I hope to make XHR not crash if the CDP session
ends while there's still network activity
2025-04-24 17:40:37 +08:00
Pierre Tachoire
332508f563
Merge pull request #567 from lightpanda-io/kind_before_deinit
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / 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
access the executor kind before it becomes invalid
2025-04-24 10:43:37 +02:00
Karl Seguin
158d11e93c
access the executor kind before it becomes invalid
2025-04-24 16:36:04 +08:00
Pierre Tachoire
18a49601a0
Merge pull request #566 from lightpanda-io/null_prefix_namespace
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / 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
pass null namespace/prefix to libdom
2025-04-24 09:27:03 +02:00
Karl Seguin
b971b4754f
update libdom to latest version, fixing null ptr usage and stack overflow
2025-04-24 15:18:22 +08:00
Pierre Tachoire
cfef22257e
Merge pull request #560 from lightpanda-io/remove_arena_frees
...
Remove unnecessary cleanup when we know we have an arena
2025-04-24 09:04:46 +02:00
Karl Seguin
3153d8ee8c
pass null namespace/prefix to libdom
2025-04-24 11:52:01 +08:00
sjorsdonkers
b2a975fe4a
remove executionContextCreated
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / 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
2025-04-23 17:00:22 +02:00
sjorsdonkers
b2ba505954
Check if it works with v8 97bcfb6
2025-04-23 17:00:22 +02:00
sjorsdonkers
a1b673175a
errdefer in the right scope
2025-04-23 17:00:22 +02:00
sjorsdonkers
d666de07a7
test scaffolding
2025-04-23 17:00:22 +02:00
sjorsdonkers
64508cec61
Executor World kind
2025-04-23 17:00:22 +02:00
sjorsdonkers
e0bcb625c2
browsercontext arena
2025-04-23 17:00:22 +02:00
sjorsdonkers
9534e765e5
refix page.contextCreated
2025-04-23 17:00:22 +02:00
sjorsdonkers
39124d2878
text fix
2025-04-23 17:00:22 +02:00
sjorsdonkers
9ae4d66194
page cleanup
2025-04-23 17:00:22 +02:00
sjorsdonkers
09850d7500
Fix executor used in resolveNode
2025-04-23 17:00:22 +02:00
sjorsdonkers
8897d9179c
isolated world
2025-04-23 17:00:22 +02:00
Karl Seguin
2d1b9d64bd
Remove unnecessary cleanup when we know we have an arena
...
Change a few old alloc+memcpy to dupe
Some other smaller cleanups.
2025-04-23 17:52:13 +08:00
Pierre Tachoire
e603a1707c
Merge pull request #559 from lightpanda-io/processing_instruction_clone
...
Manually "clone" processing_instruction
2025-04-23 09:51:33 +02:00
Pierre Tachoire
6b1e7a1c5d
Merge pull request #558 from lightpanda-io/node_is_equal
...
Implement custom isEqualNode
2025-04-23 09:50:43 +02:00
Pierre Tachoire
5acd4b5fd4
Revert "browser: temporary ignore mime sniff"
...
This reverts commit 0b2c4679fd .
2025-04-23 09:26:10 +02:00
Pierre Tachoire
9e88adb0da
Merge pull request #557 from lightpanda-io/fix_peek
...
peek must check existing data first
2025-04-23 09:25:59 +02:00
Karl Seguin
69eaf0d338
Manually "clone" processing_instruction
...
When you clone a processing_node via the node_clone_node, or directly via the
processing_node copy, you end up in _dom_pi_copy:
da8b967905/src/core/pi.c (L104)
For whatever, reason, the node created here gets a vtable that doesn't seem
compatible with how we cast vtables in netsurf.zig. For now, a simple fix is
to create a new new and copy the attributes over.
Fixes https://github.com/lightpanda-io/browser/issues/123 and a WPT crash.
2025-04-23 13:31:05 +08:00
Karl Seguin
680de2dca1
Implement custom isEqualNode
...
Netsurf's dom_node_is_equal appears to be both unsafe and incorrect. It's unsafe
because various node types don't have the dom_node_get_attributes implementation
so they default to setting the node attributes to null:
https://github.com/lightpanda-io/libdom/blob/master/src/core/node.c#L658
However, it doesn't do a NULL check when comparing them, so it crashes:
da8b967905/src/core/namednodemap.c (L312)
Furthermore, specific nodes need to be compared using specific attributes/values.
This PR fixes a WPT crash.
2025-04-23 09:59:57 +08:00
Karl Seguin
837188f8d1
peek must check existing data first
2025-04-23 08:28:20 +08:00
Pierre Tachoire
4a696b4053
Merge pull request #556 from lightpanda-io/mime-sniff-skip
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / 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
browser: temporary ignore mime sniff
2025-04-22 18:55:57 +02:00
Pierre Tachoire
0b2c4679fd
browser: temporary ignore mime sniff
2025-04-22 18:47:52 +02:00
Pierre Tachoire
5a08c92d02
Merge pull request #553 from lightpanda-io/mime_sniffing
...
Try to sniff the mime type based on the body content
2025-04-22 17:25:29 +02:00
Pierre Tachoire
faf93441f6
Merge pull request #555 from lightpanda-io/wpt_filter_non_tests
...
Don't [try] to run non-tests
2025-04-22 17:00:19 +02:00
Karl Seguin
8aa3608a3c
Don't [try] to run non-tests
...
Currently, we treat every .html file in tests/wpt as-if it's a test. That
isn't always the case. wpt has a manifest tool to generate a manifest (in
JSON) of the tests, we should probably use that (but it's quite large).
This PR filters out two groups. First, everything in resources/ appears to
be things to _run_ the tests, not actual tests.
Second, any file without a "testharness.js" doesn't appear to be a test
either. Note that WPT's own manifest generator looks at this:
43a0615361/tools/manifest/sourcefile.py (L676)
(which is used later in the file to determine the type of file).
2025-04-22 21:05:12 +08:00
Pierre Tachoire
9727a9d000
Merge pull request #547 from lightpanda-io/jsruntime_arenas
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / 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
Re-introduce call_arena
2025-04-22 13:58:16 +02:00
Pierre Tachoire
1b74289c43
Merge pull request #543 from lightpanda-io/describeNode2
...
descibeNode for new js runtime
2025-04-22 13:57:18 +02:00
sjorsdonkers
a698ff8309
describeNode feedback
2025-04-22 13:49:01 +02:00
sjorsdonkers
5026c48805
Update zig-v8 to v0.1.18
2025-04-22 13:49:00 +02:00
sjorsdonkers
2ac63b6985
describeNode
2025-04-22 13:49:00 +02:00
Karl Seguin
114e11f52a
Partially revert some changes.
...
The call_arena is still re-added, and the call_depth is still used, but
the call_arena and scope_arenas are no longer part of the Env - they remain on
the Executor.
This is to accommodate upcoming changes where multiple executors will exist at
once. While the shared allocators _might_ have been safe in some cases, the
performance gains don't justify the risk of having 2 executors interacting in a
way where sharing the allocators would cause issues.
2025-04-22 16:56:26 +08:00
Karl Seguin
3277d1baac
Re-introduce call_arena
...
Because of callbacks, calls into Zig can be nested. Previously, the call_arena
was reset after _every_ call. When calls are nested, this doesn't work - the
nested call resets the arena, which the caller might still need. A `call_depth`
integer was added to the Executor. Each call starts by incrementing the
call_depth and, on deinit, decrements the call_depth. The call_arena is only
reset when the call_depth == 0. This could result in lower memory use.
Also promoted the call_arena and scope_arena to the Env. Practically speaking,
nothing has changed, since they're still reset under the exact same conditions.
However, when an executor ends and a new one is started, it can now reuse the
retained_capacity of the previous arenas. This should result in fewer
allocations.
2025-04-22 15:20:37 +08:00
Pierre Tachoire
f3d8ec040c
Merge pull request #549 from lightpanda-io/type_error_on_non_zig_values
...
Return TypeError if trying to turn an unknown v8.Object into a toa
2025-04-22 09:14:03 +02:00
Pierre Tachoire
0a29e9b3cf
Merge pull request #548 from lightpanda-io/namednodemap_indexed_get
...
add indexed_get to namednodemap
2025-04-22 09:13:05 +02:00
Pierre Tachoire
4b7c17ac03
Merge pull request #546 from lightpanda-io/jsruntime_js_to_null_terminated_string
...
Support binding JS strings to [:0]const u8
2025-04-22 09:11:36 +02:00
Pierre Tachoire
1849f4c11d
Merge pull request #544 from lightpanda-io/token_list_iterators
...
Add missing TokenList APIs
2025-04-22 09:03:19 +02:00
Karl Seguin
b9f61466ba
Try to sniff the mime type based on the body content
...
Synchronous body reader now exposes a peek() function to get the first few bytes
from the response body. This will be no less than 100 bytes (assuming the body
is that big), but could be more. Streaming API, via res.next() continues to work
as-is even if peek() is called.
Introduce Mime.sniff() that detects a few common types - the ones that we care
about right now - from the body content.
2025-04-22 10:58:26 +08:00
Karl Seguin
d8fa9b8c4f
Return TypeError if trying to turn an unknown v8.Object into a toa
2025-04-20 12:47:28 +08:00
Karl Seguin
42bc80e5b5
add indexed_get to namednodemap
2025-04-19 21:28:16 +08:00
Karl Seguin
9f7446ba56
use allocSentinel (which i didn't know about)
2025-04-19 17:25:01 +08:00
Karl Seguin
7bdea1befa
Support binding JS strings to [:0]const u8
...
Some APIs need a null-terminated string. Currently, they have to ask for a
`[]const u8` and then convert it to a `[:0]const u8`. This is 2 allocations: 1
for jsruntime to get the `[]const u8` from v8, and then one to get the [:0]. By
supporting `[:0]const u8` directly, this is now a single allocation.
2025-04-19 16:19:46 +08:00
Pierre Tachoire
66ec087416
Merge pull request #516 from karlseguin/javascript_anchor_click
...
e2e-test / zig build release (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / 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
Add zig listener support to netsurf event handler
2025-04-18 15:17:37 +02:00
Karl Seguin
9b4d1d442e
Allow this argument to TokenList forEach
...
JsObject can now be used as a normal parameter. It'll receive the opaque value.
This is largely useful when a Zig function takes an argument which it needs
to pass back into a callback.
JsThis is now a thin wrapper around JsObject for functions that was the JsObject
of the receiver. This is for advanced usage where the Zig function wants to
manipulate the v8.Object that represents the zig value. postAttach is an example
of such usage.
2025-04-18 20:38:52 +08:00
sjorsdonkers
16a30fa3b7
enum as subtype
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / 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
2025-04-18 13:46:54 +02:00
sjorsdonkers
1cd3ebfc3f
remove tnames
2025-04-18 13:46:54 +02:00
sjorsdonkers
fd170df98f
node subtypes
2025-04-18 13:46:54 +02:00
Karl Seguin
a2291b0713
Add missing TokenList APIs
...
Add value setter, keys(), values(), entries() and forEach().
Like nodelist, forEach still doesn't support `this` arg (gotta think about
how to do this).
I think these iterable methods are missing in a few places, so I added a
generic Entries iterator and a generic Iterable.
jsruntime will now map a Zig tuple to a JS array.
2025-04-18 19:10:37 +08:00
Karl Seguin
3134ff81f4
JS clicks and MouseInput clicks trigger page navigation
2025-04-18 16:24:04 +08:00
Karl Seguin
072bc514f4
Add zig listener support to netsurf event handler
...
Add _click handler to HTMLElement
Register zig click listener on document.
Largely waiting on https://github.com/lightpanda-io/browser/pull/501/files to
finalize the placeholders.
2025-04-18 16:20:46 +08:00
Pierre Tachoire
581a79f3fc
Merge pull request #540 from lightpanda-io/make-e2e
...
make: add end2end target
2025-04-18 09:49:08 +02:00
Pierre Tachoire
cccb8e9645
Merge pull request #538 from lightpanda-io/node_class_attributes
...
Add Node.$NODE_TYPE class attributes
2025-04-18 09:48:11 +02:00
Pierre Tachoire
646fcafa62
Merge pull request #541 from lightpanda-io/subtype_fix
...
Change TypeLookup values from simple index (usize) to a TypeMeta
2025-04-18 09:47:09 +02:00
Karl Seguin
615453a687
Change TypeLookup values from simple index (usize) to a TypeMeta
...
TypeMeta constains the index and the subtype. This allows retrieving the subtype
based on the actual value being bound, as opposed to the struct type. (I.e. it
returns the correct subtype when a Zig class is a proxy for another using the
Self declaration).
Internally store the subtype as an enum. Reduces @sizeOf(TaggedAnyOpaque) from
32 to 16.
Finally, sub_type renamed to subtype for consistency with v8.
2025-04-18 09:56:08 +08:00
Karl Seguin
361a1a21ac
zig fmt :|
2025-04-18 00:10:40 +08:00
Karl Seguin
e3e3311dd0
add deprecated node types (both Chrome and FF have them)
2025-04-18 00:10:03 +08:00
Pierre Tachoire
74fa9a6b2b
ci: use the demo go runner
2025-04-17 17:57:19 +02:00
Pierre Tachoire
b62faef520
make: add end2end target
2025-04-17 17:41:29 +02:00
Karl Seguin
74391d59a5
Add Node.$NODE_TYPE class attributes
2025-04-17 21:41:28 +08:00
Pierre Tachoire
1c08b3e5e4
Merge pull request #534 from lightpanda-io/mutable_response_header_value
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / 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
Make HTTP Response header values mutable
2025-04-17 13:10:33 +02:00
Pierre Tachoire
8c489c2131
Merge pull request #506 from lightpanda-io/jsruntime
...
replace zig-js-runtime
2025-04-17 13:09:44 +02:00
Pierre Tachoire
19976939b7
readme: fix build-v8 target
2025-04-17 13:01:01 +02:00
Karl Seguin
4e1659b98d
Disable the call arena (for now)
...
The call arena doesn't consider nested calls (like, from callbacks). Currently
when a "call" ends, the arena is cleared. But in a callback, if we do that,
the memory for the containing code is no longer valid, even though it's still
executing.
For now, use the existing scope_arena, instead of the call_arena. In the future
we need to track the call-depth, and only reset the call_arena when we're done
with a top-level statement.
Also:
-Properly handle callback errors
-Increase wpt file size
-Merge latest loop.zig from zig-js-runtime.
2025-04-17 18:38:47 +08:00
Pierre Tachoire
26ef8deca5
Merge pull request #535 from lightpanda-io/wsl-support-note
...
WSL support note
2025-04-17 11:01:09 +02:00
Karl Seguin
4e5fe5ae1a
Merge pull request #536 from lightpanda-io/jsruntime-imp
...
test: re-introduce js source name
2025-04-17 16:18:48 +08:00
Pierre Tachoire
7f308f59b4
test: re-introduce js source name
...
Having a js source name is useful to detect where the error comes from.
Using `null` generates messages with `<anonymous>` source name.
eg. `ReferenceError: report is not defined\n at <anonymous>:1:1`
vs. `ReferenceError: report is not defined\n at teststatus:1:1`
2025-04-17 10:08:13 +02:00
Karl Seguin
f4e8bb6c66
Re-introduce postAttach
...
index_get seems to be ~1000x slower than setting the value directly on the
v8.Object. There's a lot of information on "v8 fast properties", and values
set directly on objects seem to be heavily optimized. Still, I can't imagine
indexed properties are always _that_ slow, so I must be doing something wrong.
Still, for now, this brings back the original functionality / behavior / perf.
Introduce the ability for Zig functions to take a Env.JsObject parameter. While
this isn't currently being used, it aligns with bringing back the postAttach /
JSObject functionality in main.
Moved function *State to the end of the function list (making it consistent with
getters and setters). The optional Env.JsObject parameter comes after the
optional state.
Removed some uncessary arena deinits from a few webapis.
2025-04-17 09:26:37 +08:00
Karl Seguin
e3638053d0
better error messages in WPT report (in line with what main branch is doing)
2025-04-16 19:34:36 +08:00
Karl Seguin
d688d8812d
add missing try/catch around loop wait for wpt tests
2025-04-16 19:20:35 +08:00
Karl Seguin
4a6bf38666
ResponseHeader.get should return mutable slice
2025-04-16 16:54:28 +08:00
Sjors
f532b62913
missing space
2025-04-16 10:41:20 +02:00
sjorsdonkers
0080c8457f
WSL support note
2025-04-16 10:05:52 +02:00
Karl Seguin
613904e3a4
Make HTTP Response header values mutable
...
The HTTP response values _are_ mutable, but because we're using std.http.Header
the type is a `[]const u8`. This introduce a custom `Header` type where the
value is `[]u8`.
The goal is largely to allow more efficient value-comparison, by allowing
calling code to lower-case in-place. I specifically have the Mime parser in
mind:
25dcae7648/src/browser/mime.zig (L134)
2025-04-16 14:05:21 +08:00
Karl Seguin
753a093689
zig fmt :|
2025-04-15 21:16:20 +08:00
Karl Seguin
ea6f8ce4d9
Add more tests
...
Remove index and named setters, since they aren't working, and they aren't
currently needed.
2025-04-15 20:37:59 +08:00
Karl Seguin
180359e148
zig build test --json to get duration/memory stats
2025-04-15 18:49:39 +08:00
Karl Seguin
5816443ad3
improve XHR test reliability
2025-04-15 18:24:43 +08:00
Karl Seguin
e9fce9223e
add some debug lines to see if we can fix the github action
2025-04-15 15:42:55 +08:00
Karl Seguin
f6c43eaf9c
Fix dockerfile (hopefully)
...
Add dummy --json stats output to tests
Comment typos fixed
Add make get-v8, build-v8 and build-v8-dev make targets
2025-04-15 15:18:06 +08:00
Karl Seguin
8af71be551
Import some of the zig-js-runtime env tests
...
- Fix passing nothing into variadic (i.e. slice) parameter
- Optimize @sizeOf(T) == 0 types by avoiding uncessary allocations
(something zig-js-runtime is doing)
2025-04-15 15:18:06 +08:00
Karl Seguin
9e36702eb2
Improve documentation
...
Remove Env from caller, and don't store Env in isolate. We don't need it, we
can execute all runtime code from the Executor (which we store a pointer to
in the v8.Context)
2025-04-15 15:18:06 +08:00
Karl Seguin
cda6f89dba
work on fixing github workflows
2025-04-15 15:18:06 +08:00
Karl Seguin
b8d7744563
replace zig-js-runtime
2025-04-15 15:18:04 +08:00
Karl Seguin
25dcae7648
Merge pull request #529 from lightpanda-io/document-cookie
...
e2e-test / zig build release (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / 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
Document cookie
2025-04-11 23:34:44 +08:00
Pierre Tachoire
ee6382ef03
dom: use cookie jar's allocator to parse cookie
2025-04-11 16:23:03 +02:00
Pierre Tachoire
0310192660
dom: assume we are using an arena for cookie
2025-04-11 14:27:08 +02:00
Pierre Tachoire
c88bc65379
cookie: use a ; w/o space for cookie separator in requests
2025-04-11 12:40:16 +02:00
Pierre Tachoire
37340dc549
dom: implement document.cookie
2025-04-11 12:19:11 +02:00
Pierre Tachoire
9b6764a852
Merge pull request #527 from lightpanda-io/update-cla
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / 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 bornlex to cla whitelist
2025-04-11 11:14:46 +02:00
Pierre Tachoire
b176857b8d
add bornlex to cla whitelist
2025-04-11 11:14:01 +02:00
Pierre Tachoire
f034065247
Merge pull request #520 from lightpanda-io/navigate_notifications
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / 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
Communicate page navigation state via notifications
2025-04-10 13:42:30 +02:00
Karl Seguin
64bd4dee38
Merge pull request #523 from lightpanda-io/url-about-blank
...
url: accept about:blank
2025-04-10 19:15:04 +08:00
Pierre Tachoire
22307239ae
url: accept about:blank
2025-04-10 13:00:14 +02:00
Karl Seguin
3fc7ffadbf
rename ts => timestamp, ctx => notify_ctx
2025-04-10 18:27:14 +08:00
Pierre Tachoire
b87a80a32d
Merge pull request #521 from lightpanda-io/remove_wpt_env_wait
...
Remove the WPT js_env.wait() on error.
2025-04-10 11:40:33 +02:00
Karl Seguin
c775de260a
Remove the WPT js_env.wait() on error.
...
40c0c7d421
Makes it unecessary as wait is now always called on deinit.
2025-04-10 16:30:44 +08:00
Karl Seguin
30fd358286
improve playwright pafe lifecycle message compatibility
2025-04-10 16:07:31 +08:00
Karl Seguin
71c3d484a9
Communicate page navigation state via notifications
...
In order to support click handling on anchors from JavaScript, we need some hook
from the page/session to the CDP instance. This first phase adds notifications
in page.navigate, as well as a primitive notification hook to the session.
CDP's existing Page.navigate uses this new notifiation system.
2025-04-10 14:25:19 +08:00
Pierre Tachoire
66bac32e33
Merge pull request #519 from lightpanda-io/url
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / 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
Add URL struct
2025-04-09 16:43:44 +02:00
Pierre Tachoire
4f0ea888ef
Merge pull request #513 from lightpanda-io/resolveNode
...
Resolve node
2025-04-09 15:00:35 +02:00
Pierre Tachoire
bc1a83d04a
Update src/cdp/domains/dom.zig
2025-04-09 14:46:53 +02:00
sjorsdonkers
32d9fc0d32
Pass objectGroup as groupName
2025-04-09 13:40:00 +02:00
Karl Seguin
41bd3704ef
update lightpanda and wpt URL usage
2025-04-09 19:21:59 +08:00
Karl Seguin
be75b5b237
Add URL struct
...
Combine uri + rawuri into single struct.
Try to improve ownership around URIs and URI-like things.
- cookie & request can take *const std.Uri
(TODO: make them aware of the new URL struct?)
- Location (web api) should own its URL (web api URL)
- Window should own its Location
Most of these changes result in (a) a cleaner Page and (b) not having to carry
around 2 nullable objects (URI and rawuri).
2025-04-09 18:19:07 +08:00
sjorsdonkers
3a7da6665f
unittest scaffolding
2025-04-09 11:33:44 +02:00
sjorsdonkers
2f47e04de7
Use findOrAddValue for precise JsValue
2025-04-09 11:33:41 +02:00
sjorsdonkers
7dc3add5fd
reolveNode WIP
2025-04-09 11:32:23 +02:00
Pierre Tachoire
8b296534a4
Merge pull request #517 from lightpanda-io/wpt-fix
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / 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
Wpt fix
2025-04-09 08:39:18 +02:00
Karl Seguin
f9c4cefe59
Update zig-js-runtime, wait for loop on wpt error
...
Updates zig-js-runtime to latest, reverting the loop reset change. This solves
the introduced memory leak.
On WPT error, call js_env.wait() to ensure all pending events are completed.
Without this, on error, the code is likely to crash as the timeout callback
executes AFTER env.deinit() is called. This is now possible to do safely on
Mac now that cancel is pseudo-implemented.
2025-04-09 09:01:04 +08:00
Pierre Tachoire
d772eaf4a2
upgrade zig-jsruntime
2025-04-08 17:34:56 +02:00
Pierre Tachoire
27ec1a13da
wpt: add missing renderer
2025-04-08 17:34:18 +02:00
Pierre Tachoire
07e8dfa257
Merge pull request #501 from karlseguin/renderer
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / 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
Add a dumb renderer to get coordinates
2025-04-08 17:12:49 +02:00
Karl Seguin
0fbf48ab4d
actually dispatch click
2025-04-08 22:51:19 +08:00
Karl Seguin
f38a0d2d67
Remove BrowserContext URL
...
Add BrowserContext.getURL which gets the URL from the session.page.
2025-04-08 22:51:17 +08:00
Karl Seguin
b76875bf5d
use netsurf's mousevent
2025-04-08 22:43:53 +08:00
Karl Seguin
0253de80de
Add a dumb renderer to get coordinates
...
FlatRenderer positions items on a single row, giving each a height and width of
1.
Added getBoundingClientRect to the DOMelement which, when requested for the
first time, will place the item in with the renderer.
The goal here is to give elements a fixed position and to make it easy to map
x,y coordinates onto an element. This should work, at least with puppeteer,
since it first requests the boundingClientRect before issuing a click.
2025-04-08 22:43:53 +08:00
Pierre Tachoire
647575261e
Merge pull request #515 from karlseguin/html_document_subtype
...
add 'node' subtype to htmldocument
2025-04-08 15:45:40 +02:00
Pierre Tachoire
3c2b348ce5
Merge pull request #502 from lightpanda-io/cdp_node_children
...
Cdp node children
2025-04-08 15:45:16 +02:00
Karl Seguin
8aef6ca372
add 'node' subtype to htmldocument
2025-04-08 10:40:52 +08:00
Karl Seguin
0139437c3d
Wrap getDocument response in a root object
2025-04-08 10:05:32 +08:00
Pierre Tachoire
a7b91ee57d
Merge pull request #514 from lightpanda-io/js-kind
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / 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
browser: script with type text/javascript are js
2025-04-07 22:22:35 +02:00
Pierre Tachoire
ad0117e060
browser: script with type text/javascript are js
2025-04-07 22:06:39 +02:00
Pierre Tachoire
309d70c142
Merge pull request #509 from lightpanda-io/browser-no-content-type
...
browser: assume no-content type is html
2025-04-07 17:39:54 +02:00
Pierre Tachoire
c9ff59a433
Merge pull request #511 from lightpanda-io/http_chunk_reader_fix
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / 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
Don't emit incorrect empty chunk
2025-04-07 17:34:53 +02:00
Karl Seguin
ec9a1416a1
Don't emit incorrect empty chunk
...
When we only have 1 or 2 bytes missing from a chunk (i.e. the tailing \n or
\r\n), don't emit an empty chunk if we have more data available to process.
2025-04-07 22:40:02 +08:00
Pierre Tachoire
dac622fc46
browser: assume no-content type is html
2025-04-07 14:07:55 +02:00
Pierre Tachoire
92e2daf056
Merge pull request #508 from lightpanda-io/readme_iconv_install
...
add libiconv install direction
2025-04-07 12:09:39 +02:00
Karl Seguin
08e68a1cff
add libiconv install direction
2025-04-07 18:01:04 +08:00
Karl Seguin
8f4be9b76f
break when child node list fails
2025-04-07 10:40:46 +08:00
Karl Seguin
fab6ec94fa
Merge pull request #504 from lightpanda-io/redirect-url
...
e2e-test / zig build release (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / 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
browser: update urls after redirection
2025-04-04 16:06:48 +08:00
Pierre Tachoire
5cbcb901f1
browser: fix buffer url usage w/ the arena
2025-04-04 09:53:47 +02:00
Karl Seguin
4d075818f6
Lazily load nodes
...
Node registry now only tracks the node id (which we need to be consistent) and
the underlying parser.Node. All other data is loaded on-demand (i.e. when we
serialize the node). This allows us to serialize node values as they appear
when they are serialized, as opposed to when they are registered.
2025-04-04 11:24:34 +08:00
Pierre Tachoire
4302be5619
browser: update urls after redirection
2025-04-03 18:27:49 +02:00
Karl Seguin
68d1be3b94
Add children node to CDP Node representation
...
Add Node writer. Different CDP messages want different child depths. For now,
only support immediate children, but the new writer should make it easy to
support variable.
2025-04-03 21:28:57 +08:00
Karl Seguin
af68b10c5d
Better CDP node serialization
...
Include direct descendant, with hooks for other serialization options.
Don't include parentId if null.
2025-04-03 21:18:18 +08:00
Pierre Tachoire
8b16d0e7ed
Merge pull request #495 from lightpanda-io/cdp_node
...
e2e-test / zig build release (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / 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
Add CDP Node Registry
2025-04-01 17:25:25 +02:00
katie-lpd
2d5c24d8b5
Update README.md
...
Typo
2025-04-01 11:54:04 +02:00
Pierre Tachoire
0110ac62bf
Merge pull request #490 from karlseguin/cookies
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / 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
Add Cookie support to browser & xhr requests
2025-03-31 14:35:28 +02:00
Pierre Tachoire
5bfa44b1b4
Merge pull request #497 from lightpanda-io/upgrade-jsruntime
...
ci: add a browser fetch test
2025-03-31 14:17:58 +02:00
Karl Seguin
d21821a0fb
add cookie_jar to wpt script
2025-03-31 18:44:09 +08:00
Karl Seguin
84dfde2e51
add cookies to XHR requests
2025-03-31 18:44:09 +08:00
Karl Seguin
22d33fa286
Add cookie support to browser (not XHR yet) requests
2025-03-31 18:44:09 +08:00
Pierre Tachoire
f6f83e2114
upgrade zig-jsruntime
2025-03-31 12:36:23 +02:00
Pierre Tachoire
c6ad734de0
ci: run wpt classic only on PR
2025-03-31 12:35:34 +02:00
Pierre Tachoire
cf015b2ce7
main: exit 1 on memory leak detection
2025-03-31 12:35:33 +02:00
Pierre Tachoire
fbe8086c98
ci: add a browser fetch test
2025-03-31 12:35:29 +02:00
Pierre Tachoire
95cae6e7de
Merge pull request #498 from karlseguin/pool_polish
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
Accommodate zig-js-runtime loop changes
2025-03-31 12:35:09 +02:00
Pierre Tachoire
d12fd78ef0
Merge pull request #499 from karlseguin/http_req_connection_close
...
On a non websocket upgrade connection, close the connection
2025-03-31 12:25:53 +02:00
Karl Seguin
b2d9f835bf
Zig fmt
2025-03-31 15:29:54 +08:00
Karl Seguin
735772f43a
On a non websocket upgrade connection, close the connection
...
Solves slow startup time with chromedp
2025-03-31 15:26:37 +08:00
Karl Seguin
75f66a6cb2
Accommodate zig-js-runtime loop changes
2025-03-31 14:59:40 +08:00
Pierre Tachoire
24d5dfe3c6
Merge pull request #371 from lightpanda-io/ci-wpt-split
...
e2e-test / zig build release (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / perf-fmt (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
ci: split wpt wnd wpt-json jobs
2025-03-28 13:39:32 +01:00
Karl Seguin
be9e953971
Add CDP Node Registry
...
This expands on the existing CDP node work used in DOM.search. It introduces
a node registry to track all nodes returned to the client and give lookups to
get a node from a Id or a *parser.node.
Eventually, the goal is to have the Registry emit the DOM.setChildNodes event
whenever necessary, as well as support many of the missing DOM actions.
Added tests to existing search handlers. Reworked search a little bit to avoid
some unnecessary allocations and to hook it into the registry.
The generated Node is currently incomplete. The parentId is missing, the
children are missing. Also, we still need to associate the v8 ObjectId to the
node.
Finally, I moved all action handlers into a nested "domain" folder.
2025-03-28 19:00:29 +08:00
Pierre Tachoire
82e67b7550
Merge pull request #489 from lightpanda-io/microtasks
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
zig-test / zig build dev (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
run v8 micro tasks
2025-03-27 17:15:50 +01:00
Pierre Tachoire
791549fda8
Merge pull request #494 from karlseguin/insecure_disable_tls_host_verification
...
Add an `insecure_disable_tls_host_verification` command line option
2025-03-27 15:57:39 +01:00
Pierre Tachoire
c763783d53
upgrade vendor/zig-js-runtime
2025-03-27 15:49:48 +01:00
Pierre Tachoire
e347e7e5fb
browser: use loop.resetJS
2025-03-27 15:49:48 +01:00
Pierre Tachoire
3f1d0df7f9
cdp: run microtasks after send inspector
2025-03-27 15:49:48 +01:00
Pierre Tachoire
c6cb6d5eeb
Merge pull request #493 from lightpanda-io/upgrade-jsruntime
...
upgrade vendor/zig-js-runtime
2025-03-27 14:40:28 +01:00
Pierre Tachoire
57025f8173
upgrade vendor/zig-js-runtime
2025-03-27 14:28:00 +01:00
Karl Seguin
3e7f07374c
Pass HttpClient options in wpt
2025-03-27 18:18:29 +08:00
Karl Seguin
fba9cb071d
zig fmt :|
2025-03-27 18:15:27 +08:00
Karl Seguin
c6538e1038
Add an insecure_disable_tls_host_verification command line option
...
When set, this disables the host verification of all HTTP requests. Available
for both the fetch and serve mode.
Also introduced an App.Config, for future command line options which need to
be passed more deeply into the code.
2025-03-27 18:02:30 +08:00
Pierre Tachoire
3a1a582013
Merge pull request #482 from karlseguin/http_client
...
e2e-test / zig build release (push) Waiting to run
e2e-test / puppeteer-perf (push) Blocked by required conditions
e2e-test / demo-scripts (push) Blocked by required conditions
wpt / web platform tests (push) Waiting to run
wpt / perf-fmt (push) Blocked by required conditions
zig-test / zig build dev (push) Waiting to run
zig-test / zig test (push) Waiting to run
zig-test / perf-fmt (push) Blocked by required conditions
Replace zig-async-io with a custom HTTP client
2025-03-27 08:52:21 +01:00
Karl Seguin
531a484cb0
Fix a few comments
...
Switch generic http_client error level from warn to err
2025-03-27 08:11:48 +08:00
Pierre Tachoire
16c477229a
Merge pull request #491 from lightpanda-io/cla-add-sjors
...
e2e-test / zig build release (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
ci: add Sjors to the cla allow list
2025-03-25 14:49:19 +01:00
Pierre Tachoire
f2565049b8
ci: add Sjors to the cla allow list
2025-03-25 14:40:36 +01:00
Karl Seguin
afdb5d7233
reset read_pos after handshake is established
2025-03-23 20:08:12 +08:00
Karl Seguin
18be1202db
Prevent double in-flight recvs
...
Retry on test timeout for slower machines (i.e. CI build), while also reducing
wait time for faster builds.
2025-03-23 19:05:37 +08:00
Karl Seguin
14cc87e1a5
Use latest tls.zig (with new allocation-free API)
...
Add more fuzz tests around async tls.
2025-03-23 19:05:37 +08:00
Karl Seguin
2a0d1b0a48
Switch to nonblocking socket
...
Improve test server handshake performance, allowing for a few more fuzz
iterations without making tests unbearably slow.
2025-03-23 19:05:37 +08:00
Karl Seguin
22aa126b29
Cleaner merge
...
Switch to non-blocking sockets.
Fix TLS handshake/receive/send ordering
2025-03-23 19:05:35 +08:00
Karl Seguin
feb2046549
add TLS integration test for sync client
2025-03-23 19:01:40 +08:00
Karl Seguin
2f362f2aa2
handle redirects on asynchronous calls
2025-03-23 19:01:40 +08:00
Karl Seguin
de160d9170
Cleanup synchronous connection for tls and non-tls.
...
Drain response prior to redirect.
2025-03-23 19:01:40 +08:00
Karl Seguin
226c18cb56
handle redirects on synchronous calls
2025-03-23 19:01:40 +08:00
Karl Seguin
314aea4e1e
fix double dereference
2025-03-23 19:01:40 +08:00
Karl Seguin
807d3a600c
Support transfer-encoding: chunked, fix async+tls integration
2025-03-23 19:01:40 +08:00
Karl Seguin
fa8ea1ef43
use latest tls.zig
2025-03-23 19:01:40 +08:00
Karl Seguin
2017d4785b
replace zig-async-io and std.http.Client with a custom HTTP client
2025-03-23 19:01:40 +08:00
Karl Seguin
fd35724aa8
zig 0.14 fmt
2025-03-23 19:01:40 +08:00
Karl Seguin
e1a85d97e3
Zig 0.14 compatibility
2025-03-23 19:01:40 +08:00
Pierre Tachoire
b972c9fe30
Merge pull request #484 from lightpanda-io/telemetry_batch
...
e2e-test / zig build release (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
send telemetry events in batches (up to 20)
2025-03-23 11:21:56 +01:00
Pierre Tachoire
4c68150dec
Merge pull request #487 from lightpanda-io/mkdir_p_app_path
...
Use makePath to create any missing intermediate directories for app dir
2025-03-23 10:48:55 +01:00
Karl Seguin
3d6dd06b99
Generate non-persisted iid if app_path is null
2025-03-22 23:58:57 +08:00
Karl Seguin
81759fa57a
Use makePath to create any missing intermediate directories for app dir
...
https://github.com/lightpanda-io/browser/issues/486
2025-03-22 23:53:46 +08:00
Pierre Tachoire
20160cb071
Merge pull request #485 from lightpanda-io/ubuntu-22-04
...
e2e-test / zig build release (push) Waiting to run
e2e-test / puppeteer-perf (push) Blocked by required conditions
e2e-test / demo-scripts (push) Blocked by required conditions
wpt / web platform tests (push) Waiting to run
wpt / perf-fmt (push) Blocked by required conditions
zig-test / zig build dev (push) Waiting to run
zig-test / zig test (push) Waiting to run
zig-test / perf-fmt (push) Blocked by required conditions
ci: use ubuntu 22.04 for x86_64 build
2025-03-22 10:48:57 +01:00
Pierre Tachoire
8931506657
ci: use ubuntu 22.04 for x86_64 build
2025-03-22 10:40:50 +01:00
Karl Seguin
2aee346299
send telemetry events in batches (up to 20)
2025-03-21 22:40:10 +08:00
Pierre Tachoire
f89efd84d3
Merge pull request #481 from lightpanda-io/auto-attach
...
e2e-test / zig build release (push) Waiting to run
e2e-test / puppeteer-perf (push) Blocked by required conditions
e2e-test / demo-scripts (push) Blocked by required conditions
wpt / web platform tests (push) Waiting to run
wpt / perf-fmt (push) Blocked by required conditions
zig-test / zig build dev (push) Waiting to run
zig-test / zig test (push) Waiting to run
zig-test / perf-fmt (push) Blocked by required conditions
cdp: implement target.setAutoAttach and target.detachFromTarget
2025-03-21 12:14:01 +01:00
Pierre Tachoire
7607ab2c84
cdp: target: implement detach from target
2025-03-20 09:36:00 +01:00
Pierre Tachoire
fe7f6bee1c
cdp: create a cdp state for target_auto_attach
2025-03-20 09:35:59 +01:00
Pierre Tachoire
b43658eb3f
cdp: target: add test for #474
...
Can't attach to just created target
2025-03-20 09:35:59 +01:00
Pierre Tachoire
85caa09e63
Merge pull request #477 from lightpanda-io/ci-v8-version
...
e2e-test / zig build release (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
Add macos x86_64 bin to nightly build
2025-03-19 17:35:20 +01:00
Pierre Tachoire
c32853bfd6
docker: update zig-v8 version
2025-03-19 17:12:53 +01:00
Pierre Tachoire
e79cd58c8f
ci: add macos x86_64 nightly build
2025-03-19 17:12:10 +01:00
Pierre Tachoire
0d291f1a36
ci: upgrade zig v8 version
2025-03-19 17:12:05 +01:00
Pierre Tachoire
24aa8e2a07
Merge pull request #480 from lightpanda-io/zig-0.14
...
Zig 0.14
2025-03-19 17:06:57 +01:00
Pierre Tachoire
0a0c155292
upgrade vendor after zig 0.14 merge
2025-03-19 16:55:26 +01:00
Pierre Tachoire
55a942aa22
wpt: fix zig-0.14 compat
2025-03-19 16:48:22 +01:00
Karl Seguin
b51499e87b
update to latest zig-js-runtime
2025-03-19 16:28:21 +01:00
Karl Seguin
936048d478
upgrade telemetry to zig 0.14
2025-03-19 16:28:21 +01:00
Karl Seguin
bd6497743c
zig 0.14 fmt
2025-03-19 16:28:21 +01:00
Karl Seguin
6873d8d445
update tls.zig dep
2025-03-19 16:28:20 +01:00
Karl Seguin
21c9dde858
Zig 0.14 compatibility
2025-03-19 16:28:15 +01:00
Pierre Tachoire
17d3d620ff
Merge pull request #478 from lightpanda-io/global_http_client
...
e2e-test / zig build release (push) Waiting to run
e2e-test / puppeteer-perf (push) Blocked by required conditions
e2e-test / demo-scripts (push) Blocked by required conditions
wpt / web platform tests (push) Waiting to run
wpt / perf-fmt (push) Blocked by required conditions
zig-test / zig build dev (push) Waiting to run
zig-test / zig test (push) Waiting to run
zig-test / perf-fmt (push) Blocked by required conditions
Share the HTTP client globally
2025-03-19 11:31:37 +01:00
Karl Seguin
705603a088
remove explicit thread stack size.
...
The real win is having a global http_client, so the thread only needs a pointer.
2025-03-19 16:17:41 +08:00
Karl Seguin
ba8a0179d5
Share the HTTP client globally
2025-03-19 11:09:58 +08:00
Pierre Tachoire
9fe10747ce
Merge pull request #476 from karlseguin/implicit_browser_context
...
e2e-test / zig build release (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
Implicitly create BrowserContext on createTarget if one doesn't exist
2025-03-18 09:21:50 +01:00
Pierre Tachoire
4a4d9a9377
Merge pull request #446 from karlseguin/telemetry
...
Add Usage Telemetry
2025-03-18 09:10:31 +01:00
Karl Seguin
2e7342a59c
add driver field to navigate telemetry
2025-03-18 10:40:04 +08:00
Karl Seguin
c9bc5be42b
add additition navigate fields
2025-03-18 09:56:57 +08:00
Karl Seguin
b75b36dc61
zig fmt
2025-03-18 08:27:47 +08:00
Karl Seguin
1e6a1bd3af
store iid in application data directory
2025-03-18 08:27:47 +08:00
Karl Seguin
b0a2087015
fix unit test
2025-03-18 08:27:47 +08:00
Karl Seguin
a5ee34a2db
send telemetry synchronously in a background thread
2025-03-18 08:27:47 +08:00
Karl Seguin
a6a8130234
update telemetry URL (but not vendored dependency this time)
2025-03-18 08:27:34 +08:00
Karl Seguin
288761632f
Revert "update telemetry URL"
...
This reverts commit 88850bcdd38026720f03087be8ef7e9869072ac6.
2025-03-18 08:27:34 +08:00
Karl Seguin
25bf4fa738
update telemetry URL
2025-03-18 08:27:34 +08:00
Karl Seguin
3b4de6a405
remove [incorrect] data version
2025-03-18 08:27:32 +08:00
Karl Seguin
75512602c3
Add log to display telemetry state
2025-03-18 08:27:02 +08:00
Karl Seguin
cd33a089d1
flatten events, include aarch + os, remove eid
2025-03-18 08:26:58 +08:00
Karl Seguin
6b83281539
Add navigate telemetry
2025-03-18 08:25:44 +08:00
Karl Seguin
2609671982
don't try (and fail) to get userData after clearing context
2025-03-18 08:02:09 +08:00
Karl Seguin
accf2c0e5e
use async-client for telemetry
2025-03-18 08:02:09 +08:00
Karl Seguin
53f6e66c23
Remove plausible, leave a dummy provider for now
...
Add batching, add install optional id (persisted) and execution id (per run)
2025-03-18 08:02:09 +08:00
Karl Seguin
56ddcc8e29
Initial usage telemetry
2025-03-18 08:02:09 +08:00
Karl Seguin
430779979e
Implicitly create BrowserContext on createTarget if one doesn't exist
2025-03-17 20:45:57 +08:00
Pierre Tachoire
671dbcfd55
Merge pull request #470 from lightpanda-io/resove-module
...
e2e-test / zig build release (push) Waiting to run
e2e-test / puppeteer-perf (push) Blocked by required conditions
e2e-test / demo-scripts (push) Blocked by required conditions
wpt / web platform tests (push) Waiting to run
wpt / perf-fmt (push) Blocked by required conditions
zig-test / zig build dev (push) Waiting to run
zig-test / zig test (push) Waiting to run
zig-test / perf-fmt (push) Blocked by required conditions
browser: fix module URL resolution
2025-03-17 11:33:59 +01:00
Pierre Tachoire
087a7b5f3c
browser: use *const Page with fetchModule
2025-03-17 09:58:31 +01:00
Pierre Tachoire
229844d399
browser: use *const Script with evalScript
2025-03-17 09:51:01 +01:00
Pierre Tachoire
36081653b0
Merge pull request #472 from lightpanda-io/linux_aarch64
...
e2e-test / zig build release (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
ci: use ubuntu 24.04
2025-03-15 10:40:09 +01:00
Pierre Tachoire
9811c5d577
ci: use ubuntu 24.04
2025-03-15 10:24:34 +01:00
Pierre Tachoire
4394186dc3
Merge pull request #469 from lightpanda-io/linux_aarch64
...
Linux aarch64 build
2025-03-15 10:17:42 +01:00
Pierre Tachoire
725b48d8aa
ci: fix install params for linux
2025-03-15 10:01:46 +01:00
Pierre Tachoire
3fd8347943
browser: fix module URL resolution
2025-03-14 19:02:33 +01:00
Pierre Tachoire
5e7c26c34b
dockerfile: add ARCH parameter
2025-03-14 17:27:17 +01:00
Pierre Tachoire
d7019264a2
docker: upgrade ubuntu
2025-03-14 14:51:05 +01:00
Pierre Tachoire
ade9fa5d0e
ci: add linux aarch64 to the nightly build
2025-03-14 14:38:05 +01:00
Pierre Tachoire
f84c4393b9
ci: upgrade zig-v8 version
2025-03-14 14:37:38 +01:00
Pierre Tachoire
48d01c0ab5
Merge pull request #465 from lightpanda-io/inspector-cache-debug
...
e2e-test / zig build release (push) Waiting to run
e2e-test / puppeteer-perf (push) Blocked by required conditions
e2e-test / demo-scripts (push) Blocked by required conditions
wpt / web platform tests (push) Waiting to run
wpt / perf-fmt (push) Blocked by required conditions
zig-test / zig build dev (push) Waiting to run
zig-test / zig test (push) Waiting to run
zig-test / perf-fmt (push) Blocked by required conditions
don't generate debug js file on release
2025-03-14 11:52:30 +01:00
Pierre Tachoire
aca01d81d6
cdp: use .zig-cache to save js script debug files
2025-03-14 11:41:21 +01:00
Pierre Tachoire
6a0b154d67
cdp: dump runtime js only in debug mode
2025-03-14 11:41:20 +01:00
Pierre Tachoire
7ce69987d5
Merge pull request #463 from karlseguin/page_arena
...
Optimize memory usage
2025-03-14 10:17:41 +01:00
Karl Seguin
3fe28d5441
Optimize memory usage
...
The two bigger changes here are:
1- The http_client has been moved from the Session to the Browser, allowing
its connection pool to be re-used across multiple sessions
2- The browser now has a page_arena which is used for all page-level allocation
and which can be re-used between pages (currently retains 1MB of memory).
Previously, pages uses an arena that was tied to the lifetime of the page,
thus it could not be re-used.
Using the Bench allocator for zig-js-runtime, allocated bytes went from
1347037879 to 834932438 (in a RUNS=1000 of puppeteer demo).
Various other changes to try to simplify the API and remove the possibility
of invalid states. For example, session.newPage() now includes the logic for
page.start() so that there should now never be a page that wasn't started.
2025-03-12 13:38:22 +08:00
Pierre Tachoire
43f42f9ca0
Merge pull request #461 from lightpanda-io/ci-playwright
...
e2e-test / zig build release (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
ci: add e2e test w/ playwright connection
2025-03-11 10:11:08 +01:00
Pierre Tachoire
3e288f1fcf
Merge pull request #462 from lightpanda-io/upgrade-jsruntime
...
upgrade vendor/zig-js-runtime
2025-03-11 10:10:06 +01:00
Pierre Tachoire
8ccd75fdfb
upgrade vendor/zig-js-runtime
2025-03-11 09:53:33 +01:00
Pierre Tachoire
fd6aa6e54e
ci: add e2e test w/ playwright connection
2025-03-11 09:52:11 +01:00
Pierre Tachoire
4802a2ce82
Merge pull request #460 from karlseguin/playwright
...
Remove CDP FrameId
2025-03-11 08:41:39 +01:00
Karl Seguin
e3409a27e7
fix test
2025-03-11 10:51:40 +08:00
Karl Seguin
5182edce6f
Remove CDP FrameId
...
I don't know if FrameId is related to an <iframe>, and whether each Page has
1 implicit "frame". But, playwright seems to treat frameId and targetId as
interchangeable, and chrome seems to agree (at leas to some degree); chrome will
return a targetId and reuse that value for the frameId.
So the simplest solution is just to remove our concept of a frameId and use
targetId exclusively. This doesn't seem to cause any issues with puppeteer.
2025-03-11 10:37:43 +08:00
Pierre Tachoire
763d8d025e
Merge pull request #453 from lightpanda-io/loop-reset
...
e2e-test / zig build release (push) Waiting to run
e2e-test / puppeteer-perf (push) Blocked by required conditions
e2e-test / demo-scripts (push) Blocked by required conditions
wpt / web platform tests (push) Waiting to run
wpt / perf-fmt (push) Blocked by required conditions
zig-test / zig build dev (push) Waiting to run
zig-test / zig test (push) Waiting to run
zig-test / perf-fmt (push) Blocked by required conditions
nightly build / build-linux-x86_64 (push) Has been cancelled
nightly build / build-macos-aarch64 (push) Has been cancelled
Reset loop event after page stop.
2025-03-10 16:07:34 +01:00
Pierre Tachoire
a3045c9808
ci: run demo's puppeteer scripts
2025-03-10 15:59:46 +01:00
Pierre Tachoire
6b78b011b7
upgrade zig-jsruntime
2025-03-10 15:59:46 +01:00
Pierre Tachoire
bd7b84e136
loop: reset the loop after page end
2025-03-10 15:59:46 +01:00
Pierre Tachoire
2a9bab3f13
Merge pull request #450 from lightpanda-io/cdp-playwright
...
cdp: improve playwright support
2025-03-10 15:56:41 +01:00
Pierre Tachoire
6ca1e6c6dd
cdp: let the inspector return the response
...
When a command is forwarded to the inspector, it handles directly the
reponse to the message.
2025-03-10 14:57:10 +01:00
Pierre Tachoire
f3a1a6a191
cdp: add a Page.getFrameTree unit test
2025-03-10 14:57:10 +01:00
Pierre Tachoire
675932c65b
cdp: improve playwright support
...
The getTargetInfo result must return a `targetInfo` key.
Here is an example returned by Chrome:
```json
{
"id": 16,
"result": {
"targetInfo": {
"targetId": "d93a1bbc-f906-4bbb-bb4d-a2285234b091",
"type": "browser",
"title": "",
"url": "",
"attached": true,
"canAccessOpener": false
}
}
}
```
2025-03-10 14:57:05 +01:00
Pierre Tachoire
708abb0e30
Merge pull request #459 from lightpanda-io/browser_context
...
Make CDP server more authoritative with respect to IDs
2025-03-10 14:49:53 +01:00
Karl Seguin
9de84aee2e
Don't send CDP result when message is forward to inspector.
...
Rely on inspector to send the result, otherwise we'll send 2 responses to the
same message (one ourselves and one from the inspector), which Playwright does
not like.
2025-03-10 14:34:32 +01:00
Karl Seguin
adb8779d00
allow Target.getTargetInfo to be called without parameters
2025-03-10 14:34:32 +01:00
Karl Seguin
fbb0e675f5
send attach events before result
2025-03-10 14:34:32 +01:00
Karl Seguin
a3e2b5246e
Make CDP server more authoritative with respect to IDs
...
The TL;DR is that this commit enforces the use of correct IDs, introduces a
BrowserContext, and adds some CDP tests.
These are the ids we need to be aware of when talking about CDP:
- id
- browserContextId
- targetId
- sessionId
- loaderId
- frameId
The `id` is the only one that _should_ originate from the driver. It's attached
to most messages and it's how we maintain a request -> response flow: when
the server responds to a specific message, it echo's back the id from the
requested message. (As opposed to out-of-band events sent from the server which
won't have an `id`). When I say "id" from this point forward, I mean every id
except for this req->res id.
Every other id is created by the browser.
Prior to this commit, we didn't really check incoming ids from the driver. If
the driver said "attachToTarget" and included a targetId, we just assumed that
this was the current targetId. This was aided by the fact that we only used
hard-coded IDS. If _we_ only "create" a frameId of "FRAME-1", then it's tempting
to think the driver will only ever send a frameId of "FRAME-1".
The issue with this approach is that _if_ the browser and driver fall out of sync
and there's only ever 1 browserContextId, 1 sessionId and 1 frameId, it's not
impossible to imagine cases where we behave on the thing.
Imagine this flow:
- Driver asks for a new BrowserContext
- Browser says OK, your browserContextId is 1
- Driver, for whatever reason, says close browserContextId 2
- Browser says, OK, but it doesn't check the id and just closes the only
BrowserContext it knows about (which is 1)
By both re-using the same hard-coded ids, and not verifying that the ids sent
from the client correspond to the correct ids, any issues are going to be hard
to debug.
Currently LOADER_ID and FRAEM_ID are still hard-coded. Baby steps.
2025-03-10 14:34:32 +01:00
Pierre Tachoire
ccacac0597
Merge pull request #458 from karlseguin/serialized_writes
...
e2e-test / zig build release (push) Waiting to run
e2e-test / puppeteer (push) Blocked by required conditions
wpt / web platform tests (push) Waiting to run
wpt / perf-fmt (push) Blocked by required conditions
zig-test / zig build dev (push) Waiting to run
zig-test / zig test (push) Waiting to run
zig-test / perf-fmt (push) Blocked by required conditions
Serialize socket writes + consider client pending completions when sh…
2025-03-10 10:24:57 +01:00
Karl Seguin
ca230aa230
Serialize socket writes + consider client pending completions when shutting down
...
Previously, we could have multiple in-flight messages from the server to a
single client. This isn't safe and can lead to message interleaving. While
write / send are atomic, they are only atomic for the N bytes which they write,
which may not be the entire buffer. Consider this writeAll function:
```
pub fn writeAll(socket: socket_t, bytes: []const u8) !void {
var index: usize = 0;
while (index < bytes.len) {
index += try posix.write(socket, bytes[index..]);
}
}
```
If we're trying to send "abc123", this could take anywhere from 1 to 6 calls
to posix.write (it would take 6 calls, for example, if every call to
posix.write only wrote a single byte). Now if you're trying to write other data
to this same socket at the same time, messages _will_ get interleaved.
In order for this to work, the client now has a send_queue (doubly linked list).
When one message is sent, it sends the next.
In addition to the above change, the Client is now self-contained with respect
to its lifetime. This is necessary so that completions which come in AFTER our
concept of its lifetime ends, can still be processed. I think all types that
receive completions need to follow this model. This relies on the fact that
kqueue (which I know for a fact) and io_uring (which people seem to imply) handle
socket shutdown properly. It's still a bit messy because of timeout and not
wanting to wait until timeout to accept new connections, but needing to wait
until timeout to cleanup the client.
The self-contained nature of Client makes it difficult to test as a generic. I
removed Client(T). Tests now use real sockets. Some tests had to be removed
because they're too difficult to test over a real connection :(
2025-03-07 20:29:57 +08:00
Pierre Tachoire
7b775d2ad7
Merge pull request #452 from lightpanda-io/katie-lpd-patch-1
...
Update README.md
2025-03-04 17:16:34 +01:00
Pierre Tachoire
c5397bfbe2
Merge pull request #448 from karlseguin/set_cookie
...
e2e-test / zig build release (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
e2e-test / puppeteer (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
Add Set-Cookie parsing
2025-03-04 13:20:33 +01:00
Karl Seguin
9fec6ebc66
fix typo, improve comment, add 1 test case
2025-03-04 19:46:36 +08:00
Pierre Tachoire
6bc38c5782
Merge pull request #455 from lightpanda-io/upgrade-zig-azync-io
...
upgrade vendor/zig-async-io
2025-03-04 11:37:30 +01:00
Pierre Tachoire
7f9d585d7f
upgrade vendor/zig-async-io
2025-03-04 11:29:17 +01:00
Pierre Tachoire
0b14d36c95
Merge pull request #454 from lightpanda-io/upgrade-zig-jsruntime
...
upgrade vendor/zig-js-runtime
2025-03-04 11:07:26 +01:00
Pierre Tachoire
e22ca2d082
upgrade vendor/zig-js-runtime
2025-03-03 15:37:43 +01:00
katie-lpd
52a70cb7f5
Update README.md
...
A really important visual change in the readme :)
2025-03-01 19:43:28 +01:00
Karl Seguin
a00d1d068a
Cookie with SameSite=None is only valid when Secure
2025-02-27 16:47:39 +08:00
Pierre Tachoire
6ae4ed9fc3
Merge pull request #449 from karlseguin/longer_timeout
...
e2e-test / zig build release (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
e2e-test / puppeteer (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
allow longer timeouts (u8 -> u16)
2025-02-27 09:11:25 +01:00
Karl Seguin
6f5028612a
add cookie jar
2025-02-27 16:09:10 +08:00
Karl Seguin
c31c12d31a
add test for Storage shed, use map.getOrPut
2025-02-27 11:57:46 +08:00
Karl Seguin
28008d835e
allow longer timeouts (u8 -> u16)
2025-02-27 11:00:37 +08:00
Pierre Tachoire
08e99a32cb
Merge pull request #445 from karlseguin/capture_git_commit
...
e2e-test / zig build release (push) Waiting to run
e2e-test / puppeteer (push) Blocked by required conditions
wpt / web platform tests (push) Waiting to run
wpt / perf-fmt (push) Blocked by required conditions
zig-test / zig build dev (push) Waiting to run
zig-test / zig test (push) Waiting to run
zig-test / perf-fmt (push) Blocked by required conditions
Make the the short git SHA available within the program
2025-02-26 14:10:24 +01:00
Karl Seguin
68fc87bc01
Add Set-Cookie parsing
2025-02-26 21:00:43 +08:00
Karl Seguin
d0ba06c44b
Add git_commit to build and build-dev target
...
Add "version" command to cli.
2025-02-26 20:44:44 +08:00
Karl Seguin
d501cbf765
Make the the short git SHA available within the program
2025-02-26 20:44:44 +08:00
Pierre Tachoire
488c7e6c27
Merge pull request #447 from lightpanda-io/mem-regression
...
e2e-test / zig build release (push) Waiting to run
e2e-test / puppeteer (push) Blocked by required conditions
wpt / web platform tests (push) Waiting to run
wpt / perf-fmt (push) Blocked by required conditions
zig-test / zig build dev (push) Waiting to run
zig-test / zig test (push) Waiting to run
zig-test / perf-fmt (push) Blocked by required conditions
ci: increase the max memory value to detect regression
2025-02-26 11:38:54 +01:00
Pierre Tachoire
155559c2c4
ci: increase the max memory value to detect regression
2025-02-26 10:55:19 +01:00
Pierre Tachoire
a22e1bc5e5
Merge pull request #442 from karlseguin/cli_commands
...
e2e-test / zig build release (push) Waiting to run
e2e-test / puppeteer (push) Blocked by required conditions
wpt / web platform tests (push) Waiting to run
wpt / perf-fmt (push) Blocked by required conditions
zig-test / zig build dev (push) Waiting to run
zig-test / zig test (push) Waiting to run
zig-test / perf-fmt (push) Blocked by required conditions
Add explicit commands to binary
2025-02-25 09:17:45 +01:00
Karl Seguin
9519d3f7ce
use an arena for the args
2025-02-22 20:25:01 +08:00
Pierre Tachoire
3f23e07c02
Merge pull request #443 from karlseguin/logging
...
e2e-test / zig build release (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
e2e-test / puppeteer (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
Add a structured logger
2025-02-22 12:28:12 +01:00
Pierre Tachoire
6c75177edc
Merge pull request #444 from karlseguin/id
...
Add an id generator
2025-02-22 12:25:54 +01:00
Karl Seguin
85df280447
When explicit mode (serve/fetch/help) isn't given, infer it from the options
2025-02-22 13:54:05 +08:00
Karl Seguin
734cf243f6
update workflow to launch lightpanda in serve mode
2025-02-22 12:40:47 +08:00
Karl Seguin
d8f7817eeb
Add explicit commands to binary
...
./lightpanda serve --host ...
./lightpanda fetch https://...
Makes it easier to communicate / document which command has which options.
Internally added a "usage" command for displaying the usage - removing the need
for error.NoError :|
2025-02-22 12:40:47 +08:00
Karl Seguin
94b6b2636a
Add an id generator
...
Create UUID v4.
Create prefixed ids. To support more of the CDP protocol, we need to remove the
hard-coded IDs (session, browser context, frame, loader, ...) and be able to
dynamically create them, i.e. creating a new BrowserContextId when
Target.createBrowserContext is called.
var frame_id = id.Incremental(u16, "FRM"){};
frame_id.next() == "FRM-1"
frame_id.next() == "FRM-2"
Generation is allocation-free (the returned string is only valid until the
next call to next()). This is not thread safe, each CDP instance will have its
own generator (for each id it needs to generate).
The generated IDs are different than what Chrome uses, i.e.
BROWSERSESSIONID597D9875C664CAC0. I looked at various drivers and none have
any expectations beyond a string. Shorter IDs will be more efficient. Also, the
ID can cheeply be converted to and from an integer, allowing for lookups via
AutoHashMap(u16) instead of StringHashMap.
2025-02-22 09:11:40 +08:00
Karl Seguin
1036f7580f
Add a structured logger
...
In debug mode, it has a more user-friendly output:
level | the log messge | ms since last message | key=value key=value
In release mode, it logs using logfmt, which is supported by most log
ingestion frameworks.
Not being used anywhere right now, keeping this PR small with no impact on
existing code.
2025-02-22 09:10:40 +08:00
Pierre Tachoire
908febb363
Merge pull request #441 from karlseguin/cdp_tests
...
e2e-test / zig build release (push) Waiting to run
e2e-test / puppeteer (push) Blocked by required conditions
wpt / web platform tests (push) Waiting to run
wpt / perf-fmt (push) Blocked by required conditions
zig-test / zig build dev (push) Waiting to run
zig-test / zig test (push) Waiting to run
zig-test / perf-fmt (push) Blocked by required conditions
Turn CDP into a generic so that mocks can be injected for testing
2025-02-21 17:49:47 +01:00
Pierre Tachoire
aefd091b44
Merge pull request #440 from karlseguin/managed_completions
...
Ensure completions are executed on the currently connected client
2025-02-21 17:39:22 +01:00
Karl Seguin
99fb82e244
Turn CDP into a generic so that mocks can be injected for testing
...
ADD CDP testing helpers (mock Browser, Session, Page and Client). These are
placeholders until tests are added which use them.
Added a couple CDP tests.
2025-02-21 13:17:35 +08:00
Karl Seguin
756d6620cc
Ensure completions are executed on the currently connected client
...
For the time being, given that we only allow 1 client at a time, I took a
shortcut to implement this. The server has an incrementing "current_client_id"
which is part of every completion. On completion callback, we just check if
its client_id is still equal to the server's current_client_id.
2025-02-21 09:35:51 +08:00
Pierre Tachoire
09505dba09
Merge pull request #436 from lightpanda-io/ci-unittest
...
e2e-test / zig build release (push) Waiting to run
e2e-test / puppeteer (push) Blocked by required conditions
wpt / web platform tests (push) Waiting to run
wpt / perf-fmt (push) Blocked by required conditions
zig-test / zig build dev (push) Waiting to run
zig-test / zig test (push) Waiting to run
zig-test / perf-fmt (push) Blocked by required conditions
ci: add unittest execution
2025-02-20 17:45:41 +01:00
Pierre Tachoire
9401eff297
ci: add unittest execution
2025-02-20 17:10:10 +01:00
Pierre Tachoire
adbec3d272
Merge pull request #439 from karlseguin/dont_share_timeout_completion
...
Don't share or reuse timeout_completion
2025-02-20 17:09:44 +01:00
Karl Seguin
e301ba0cdb
Don't share or reuse timeout_completion
...
Results in undefined behavior when a client disconnects and another reconnects
while the timeout is being monitored:
https://github.com/lightpanda-io/browser/pull/436#issuecomment-2670455216
2025-02-20 23:56:55 +08:00
Pierre Tachoire
b12eef218a
Merge pull request #422 from karlseguin/cdp_struct
...
Refactor CDP
2025-02-20 15:26:37 +01:00
Karl Seguin
bc4560877a
zig fmt
2025-02-20 22:08:56 +08:00
Karl Seguin
521a740d3a
Merge branch 'main' into cdp_struct
2025-02-20 22:08:37 +08:00
Pierre Tachoire
be12b724cc
Merge pull request #438 from karlseguin/xhr_state_as_enum
...
Use an enum for XHR's state.
2025-02-20 14:57:37 +01:00
Pierre Tachoire
073873a3e9
Merge pull request #437 from karlseguin/make_zig_path
...
Use $(ZIG) variable when building netsurf
2025-02-20 14:56:55 +01:00
Pierre Tachoire
fcdcb50b8b
Merge pull request #426 from karlseguin/c_allocator
...
In release mode, switch from page_allocator to c_allocator
2025-02-20 14:37:54 +01:00
Karl Seguin
61a7848fd9
Use an enum for XHR's state.
2025-02-20 14:06:38 +08:00
Karl Seguin
6d6b840cf6
Use $(ZIG) variable when building netsurf
2025-02-20 08:42:45 +08:00
Karl Seguin
4dbba103d4
In release mode, switch from page_allocator to c_allocator
2025-02-20 08:09:53 +08:00
Pierre Tachoire
a2932f05f4
Merge pull request #435 from karlseguin/server_tests
...
e2e-test / zig build release (push) Waiting to run
e2e-test / puppeteer (push) Blocked by required conditions
wpt / web platform tests (push) Waiting to run
wpt / perf-fmt (push) Blocked by required conditions
zig-test / zig build dev (push) Waiting to run
zig-test / zig test (push) Waiting to run
zig-test / perf-fmt (push) Blocked by required conditions
Fix server hang on client disconnect
2025-02-19 17:45:42 +01:00
Pierre Tachoire
5d4efb7692
Merge pull request #434 from lightpanda-io/chore/readme
...
Chore: update readme images
2025-02-19 16:41:15 +01:00
Karl Seguin
39a9efb73b
Fix server hang on client disconnect
...
https://github.com/lightpanda-io/browser/issues/425
Add a few integration tests for the TCP server which are fast enough to be run
as part of the unit tests (one of the new tests covers the above issue).
2025-02-19 15:01:12 +08:00
Nicolas Rigaudiere
5037bd07d5
chore: update readme images
2025-02-18 15:43:49 +01:00
Pierre Tachoire
73a2fa3f9c
Merge pull request #428 from lightpanda-io/ci-rgression
...
e2e-test / zig build release (push) Waiting to run
e2e-test / puppeteer (push) Blocked by required conditions
wpt / web platform tests (push) Waiting to run
wpt / perf-fmt (push) Blocked by required conditions
zig-test / zig build dev (push) Waiting to run
zig-test / zig test (push) Waiting to run
zig-test / perf-fmt (push) Blocked by required conditions
ci: add puppeteer regression test
2025-02-18 15:07:17 +01:00
Pierre Tachoire
79387f469b
Merge pull request #433 from lightpanda-io/adjust-readme
...
readme: adjust image width
2025-02-18 13:57:51 +01:00
Pierre Tachoire
f986cfecff
readme: adjust image width
2025-02-18 13:51:10 +01:00
Pierre Tachoire
4d51a9123b
Merge pull request #432 from lightpanda-io/adjust-readme
...
readme: move status up
2025-02-18 13:43:24 +01:00
Pierre Tachoire
7602f15544
readme: move status up
2025-02-18 13:41:45 +01:00
Pierre Tachoire
3180ba7de9
Merge pull request #431 from lightpanda-io/adjust-readme
...
readme: update benchmark image
2025-02-18 11:55:56 +01:00
Pierre Tachoire
3e01cf19b0
readme: add benchmark details
2025-02-18 11:55:21 +01:00
Pierre Tachoire
14eebfe39e
readme: update benchmark image
2025-02-18 11:55:21 +01:00
Pierre Tachoire
9176599b29
Merge pull request #430 from lightpanda-io/adjust-readme
...
readme: fix badges
2025-02-18 11:37:52 +01:00
Pierre Tachoire
d6575faa9f
readme: fix badges
2025-02-18 11:37:08 +01:00
Pierre Tachoire
24c5bf9ff4
Merge pull request #429 from lightpanda-io/adjust-readme
...
readme: update download instructions + improve CDP example
2025-02-18 11:35:22 +01:00
Pierre Tachoire
cdcc5e106f
readme: use curl to download binary
2025-02-18 11:32:53 +01:00
Pierre Tachoire
1a8cc2d019
readme: adjust text
2025-02-18 11:32:30 +01:00
Pierre Tachoire
27e907491b
readme: remove text duplication
2025-02-18 11:25:04 +01:00
Pierre Tachoire
0a1e6623c8
readme: allow examples copy/paste
2025-02-18 11:20:56 +01:00
Pierre Tachoire
689dddd11a
readme: allow copy/paste install instruction
2025-02-18 11:19:02 +01:00
Pierre Tachoire
f8d01e1596
readme: update exemple t odump links
2025-02-18 11:15:06 +01:00
Pierre Tachoire
cd429f5935
readme: fix binary name
2025-02-18 11:06:51 +01:00
Pierre Tachoire
03355f6a4a
readme: remove useless badges
2025-02-18 11:01:52 +01:00
Pierre Tachoire
dc1d593019
ci: adjust memory regression max values
2025-02-18 10:57:36 +01:00
Pierre Tachoire
9894cceeaa
ci: extract end-to-end test on its own file
2025-02-18 10:52:08 +01:00
Pierre Tachoire
bcedbc845e
ci: add puppeteer regression test
2025-02-17 16:39:15 +01:00
Karl Seguin
f508288ce3
Fix segfault when multiple inflight Send completions fail
2025-02-17 18:43:41 +08:00
Karl Seguin
18080cef9f
fix test
2025-02-17 12:14:11 +08:00
Karl Seguin
c4eeef2a86
On CDP process error, let client decide how to close
...
Fixes issue where CDP closes the client, but client still registers a recv
operation.
2025-02-17 12:05:25 +08:00
Karl Seguin
b60a91f53c
fix memory leak
2025-02-17 11:45:19 +08:00
Karl Seguin
b1c3de6518
zig fmt
2025-02-13 17:32:01 +08:00
Karl Seguin
a43a6a299c
Merge branch 'main' into cdp_struct
2025-02-13 17:30:15 +08:00
Pierre Tachoire
d8fae5bc41
Merge pull request #408 from karlseguin/websocket_server
...
wpt / web platform tests (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig build release (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
zig-test / demo-puppeteer (push) Has been cancelled
Make TCP server websocket-aware
2025-02-13 09:04:23 +01:00
Karl Seguin
fa9b6f58e5
trying to fix submodule version
2025-02-13 09:42:26 +08:00
Karl Seguin
89ff1411e9
Fix memory leak on invalid websocket continuation frames
2025-02-13 09:34:25 +08:00
Karl Seguin
701e8277d6
support continuation frames
2025-02-13 08:51:21 +08:00
Karl Seguin
4a11f80c45
Make websocket client reader stateful
...
Move more logic into the reader. Avoid copying partial messages in
cases where we know that the buffer is large enough.
This is mostly groundwork for trying to add support for continuation
frames.
2025-02-13 08:51:21 +08:00
Karl Seguin
f1b275d5d0
Increase fuzz count. Add test for [too] large HTTP requests
2025-02-13 08:51:21 +08:00
Karl Seguin
68e0ffc95c
"fix" test compilation
2025-02-13 08:51:21 +08:00
Karl Seguin
0753eb7691
zig fmt
2025-02-13 08:51:21 +08:00
Karl Seguin
92afcd174d
remove websocket.zig dependency from build
2025-02-13 08:51:21 +08:00
Karl Seguin
94be7a0e79
Make TCP server websocket-aware
...
Adding HTTP & websocket awareness to the TCP server.
HTTP server handles `GET /json/version` and websocket upgrade requests.
Conceptually, websocket handling is the same code as before, but receiving
data will parse the websocket frames and writing data will wrap it in
a websocket frame.
The previous `Ctx` was split into a `Server` and a `Client`. This was
largely done to make it easy to write unit tests, since the `Client` is
a generic, all its dependencies (i.e. the server) can be mocked out. This
also makes it a bit nicer to know if there is or isn't a client (via the
server's client optional).
Added a MemoryPool for the Send object (I thought that was a nice touch!)
Removed MacOS hack on accept/conn completion usage.
Known issues:
- When framing an outgoing message, the entire message has to be duped. This
is no worse than how it was before, but it should be possible to eliminate
this in the future. Probably not part of this PR.
- Websocket parsing will reject continuation frames. I don't know of a single
client that will send a fragmented message (websocket has its own
message fragmentation), but we should probably still support this just in
case.
- I don't think the receive, timeout and close completions can safely be
re-used like we're doing. I believe they need to be associated with a specific
client socket.
- A new connection creates a new browser session. I think this is right (??),
but for the very first, we're throwing out a perfectly usable session. I'm
thinking this might be a change to how Browser/Sessions work.
- zig build test won't compile. This branch reproduces the issue with none
of these changes:
https://github.com/karlseguin/browser/tree/broken_test_build
(or, as a diff to main):
https://github.com/lightpanda-io/browser/compare/main...karlseguin:broken_test_build
2025-02-13 08:51:19 +08:00
Pierre Tachoire
0814daf99d
Merge pull request #421 from lightpanda-io/upgrade-tigerbeetle
...
wpt / web platform tests (push) Waiting to run
wpt / perf-fmt (push) Blocked by required conditions
zig-test / zig build dev (push) Waiting to run
zig-test / zig build release (push) Waiting to run
zig-test / zig test (push) Waiting to run
zig-test / perf-fmt (push) Blocked by required conditions
zig-test / demo-puppeteer (push) Blocked by required conditions
upgrade tigerbeetle
2025-02-12 14:46:35 +01:00
Pierre Tachoire
b2e3419bff
upgrade tigerbeetle
2025-02-12 14:37:39 +01:00
Karl Seguin
1846d0bc21
drats, zig fmt again
2025-02-12 18:32:33 +08:00
Karl Seguin
d282055e10
Merge branch 'main' into cdp_struct
2025-02-12 17:56:47 +08:00
Karl Seguin
6ab64d155b
Refactor CDP
...
CDP is now an struct which contains its own state a browser and a session.
When a client connection is made and successfully upgrades, the client creates
the CDP instance. There is now a cleaner separation betwen Server, Client and
CDP.
Removed a number of allocations, especially when writing results/events from
CDP to the client. Improved input message parsing. Tried to remove some usage
of undefined.
2025-02-12 16:47:37 +08:00
Pierre Tachoire
6ba3e57f5f
Merge pull request #404 from lightpanda-io/cdp-documentUpdated
...
wpt / web platform tests (push) Waiting to run
wpt / perf-fmt (push) Blocked by required conditions
zig-test / zig build dev (push) Waiting to run
zig-test / zig build release (push) Waiting to run
zig-test / zig test (push) Waiting to run
zig-test / perf-fmt (push) Blocked by required conditions
zig-test / demo-puppeteer (push) Blocked by required conditions
cdp: dispatch a DOM.documentUpdated event
2025-02-11 14:38:39 +01:00
Karl Seguin
14fe4f65e1
support continuation frames
2025-02-11 11:16:39 +08:00
Karl Seguin
bdb70444d6
Make websocket client reader stateful
...
Move more logic into the reader. Avoid copying partial messages in
cases where we know that the buffer is large enough.
This is mostly groundwork for trying to add support for continuation
frames.
2025-02-11 11:16:39 +08:00
Karl Seguin
4d9cc55a87
Increase fuzz count. Add test for [too] large HTTP requests
2025-02-11 11:16:39 +08:00
Karl Seguin
f41c1cbfd0
"fix" test compilation
2025-02-11 11:16:39 +08:00
Karl Seguin
72eaab68be
zig fmt
2025-02-11 11:16:39 +08:00
Karl Seguin
733c6b4c17
remove websocket.zig dependency from build
2025-02-11 11:16:39 +08:00
Karl Seguin
c0c0694fcc
Make TCP server websocket-aware
...
Adding HTTP & websocket awareness to the TCP server.
HTTP server handles `GET /json/version` and websocket upgrade requests.
Conceptually, websocket handling is the same code as before, but receiving
data will parse the websocket frames and writing data will wrap it in
a websocket frame.
The previous `Ctx` was split into a `Server` and a `Client`. This was
largely done to make it easy to write unit tests, since the `Client` is
a generic, all its dependencies (i.e. the server) can be mocked out. This
also makes it a bit nicer to know if there is or isn't a client (via the
server's client optional).
Added a MemoryPool for the Send object (I thought that was a nice touch!)
Removed MacOS hack on accept/conn completion usage.
Known issues:
- When framing an outgoing message, the entire message has to be duped. This
is no worse than how it was before, but it should be possible to eliminate
this in the future. Probably not part of this PR.
- Websocket parsing will reject continuation frames. I don't know of a single
client that will send a fragmented message (websocket has its own
message fragmentation), but we should probably still support this just in
case.
- I don't think the receive, timeout and close completions can safely be
re-used like we're doing. I believe they need to be associated with a specific
client socket.
- A new connection creates a new browser session. I think this is right (??),
but for the very first, we're throwing out a perfectly usable session. I'm
thinking this might be a change to how Browser/Sessions work.
- zig build test won't compile. This branch reproduces the issue with none
of these changes:
https://github.com/karlseguin/browser/tree/broken_test_build
(or, as a diff to main):
https://github.com/lightpanda-io/browser/compare/main...karlseguin:broken_test_build
2025-02-11 11:16:39 +08:00
Pierre Tachoire
055530c8c6
cdp: send dom node children
2025-02-10 12:19:35 +01:00
Pierre Tachoire
fb3b38aec7
cdp: implement getSearchResults and discardSearchResults
2025-02-10 09:31:10 +01:00
Pierre Tachoire
4e4a8f1bab
cdp: implement DOM.performSearch
2025-02-10 09:31:09 +01:00
Pierre Tachoire
39b3786776
cdp: ctx state has init and deinit now
2025-02-10 09:31:09 +01:00
Pierre Tachoire
8b22313ca1
netsurf: return empty string on null for node name
2025-02-10 09:31:09 +01:00
Pierre Tachoire
402f72cfa8
cdp: adjust page deinit
2025-02-10 09:31:08 +01:00
Pierre Tachoire
e7dcb8a605
cdp: introduce current page
...
avoid page struct copy
2025-02-10 09:31:08 +01:00
Pierre Tachoire
8f8a1fda85
cdp: implement DOM.getDocument
2025-02-10 09:31:08 +01:00
Pierre Tachoire
26be25c3d5
cdp: dispatch a DOM.documentUpdated event
2025-02-10 09:31:04 +01:00
Pierre Tachoire
50b53b00e0
Merge pull request #414 from karlseguin/url_query
...
wpt / web platform tests (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig build release (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
zig-test / demo-puppeteer (push) Has been cancelled
Improve memory and performance of url.Query
2025-02-10 09:30:37 +01:00
Karl Seguin
94531cb3d0
Improve memory and performance of url.Query
...
1 - Use getOrPut to avoid making 2 map lookups where possible.
2 - Use an arena allocator for Values, which makes memory management simpler.
3 - Because of #2 , we no longer need to allocate key or values which don't need
to be unescaped. The downside is that the input string has to outlive the
query.Values (but I think this is currently always the case)
4 - Optimize unescape logic & allocations
5 - Improve test coverage
2025-02-10 16:11:44 +08:00
Pierre Tachoire
842760255b
Merge pull request #413 from karlseguin/mime
...
Improve performance & compliance of MIME parsing
2025-02-10 08:59:00 +01:00
Pierre Tachoire
c78b582d71
Merge pull request #409 from karlseguin/unittest_build
...
Add a new unittest build step
2025-02-10 08:45:24 +01:00
Karl Seguin
4ab02fab1c
Fix build.
...
zig build test can pass, but zig build run won't even compile. // TODO: fix.
2025-02-10 11:18:16 +08:00
Karl Seguin
6863f3227f
Improve performance & compliance of MIME parsing
...
Common cases, text/html, text/xml and text/plain parse about 2x faster. Other
cases are about 30% faster.
Support quoted attributes, i.e. charset="utf-8" & valid escape sequences. This
potentially requires allocation, thus Mime.parse now takes an allocator.
Stricter validation around type/subtype based on RFC.
More tests.
Replace Mime.eql with isHTML(). Equality is complicated and was previously
incorrect (it was case sensitive, it should not be). Since we currently only
use isHTML-like behavior, built a (faster) method specifically for that.
2025-02-10 11:07:55 +08:00
Karl Seguin
d01d43eccb
Remove setup/teardown functionality. YAGNI
2025-02-09 13:16:27 +08:00
Karl Seguin
2aa5f4fc82
small iterator tweak
2025-02-09 11:04:21 +08:00
Karl Seguin
3af0531111
zig fmt + add U32Iterator tests
2025-02-09 11:04:21 +08:00
Karl Seguin
6e58b98b3d
Startup local HTTP server for testing
...
Change loader tests to use local HTTP server.
Add missing test scripts (i.e. storage) to unittest runs.
2025-02-09 11:04:21 +08:00
Karl Seguin
62805cdf1d
add license to file
2025-02-09 11:04:21 +08:00
Karl Seguin
4229b1d2a4
Report memory leaks when using std.testing.allocator
...
Fix leaks in storage bottle
2025-02-09 11:04:21 +08:00
Karl Seguin
2c4661a250
Add a new unittest build step
...
Preserves all existing behavior (i.e. make test and zig build test are not
changed in any way).
The new 'unittest' only runs unit tests and is fast to build. It takes ~1.7 to
build unittest, vs ~11.09 to build test. This is really the main goal, and
hopefully any unit test which are (a) fast and (b) don't impact build times
will be run here.
The test runner is based on:
https://gist.github.com/karlseguin/c6bea5b35e4e8d26af6f81c22cb5d76b
It allow filtering, i.e. `make unittest F="parse query dup"`.
'unittest' does memory leak detection when tests use std.testing.allocator.
Fixed a memory leak in url/query which was detected/reported with by the new
'unittest'.
In order to avoid having 3 src/test_xyx.zig files, I merged the existing
test_runner.zig and run_tests.zig into a single main_tests.zig. (this change
is superfluous, but I thought it was cleaner this way. Happy to revert this).
2025-02-09 11:04:21 +08:00
Pierre Tachoire
0c1a486ed9
Merge pull request #411 from karlseguin/reader_tweak
...
wpt / web platform tests (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig build release (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
zig-test / demo-puppeteer (push) Has been cancelled
Minor Reader tweaks
2025-02-08 11:33:49 +01:00
Karl Seguin
688cb55c2b
Minor Reader tweaks
...
1- Remove `parser.trim`, it was only being used in 1 place. All other places
are using `std.mem.trim(u8, X, &std.ascii.whitespace)`, so i updated MIME to
use this as well
2- Use slightly more meaningful field name, i => pos, s = data
3- Leverage std.mem.indexOfScalarPos which can be more efficient for longer
inputs (since it leverages SIMD)
2025-02-08 15:57:32 +08:00
Francis Bouvier
1594f148f8
Merge pull request #399 from karlseguin/generate
...
wpt / web platform tests (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig build release (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
zig-test / demo-puppeteer (push) Has been cancelled
Tweak generate.Tuple and generate.Union
2025-02-06 08:53:52 +01:00
Karl Seguin
fafd8c4af1
Improve format and re-add docstrings
...
Implements RP suggestions.
2025-02-06 09:57:04 +08:00
Karl Seguin
3d66758507
zig fmt
2025-02-01 15:38:08 +08:00
Karl Seguin
fc0ec860b0
Tweak generate.Tuple and generate.Union
...
Leverage comptime fields to give generated Tuple a default value, allowing
TupleT and Tuple to be merged.
Only call generate.Tuple on the final output. This eliminates redundant
deduplication, and results in a simpler API (nested types just need to expose
a natural Zig tuple).
generate.Union leverages the new Tuple and removes unused features.
2025-02-01 14:53:00 +08:00
Pierre Tachoire
00d332cd16
Merge pull request #396 from karlseguin/xmlserializer
...
wpt / web platform tests (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig build release (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
zig-test / demo-puppeteer (push) Has been cancelled
nightly build / build-linux-x86_64 (push) Has been cancelled
nightly build / build-macos-aarch64 (push) Has been cancelled
Add HTML encoding to text node and HTML attribute values
2025-01-31 12:22:52 +01:00
Pierre Tachoire
4c8c0f8738
Merge pull request #394 from lightpanda-io/xmlserializer
...
implement XMLSerializer
2025-01-31 09:09:47 +01:00
Karl Seguin
54978132bb
Add HTML encoding to text node and HTML attribute values
2025-01-31 16:01:32 +08:00
Pierre Tachoire
018abe0188
dom: implement outerHTML
2025-01-30 16:09:47 +01:00
Pierre Tachoire
b186497fb0
implement XMLSerializer
2025-01-30 16:09:47 +01:00
Pierre Tachoire
27f9963ccb
Merge pull request #391 from lightpanda-io/cdp-ctx-sessionid
...
wpt / web platform tests (push) Waiting to run
wpt / perf-fmt (push) Blocked by required conditions
zig-test / zig build dev (push) Waiting to run
zig-test / zig build release (push) Waiting to run
zig-test / zig test (push) Waiting to run
zig-test / perf-fmt (push) Blocked by required conditions
zig-test / demo-puppeteer (push) Blocked by required conditions
cdp: use an enum for SessionID
2025-01-30 14:02:47 +01:00
Pierre Tachoire
a4e3f03bf5
Merge pull request #393 from karlseguin/submodules_over_https
...
Use https:// instead of git@ for submodules
2025-01-30 14:01:43 +01:00
Pierre Tachoire
27a6be4ce0
Merge pull request #392 from karlseguin/readme_typo
...
Fix small install typo in readme
2025-01-30 08:59:39 +01:00
Karl Seguin
76a2520e56
Use https:// instead of git@ for submodules
...
Allows easily building the project, following the steps in readme, without
a github account or having some special git configuration.
2025-01-30 11:56:37 +08:00
Karl Seguin
0a472681af
Fix small install typo in readme
2025-01-30 11:50:12 +08:00
Pierre Tachoire
6d530691f3
cdp: use an enum for SessionID
2025-01-29 18:38:05 +01:00
Pierre Tachoire
a74c9e8481
Merge pull request #389 from lightpanda-io/cdp-empty-params
...
wpt / web platform tests (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig build release (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
zig-test / demo-puppeteer (push) Has been cancelled
chromedp: msg missing params or result
2025-01-28 17:11:03 +01:00
Pierre Tachoire
8aac26a331
cdp: check parameter's type on sendEvent
...
Disallow void type.
2025-01-28 16:01:47 +01:00
Pierre Tachoire
fc59a0f6ab
cdp: send empty param instead of void
...
Sending void parameters generated unmarshal errors with chromedp client.
Empty struct is required.
2025-01-28 15:46:13 +01:00
Pierre Tachoire
3fb16774b7
Merge pull request #356 from lightpanda-io/location
...
wpt / web platform tests (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig build release (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
zig-test / demo-puppeteer (push) Has been cancelled
dom: first draft for location
2025-01-27 13:16:05 +01:00
Pierre Tachoire
7b35bb4c0f
dom: improve location impl
2025-01-27 12:33:06 +01:00
Pierre Tachoire
318e2bd1c6
dom: expose document.location
2025-01-27 12:33:05 +01:00
Pierre Tachoire
09ba4bcf43
upgrade libdom
2025-01-27 12:33:04 +01:00
Pierre Tachoire
0c89fa7b1e
Merge pull request #383 from lightpanda-io/katie-lpd-patch-1
...
Update README.md
2025-01-27 10:26:42 +01:00
katie-lpd
7eedb3320d
Update README.md
2025-01-27 09:59:30 +01:00
Pierre Tachoire
cfac75ea49
Merge pull request #380 from eltociear/patch-1
...
docs: update README.md
2025-01-26 20:59:27 +01:00
Ikko Eltociear Ashimine
f00a6c396f
docs: update README.md
...
dependancies -> dependencies
dependancy -> dependency
2025-01-27 03:20:00 +09:00
Pierre Tachoire
e74a9711ca
Merge pull request #378 from spidy0x0/patch-1
...
fix typo
2025-01-25 10:34:41 +01:00
Pierre Tachoire
636d3cdf90
Merge pull request #377 from arilotter/patch-1
...
fix typo in readme
2025-01-25 10:34:16 +01:00
spidy0x0
71966affa1
fix typo
2025-01-24 19:47:12 +00:00
Ari Lotter
bf4dc195ec
fix typo in readme
2025-01-24 12:53:19 -05:00
Pierre Tachoire
dccca17e09
Merge pull request #376 from lightpanda-io/katie-lpd-patch-1
...
Update README.md
2025-01-24 12:03:09 +01:00
Pierre Tachoire
5381a4354c
add badges
2025-01-24 12:02:42 +01:00
katie-lpd
c70425fbf7
Update README.md
2025-01-24 11:53:05 +01:00
Pierre Tachoire
341f5725a4
netsurf: implement location setter/getter
2025-01-23 15:22:03 +01:00
Pierre Tachoire
d7069df80d
dom: first draft for location
2025-01-23 11:51:05 +01:00
Pierre Tachoire
579714a60b
Merge pull request #374 from lightpanda-io/reuseport-unixsocket
...
wpt / web platform tests (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig build release (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
zig-test / demo-puppeteer (push) Has been cancelled
server: REUSEPORT is not allowed on unix socket
2025-01-22 16:23:58 +01:00
Pierre Tachoire
bbdf63635a
server: REUSEPORT is not allowed on unix socket
...
see 5b0af621c3
2025-01-22 16:08:22 +01:00
Pierre Tachoire
fd7db18221
ci: split wpt and wpt-json jobs
2025-01-22 13:59:14 +01:00
Pierre Tachoire
482ed8d958
Merge pull request #370 from lightpanda-io/kernel-version
...
upgrade vendor/zig-js-runtime
2025-01-22 13:58:22 +01:00
Pierre Tachoire
673e16878d
ci: run tests on vendor changes
2025-01-22 13:48:52 +01:00
Pierre Tachoire
e11ceab029
upgrade vendor/zig-js-runtime
2025-01-22 13:46:54 +01:00
Pierre Tachoire
7fe719f43c
Merge pull request #361 from lightpanda-io/docker-updage-zig-v8
...
docker: update zig v8
2025-01-17 12:36:53 +01:00
Pierre Tachoire
3fd3ac1de1
docker: update zig v8
2025-01-17 12:30:28 +01:00
Pierre Tachoire
0e90a675af
Merge pull request #357 from katie-lpd/patch-2
...
Update README.md
2025-01-16 14:09:53 +01:00
katie-lpd
ee861c1f91
Update README.md
2025-01-16 14:06:00 +01:00
Pierre Tachoire
40c9355088
Merge pull request #355 from lightpanda-io/history
...
wpt / web platform tests (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig build release (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
zig-test / demo-puppeteer (push) Has been cancelled
dom: history placeholder
2025-01-15 11:55:50 +01:00
Pierre Tachoire
8f1557254a
typo fix
2025-01-15 11:45:30 +01:00
Pierre Tachoire
11d28b0bc3
dom: add placeholder for history interface
2025-01-15 11:45:30 +01:00
Pierre Tachoire
974cf780c0
dom: clean history file
2025-01-14 15:04:40 +01:00
Pierre Tachoire
73bb14e4a9
Merge pull request #285 from lightpanda-io/cdp-cdpcli
...
wpt / web platform tests (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig build release (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
zig-test / demo-puppeteer (push) Has been cancelled
cdp: cdpcli compatibility
2025-01-13 18:16:40 +01:00
Pierre Tachoire
daf4236023
runtime: fix sessionid
2025-01-13 18:08:09 +01:00
Pierre Tachoire
4c9a24c64e
start inspector when the js env starts
2025-01-13 10:53:38 +01:00
Pierre Tachoire
c149f65158
cdp: remove event dispateched by inspector
2025-01-13 10:53:36 +01:00
Pierre Tachoire
c5688c1bd3
cdp: display last message on cdp error
2025-01-13 10:53:35 +01:00
Pierre Tachoire
b276a15786
cdp: add target.detachFromTarget noop
2025-01-13 10:53:33 +01:00
Pierre Tachoire
2fed239ece
browser: split page start from page navigate
2025-01-13 10:53:29 +01:00
Pierre Tachoire
8e2cb36597
cdp: fix some id inconsitency accross runtime messages
2025-01-13 10:49:48 +01:00
Pierre Tachoire
bcaace1c91
cdp: use identifiable hard coded ids
2025-01-13 10:47:51 +01:00
Pierre Tachoire
d664d07141
cdp: dispatch executionContextCreated on Runtime.enable
2025-01-13 10:47:42 +01:00
Pierre Tachoire
cb8b80c856
Merge pull request #345 from lightpanda-io/modules
...
browser: support for modules
2025-01-13 10:45:31 +01:00
Pierre Tachoire
d777d77b06
ci: update sig-v8 version
2025-01-13 10:36:52 +01:00
Pierre Tachoire
43678f8dc0
upgrade zig-js-runtime
2025-01-13 10:36:34 +01:00
Pierre Tachoire
5811577824
Merge pull request #354 from lightpanda-io/navigator-fix
...
wpt / web platform tests (push) Waiting to run
wpt / perf-fmt (push) Blocked by required conditions
zig-test / zig build dev (push) Waiting to run
zig-test / zig build release (push) Waiting to run
zig-test / zig test (push) Waiting to run
zig-test / perf-fmt (push) Blocked by required conditions
zig-test / demo-puppeteer (push) Blocked by required conditions
navigator: remove useless import
2025-01-13 09:37:14 +01:00
Pierre Tachoire
1587122efa
navigator: remove useless import
2025-01-10 17:42:20 +01:00
Pierre Tachoire
48e7c8ad0f
browser: implement fetch module
2025-01-10 16:48:45 +01:00
Pierre Tachoire
766f9798f6
browser: load module
2025-01-09 11:48:39 +01:00
Pierre Tachoire
680d634725
update zig-js-runtime
2025-01-09 11:48:39 +01:00
Pierre Tachoire
7ac945bf88
browser: refacto script
2025-01-09 11:48:34 +01:00
Pierre Tachoire
188d7a8558
Merge pull request #352 from utay/fix-shell-main
...
wpt / web platform tests (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig build release (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
zig-test / demo-puppeteer (push) Has been cancelled
Fix shell main
2025-01-08 17:15:18 +01:00
Pierre Tachoire
ee561b0d1e
Merge pull request #353 from lightpanda-io/cdp-enable-security
...
Cdp enable security
2025-01-08 16:55:31 +01:00
Pierre Tachoire
82bbe78e95
cdp: return correct result on Runtime
2025-01-08 16:46:05 +01:00
Pierre Tachoire
c761cd059b
cdp: log errors on sendMessageToTarget
2025-01-08 16:17:29 +01:00
Pierre Tachoire
03e87155ca
cdp: add security.enable
2025-01-08 16:17:20 +01:00
Yannick Utard
ea39cc52b1
Fix shell main
2025-01-08 15:28:19 +01:00
Pierre Tachoire
90fb90b186
Merge pull request #351 from lightpanda-io/ignore-blank
...
wpt / web platform tests (push) Waiting to run
wpt / perf-fmt (push) Blocked by required conditions
zig-test / zig build dev (push) Waiting to run
zig-test / zig build release (push) Waiting to run
zig-test / zig test (push) Waiting to run
zig-test / perf-fmt (push) Blocked by required conditions
zig-test / demo-puppeteer (push) Blocked by required conditions
browser: ignore about:blank navigation
2025-01-08 13:54:00 +01:00
Pierre Tachoire
5f8327eaf7
browser: ignore about:blank navigation
2025-01-08 13:44:41 +01:00
Pierre Tachoire
07869f3c48
Merge pull request #350 from lightpanda-io/cdp-enable
...
Cdp enable
2025-01-08 13:42:42 +01:00
Pierre Tachoire
8377eb02a5
cdp: add CSS.enable
2025-01-08 12:01:18 +01:00
Pierre Tachoire
3738e8eb44
cdp: add DOM.enable
2025-01-08 12:01:18 +01:00
Pierre Tachoire
4b000e44b3
cdp: add Inspector.enable
2025-01-08 12:01:18 +01:00
Pierre Tachoire
d6021d1702
Merge pull request #348 from lightpanda-io/dom-navigator
...
Dom navigator
2025-01-08 11:47:44 +01:00
Pierre Tachoire
b391eafc38
wpt: update tests
2025-01-08 11:38:11 +01:00
Pierre Tachoire
2af4545e10
dom: implement more navigator API
2025-01-08 11:03:26 +01:00
Pierre Tachoire
b96644d893
dom: implement navigatorLanguage
2025-01-08 11:03:26 +01:00
Pierre Tachoire
3cb77c0a32
dom: implement navigatorID
2025-01-08 11:03:25 +01:00
Pierre Tachoire
b3f7fb7be3
dom: implement navigator.userAgent
2025-01-08 11:03:11 +01:00
Pierre Tachoire
9fb51a1f29
Merge pull request #346 from lightpanda-io/target-created
...
cdp: add TargetCreated event on createTarget message
2025-01-08 10:10:18 +01:00
Pierre Tachoire
d78e8a725d
cdp: remove useless parameter
2025-01-08 09:57:28 +01:00
Pierre Tachoire
7829bdbc95
Merge pull request #347 from lightpanda-io/send-message-to-target
...
cdp: add Target.sendMessageToTarget support
2025-01-07 16:21:41 +01:00
Pierre Tachoire
90ba6deba2
cdp: add Target.sendMessageToTarget support
...
see https://chromedevtools.github.io/devtools-protocol/tot/Target/#method-sendMessageToTarget
2025-01-07 16:00:44 +01:00
Pierre Tachoire
5fc763a738
cdp: add TargetCreated event on createTarget message
2025-01-07 10:34:47 +01:00
Pierre Tachoire
84614e903c
Merge pull request #344 from lightpanda-io/test-e2e
...
wpt / web platform tests (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig build release (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
zig-test / demo-puppeteer (push) Has been cancelled
Add end to end tests
2025-01-06 10:13:51 +01:00
Pierre Tachoire
c95d739347
ci: add test end to end
...
using puppeteer test from https://github.com/lightpanda-io/demo
2024-12-31 12:01:27 +01:00
Pierre Tachoire
c55849cef5
Merge pull request #343 from lightpanda-io/upgrade-zig-js
...
wpt / web platform tests (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig build release (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
upgrade zig-js-runtime deps
2024-12-31 10:37:22 +01:00
Pierre Tachoire
88adb09417
upgrade zig-js-runtime deps
2024-12-31 10:09:48 +01:00
Pierre Tachoire
cb356ffca9
Merge pull request #341 from lightpanda-io/docker
...
fix docker port
2024-12-26 10:02:54 +01:00
Pierre Tachoire
2ba3f252ee
fix docker port
2024-12-26 10:00:59 +01:00
Pierre Tachoire
ebe2c8e3dd
Merge pull request #332 from lightpanda-io/verbose-option
...
wpt / web platform tests (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig build release (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
add --verbose option
2024-12-17 09:41:58 +01:00
Francis Bouvier
ca2d63edcf
Merge pull request #330 from lightpanda-io/contributing
...
add a CONTRIBUTING file
2024-12-16 15:54:17 +01:00
Francis Bouvier
489a1a1c37
Merge pull request #338 from lightpanda-io/README
...
README: be more precise on current status
2024-12-16 13:43:45 +01:00
Francis Bouvier
5cad13eea3
README: be more precise on current status
...
Signed-off-by: Francis Bouvier <francis@lightpanda.io >
2024-12-16 13:35:24 +01:00
Pierre Tachoire
a3e09e015c
Merge pull request #329 from lightpanda-io/readme-getting-started
...
readme: add a quick start section
2024-12-16 09:34:10 +01:00
Pierre Tachoire
22a6accac1
readme: add a quick start section
2024-12-13 17:45:30 +01:00
Pierre Tachoire
277c97a959
Merge pull request #331 from lightpanda-io/continue-on-error
...
wpt / web platform tests (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig build release (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
browser: don't stop processing page on error status code
2024-12-13 17:41:34 +01:00
Pierre Tachoire
c08bc3239a
Merge pull request #334 from lightpanda-io/patch-1
...
Update README.md
2024-12-13 15:05:34 +01:00
katie-lpd
f798c7e0fb
Update README.md
2024-12-13 14:45:02 +01:00
Pierre Tachoire
193780a88f
cla: add katie-lpd to the allow list
wpt / web platform tests (push) Waiting to run
wpt / perf-fmt (push) Blocked by required conditions
zig-test / zig build dev (push) Waiting to run
zig-test / zig build release (push) Waiting to run
zig-test / zig test (push) Waiting to run
zig-test / perf-fmt (push) Blocked by required conditions
2024-12-13 14:33:57 +01:00
Pierre Tachoire
ab4973ab6c
add --verbose option
2024-12-13 12:29:05 +01:00
Pierre Tachoire
f9da815e8f
browser: don't stop processing page on error status code
2024-12-13 11:56:18 +01:00
Pierre Tachoire
59e187d59a
add a CONTRIBUTING file
2024-12-13 11:28:14 +01:00
Francis Bouvier
3b018e2a6d
Merge pull request #325 from lightpanda-io/await_promise
...
wpt / web platform tests (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig build release (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
cdp: runtime, replace `"awaitPromise":true` only if present
2024-12-09 11:19:45 +01:00
Francis Bouvier
d4939c8260
Merge pull request #322 from lightpanda-io/cdp_msg_nullable_params
...
wpt / web platform tests (push) Waiting to run
wpt / perf-fmt (push) Blocked by required conditions
zig-test / zig build dev (push) Waiting to run
zig-test / zig build release (push) Waiting to run
zig-test / zig test (push) Waiting to run
zig-test / perf-fmt (push) Blocked by required conditions
cdp: handle nullable Type for params
2024-12-08 19:08:27 +01:00
Francis Bouvier
485352594c
Merge pull request #324 from lightpanda-io/json_parse_unknown_field
...
cdp: do not throw error on json parse for unknown fields
2024-12-08 19:05:11 +01:00
Francis Bouvier
bcdcfee467
Merge pull request #323 from lightpanda-io/cdp_msg_size
...
Cdp msg size
2024-12-08 18:58:14 +01:00
Francis Bouvier
0217e3fcae
cdp: runtime, replace "awaitPromise":true only if present
...
Signed-off-by: Francis Bouvier <francis@lightpanda.io >
2024-12-08 15:33:32 +01:00
Francis Bouvier
6e7d6421d5
cdp: do not throw error on json parse for unknown fields
...
Signed-off-by: Francis Bouvier <francis@lightpanda.io >
2024-12-08 15:27:12 +01:00
Francis Bouvier
913d3af938
cdp: increase msg size 16KB -> 256KB
...
And move header size encoding from 2 bytes -> 2 bytes
Signed-off-by: Francis Bouvier <francis@lightpanda.io >
2024-12-04 23:06:55 +01:00
Francis Bouvier
53dd0a5e4c
cdp: handle nullable Type for params
...
Signed-off-by: Francis Bouvier <francis@lightpanda.io >
2024-12-04 22:39:54 +01:00