Commit Graph

4984 Commits

Author SHA1 Message Date
Karl Seguin
414a68abeb Merge pull request #1899 from lightpanda-io/idle_task_fix
only run idle tasks from the root page
2026-03-18 19:41:58 +08:00
Karl Seguin
52455b732b Merge pull request #1885 from lightpanda-io/danling_context_fallback
Fallback to the Incumbent Context when the Current Context is dangling
2026-03-18 19:41:38 +08:00
Karl Seguin
1aee3db521 only run idle tasks from the root page 2026-03-18 19:03:38 +08:00
Pierre Tachoire
f634c9843d Merge pull request #1893 from lightpanda-io/link_onload_rel
Some checks failed
zig-test / zig fmt (push) Has been cancelled
zig-test / zig test using v8 in debug mode (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
Expand rel's that trigger a link's onload
2026-03-18 09:41:10 +01:00
Pierre Tachoire
e1e45d1c5d Merge pull request #1796 from lightpanda-io/wp/mrdimidium/telemetry-common-network
Use common network runtime for telemetry messages
2026-03-18 09:34:19 +01:00
Karl Seguin
bd2406f803 Merge pull request #1891 from lightpanda-io/form-requestSubmit
Some checks failed
zig-test / zig fmt (push) Has been cancelled
zig-test / zig test using v8 in debug mode (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
e2e-integration-test / zig build release (push) Has been cancelled
e2e-integration-test / demo-integration-scripts (push) Has been cancelled
Implement Form.requestSubmit
2026-03-18 08:55:04 +08:00
Karl Seguin
3c29e7dbd4 Expand rel's that trigger a link's onload
Was only "stylesheet", not also includes "preload" and "modulepreload"
2026-03-18 08:53:05 +08:00
Nikolay Govorov
586413357e Close all cdp clients on shutdown 2026-03-17 23:30:36 +00:00
Nikolay Govorov
9a055a61a6 Limit telemetry body size 2026-03-17 23:23:10 +00:00
Nikolay Govorov
5fb561dc9c Used ring buffer for telemetry events buffer 2026-03-17 23:23:08 +00:00
Nikolay Govorov
b14ae02548 Move comments and bound checks 2026-03-17 23:23:05 +00:00
Nikolay Govorov
51fb08e6aa Create multi interface in Runtime on demand 2026-03-17 23:23:01 +00:00
Nikolay Govorov
a6d699ad5d Use common network runtime for telemetry messages 2026-03-17 23:21:57 +00:00
Karl Seguin
8372b45cc5 Merge pull request #1877 from lightpanda-io/xhr_and_fetch_blob_urls
Support blob urls in XHR and Fetch
2026-03-18 07:02:56 +08:00
Pierre Tachoire
1739ae6b9a check submit element and form into Form.requestSubmit 2026-03-17 21:34:48 +01:00
Pierre Tachoire
ba62150f7a add Form.requestSubmit(submitter) 2026-03-17 17:05:30 +01:00
Nikolay Govorov
8143a61955 Merge pull request #1888 from lightpanda-io/wp/mrdimidium/clenup-ci
Some checks failed
zig-test / zig fmt (push) Has been cancelled
zig-test / zig test using v8 in debug mode (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 / zig build release (push) Has been cancelled
wpt / build wpt runner (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
Cleanup CI a little bit
2026-03-17 15:47:18 +00:00
Nikolay Govorov
e16c479781 Merge pull request #1886 from lightpanda-io/wp/mrdimidium/enable-git-version-in-ci
Use `git_version` option for version command
2026-03-17 14:29:47 +00:00
Nikolay Govorov
c0c4e26d63 removes artifacts of the past from CI 2026-03-17 14:24:22 +00:00
Nikolay Govorov
b252aa71d0 Use git_version option for version command 2026-03-17 13:25:15 +00:00
Pierre Tachoire
9ef8d9c189 Merge pull request #1887 from lightpanda-io/disable_observer_weak_ref
disable observer weak ref
2026-03-17 14:09:43 +01:00
Karl Seguin
9f27416603 zig fmt 2026-03-17 20:03:31 +08:00
Karl Seguin
0729f4a03a Merge pull request #1872 from lightpanda-io/wp/mrdimidium/fix-cdp-close
Gracefull close ws socket
2026-03-17 19:58:48 +08:00
Karl Seguin
21f7b95db9 disable observer weak ref
https://github.com/lightpanda-io/browser/pull/1870 doesn't work. I think there
are ways for the inspector to move objects into a context that skips our
reference count (those remote objects?). This disables weak references for
MutationObserver and IntersectionObserver. The issue is probably more widespread
but these are two types CDP drivers us _a lot_ via inspector, so this should
fix a number of immediate crashes.

I believe the correct fix is to remove Origin and store things at the Session-
level.
2026-03-17 19:54:21 +08:00
Nikolay Govorov
4125a5aa1e Merge pull request #1874 from JasonOA888/fix/add-git-version-option
feat: add `git_version` build option for release version detection
2026-03-17 11:27:27 +00:00
Nikolay Govorov
6d0dc6cb1e Gracefull close ws socket 2026-03-17 11:15:12 +00:00
Nikolay Govorov
0675c23217 Merge pull request #1883 from Tenith01/fix/port-already-in-use
fix: show actionable error when server port is already in use
2026-03-17 10:53:36 +00:00
Karl Seguin
d0e6a1f5bb Merge pull request #1882 from Tenith01/fix/window-onerror-special-case
fix: special-case Window#onerror per WHATWG spec (5-arg signature)
2026-03-17 18:36:11 +08:00
Karl Seguin
91afe08235 Merge pull request #1878 from mvanhorn/osc/1770-window-event
Implement window.event property
2026-03-17 18:35:30 +08:00
Karl Seguin
041d9d41fb Fallback to the Incumbent Context when the Current Context is dangling
This specifically fixes a WPT crash running:
/html/browsers/browsing-the-web/history-traversal/001.html

(And probably a few others).

Isolate::GetCurrentContext can return a 'detached' context. And, for us, that's
a problem, because 'detached' v8::Context references a js.Context that we've
deinit'd. This seems to only happen when frames pass values around to other
frames and then those frames are removed. It might also require some async'ing,
I'm not sure.

To solve this, when we destroy a js.Context, we store null in the v8::Context's
embedder data, removing the link to our (dead) js.Context. When we load a
js.Context from a v8.Context, we check for null. If it is null, we return the
Incumbent context instead. This should never be null, as it's always the context
currently executing code.

I'm not sure if falling back to the Incumbent context is always correct, but
it does solve the crash.
2026-03-17 18:04:44 +08:00
Karl Seguin
7009fb5899 Merge pull request #1880 from lightpanda-io/logfilter-init-slice
Some checks failed
zig-test / zig test using v8 in debug mode (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
LogFilter: init with slice and silence tests
2026-03-17 17:42:23 +08:00
Tenith01
ce002b999c fix: special-case Window#onerror per WHATWG spec (5-arg signature) 2026-03-17 13:49:59 +05:30
Adrià Arrufat
5b1056862a Merge pull request #1879 from lightpanda-io/fix-leak-add-from-element
ScriptManager: fix memory leak and resource handover
2026-03-17 16:33:49 +09:00
Tenith01
cc4ac99b4a fix: show actionable error when server port is already in use 2026-03-17 13:02:55 +05:30
Adrià Arrufat
46df341506 ScriptManager: defer resource handover until request success 2026-03-17 15:45:11 +09:00
Adrià Arrufat
b698e2d078 LogFilter: init with slice and silence tests 2026-03-17 13:42:35 +09:00
Karl Seguin
5cc5e513dd Merge pull request #1876 from lightpanda-io/more-mcp-tools
Add click, fill, and scroll DOM interaction tools to MCP and CDP
2026-03-17 12:39:35 +08:00
Adrià Arrufat
e048b0372f ScriptManager: fix memory leak and resource handover
Release the arena when an inline script is empty and ensure the
handover flag is set correctly for all script execution modes.
2026-03-17 13:32:29 +09:00
Adrià Arrufat
d7aaa1c870 Merge branch 'main' into more-mcp-tools 2026-03-17 13:26:44 +09:00
Adrià Arrufat
463aac9b59 browser.actions: refactor click to use trusted MouseEvent 2026-03-17 13:22:55 +09:00
Karl Seguin
d9cdd78138 Merge pull request #1875 from lightpanda-io/history_test_stability
Try to improve stability of history test
2026-03-17 12:21:29 +08:00
Adrià Arrufat
44a83c0e1c browser.actions: use .wrap directly
Co-authored-by: Karl Seguin <karlseguin@users.noreply.github.com>
2026-03-17 12:55:10 +09:00
Matt Van Horn
96f24a2662 Implement window.event property
Add the deprecated-but-widely-used window.event property that returns
the Event currently being handled. Returns undefined when no event is
being dispatched.

Implementation saves and restores window._current_event around handler
invocation in both dispatchDirect and dispatchNode, supporting nested
event dispatch correctly.

Fixes #1770

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 20:42:45 -07:00
Karl Seguin
5d2801c652 Support blob urls in XHR and Fetch
Used quite a bit in WPT. Not sure how common this is in real world though.
2026-03-17 10:31:32 +08:00
Karl Seguin
deb08b7880 Try to improve stability of history test
Tests cannot navigate away from the page page. If they do, the testRunner will
crash, as it tries to access `assertOk` on a page that no longer exists. This
commit hacks the history test, using an iframe, to try to test the history API
without navigating off the main page.
2026-03-17 08:15:49 +08:00
JasonOA888
96e5054ffc feat: add git_version build option for release version detection
- Add git_version option to build.zig (similar to git_commit)
- Update version command to output git_version when available
- Falls back to git_commit when not on a tagged release
- CI can pass -Dgit_version=$(git describe --tags --exact-match) for releases

Fixes #1867
2026-03-17 07:41:11 +08:00
Karl Seguin
c9753a690d Merge pull request #1863 from jnMetaCode/fix/cdp-missing-disable-methods
Some checks failed
zig-test / zig test using v8 in debug mode (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
wpt / zig build release (push) Has been cancelled
wpt / build wpt runner (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
e2e-integration-test / zig build release (push) Has been cancelled
e2e-integration-test / demo-integration-scripts (push) Has been cancelled
fix(cdp): add missing disable methods to Performance, Inspector, Security domains
2026-03-17 07:21:14 +08:00
Karl Seguin
27aaf46630 Merge pull request #1873 from lightpanda-io/fix/domexception-default-messages
Fix/domexception default messages
2026-03-17 07:20:15 +08:00
Karl Seguin
84190e1e06 fix test for new messages 2026-03-17 07:07:16 +08:00
Karl Seguin
b0b1f755ea Merge pull request #1870 from lightpanda-io/mutation_observer_rc
Switch to reference counting for Mutation Observer and Intersection O…
2026-03-17 06:43:45 +08:00