Commit Graph

37 Commits

Author SHA1 Message Date
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
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
Pierre Tachoire
0fee2bbf28 upgrade netsurf/libdom 2025-08-06 10:42:54 +02:00
Karl Seguin
f4a6e34713 update libdom 2025-07-23 07:51:33 +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
sjorsdonkers
2a2a9d7941 EventTarget InternalType 2025-07-11 09:55:16 +02:00
sjorsdonkers
f931026216 update libdom with embedder data fix 2025-06-04 12:38:26 +02:00
sjorsdonkers
19d40845a4 input prop testing 2025-06-03 14:11:35 +02: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
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
Karl Seguin
ca3fa3dc40 Rework WPT runner (#589)
Some checks failed
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
b971b4754f update libdom to latest version, fixing null ptr usage and stack overflow 2025-04-24 15:18:22 +08:00
Pierre Tachoire
09ba4bcf43 upgrade libdom 2025-01-27 12:33:04 +01:00
Pierre Tachoire
46062e185a upgrade libdom 2024-09-25 11:47:34 +02:00
Pierre Tachoire
4d6f59ecb8 upgrade libdom 2024-09-24 10:01:12 +02:00
Pierre Tachoire
d193b73ee3 upgrade libdom 2024-05-02 17:36:44 +02:00
Pierre Tachoire
a3e91debea deps: upgrade netsurf deps 2024-04-19 11:48:03 +02:00
Pierre Tachoire
dad51a4179 upgrade libwapcaplet deps 2024-04-19 11:46:42 +02:00
Francis Bouvier
76c88d049f setCAllocator
Replace custom malloc functions in netsurf libs with a global Zig allocator.

Signed-off-by: Francis Bouvier <francis@lightpanda.io>
2024-04-19 11:46:41 +02:00
Pierre Tachoire
55c747ad45 upgrade libdom 2024-04-08 15:22:00 +02:00
Pierre Tachoire
29ce31f2fd upgrade libdom 2024-04-03 15:03:37 +02:00
Pierre Tachoire
1d2ffb348a upgrade libdom 2024-02-15 14:10:50 +01:00
Francis Bouvier
1bf1f5a0aa Update libdom
Signed-off-by: Francis Bouvier <francis@lightpanda.io>
2024-01-24 11:46:06 +01:00
Francis Bouvier
f32fc05f62 Upgrade libdom
Signed-off-by: Francis Bouvier <francis@lightpanda.io>
2024-01-19 16:53:57 +01:00
Pierre Tachoire
681dd2390c netsurf: remove wrapper C files 2024-01-08 16:02:54 +01:00
Pierre Tachoire
7f1e592401 upgrade vendor/netsurf/libdom 2023-12-13 09:38:44 +01:00
Francis Bouvier
9141baa144 Revert libdom to last commit
Signed-off-by: Francis Bouvier <francis@lightpanda.io>
2023-11-27 17:45:04 +01:00
Francis Bouvier
d72e596b89 Update jsruntime
Signed-off-by: Francis Bouvier <francis@lightpanda.io>
2023-11-27 16:39:43 +01:00
Pierre Tachoire
6ec4d02f79 upgrade libdom 2023-11-27 09:26:32 +01:00
Pierre Tachoire
d15ad1e5d8 vendor: update netsurf/libdom@master 2023-10-19 15:17:18 +02:00
Pierre Tachoire
18b4c2c002 vendor: use libdom fork 2023-10-19 15:14:19 +02:00
Pierre Tachoire
a8079ad60e netsurf: refacot again to reuse wr_create_doc_dom_from_file 2023-10-04 18:28:04 +02:00
Pierre Tachoire
04892c7910 netsurf: use const char w/ parser wrapper 2023-10-04 18:26:39 +02:00
Pierre Tachoire
cd53d2604c netsurf: add a parser from string wrapper 2023-10-04 18:26:38 +02:00
Francis Bouvier
f06d1396f7 netsurf: add wrapper
Signed-off-by: Francis Bouvier <francis.bouvier@gmail.com>
2023-09-20 22:48:44 +02:00
Francis Bouvier
97348cef5c Add netsurf submodules
Signed-off-by: Francis Bouvier <francis.bouvier@gmail.com>
2023-09-06 17:51:43 +02:00