Commit Graph

3582 Commits

Author SHA1 Message Date
Karl Seguin
a9e6051867 HTMLElement.click() 2025-12-24 16:17:17 +08:00
Karl Seguin
0fcb316837 Move HTML-specific behavior from Element to HTMLElement. 2025-12-24 16:17:17 +08:00
Karl Seguin
c0704f822b Merge pull request #1288 from lightpanda-io/pseudo-frames
backport frames access from Window
2025-12-24 15:51:41 +08:00
Pierre Tachoire
ba974f695d use a better comparison 2025-12-24 08:46:46 +01:00
Karl Seguin
3ca82b9ab5 Tweak CSS
Give default styles to visibility properties. Unblocks various playwright
behavior
2025-12-24 15:04:06 +08:00
Karl Seguin
df4e5d859f Enable blocking auth request interception 2025-12-24 12:19:11 +08:00
Karl Seguin
67875036c5 Rework request interception for Zigdom
Zigdom broke request interception. It isn't zigdom specifically, but in zigdom
we properly block the parser when executing a normal (not async, not defer)
script. This does not work well with request interception, because an
intercepted request isn't blocked on HTTP data, it's blocked on a message from
CDP. Generally, neither our Page nor ScriptManager are CDP-aware. And, even if
they were, it would be hard to break out of our parsing and return control to
the CDP server.

To fix this, we expand on the HTTP Client's basic awareness of CDP (via its
extra_socket field). The HTTP client is now able to block until an intercepted
request is continued/aborted/fulfilled. it does this by being able to ask the
CDP client to read/process data.

This does not yet work for intercepted authentication requests.
2025-12-24 11:49:05 +08:00
Karl Seguin
83f008de1f Correctly handle setting textContent to empty for DocFrag and Element
Fixes an [non-critical] error on old.reddit.com
2025-12-24 11:43:43 +08:00
Karl Seguin
7183b0339b fix crash on amazon product page 2025-12-24 08:00:26 +08:00
Karl Seguin
9969ff7165 implement html5ever append_based_on_parent_node and append_before_sibling 2025-12-24 07:37:44 +08:00
Karl Seguin
0ca97d01ac Merge pull request #1287 from lightpanda-io/window.scrollTo
Add Window.scrollTo
2025-12-24 07:16:13 +08:00
Karl Seguin
fc4dbb6184 Merge pull request #1286 from lightpanda-io/zigdom-single-build
Single Build Command
2025-12-24 07:09:59 +08:00
Karl Seguin
9b16212d4b Merge pull request #1285 from lightpanda-io/base_url
implement base_url
2025-12-24 07:09:39 +08:00
Pierre Tachoire
4d67cfa340 backport frames access from Window 2025-12-23 17:14:34 +01:00
Pierre Tachoire
2bd38608e9 throttle scroll event 2025-12-23 16:13:02 +01:00
Karl Seguin
6ce117e5fa Add padding to DOMImplementation to prevent ptr collision with other empty types 2025-12-23 21:36:27 +08:00
Pierre Tachoire
2b10b1c17a webapi: add window.scrollTo 2025-12-23 12:07:07 +01:00
Karl Seguin
bbf58a2807 Move page out of arena so that the arena can be reset between navigates 2025-12-23 16:26:28 +08:00
Pierre Tachoire
44ffcaeed8 fix legacy test expected port 2025-12-23 08:44:25 +01:00
Pierre Tachoire
a597d31505 set page base_url during HTML parsing 2025-12-23 08:44:24 +01:00
Pierre Tachoire
6dbd008724 page: use optional base_url to resolve urls 2025-12-23 08:44:24 +01:00
Pierre Tachoire
7d47f8623a webapi: add Node.baseURI accessor 2025-12-23 08:18:06 +01:00
Karl Seguin
7c755483b1 Register HTMLImageElement name.
Handle DOMParser with empty string

This gets DDG results working.
2025-12-23 14:33:47 +08:00
Karl Seguin
e387e005d8 try to improve page re-navigate (reset) memory usage 2025-12-23 12:32:16 +08:00
Muki Kiboigo
c9f6cb7520 fix single build with rust in ci 2025-12-22 10:41:22 -08:00
Muki Kiboigo
596ee82a52 zig build builds everything 2025-12-22 09:57:34 -08:00
Karl Seguin
79b62e0dfc Merge pull request #1284 from lightpanda-io/fix-page-navigate
Fix page navigate with legacy_test
2025-12-22 22:58:41 +08:00
Karl Seguin
e67cf21917 quick fix for segfault 2025-12-22 22:52:41 +08:00
Pierre Tachoire
8fb1c3971c fix page.navigate into legacy_test and wpt 2025-12-22 15:39:46 +01:00
Karl Seguin
437df18a07 form submitt 2025-12-22 19:45:29 +08:00
Karl Seguin
8215f2fd8f Merge branch 'snapshots_v2' into zigdom 2025-12-22 17:03:38 +08:00
Karl Seguin
af7f51a647 start handling page clicks and key presses 2025-12-22 17:02:20 +08:00
Karl Seguin
3ab09d87f2 Update src/browser/js/ExecutionWorld.zig
Co-authored-by: Pierre Tachoire <pierre@lightpanda.io>
2025-12-22 16:44:55 +08:00
Karl Seguin
4c1d82162f Update src/browser/js/Snapshot.zig
Co-authored-by: Pierre Tachoire <pierre@lightpanda.io>
2025-12-22 16:44:49 +08:00
Karl Seguin
3830e2610b Update src/browser/js/Snapshot.zig
Co-authored-by: Pierre Tachoire <pierre@lightpanda.io>
2025-12-22 16:44:42 +08:00
Karl Seguin
e3265d400e Update src/browser/js/Env.zig
Co-authored-by: Pierre Tachoire <pierre@lightpanda.io>
2025-12-22 16:44:33 +08:00
Karl Seguin
d9c53a3def Page.scheduleNavigation for location changes 2025-12-22 12:19:08 +08:00
Karl Seguin
da32440a14 pass IdleDeadline to idle callback 2025-12-21 18:26:54 +08:00
Karl Seguin
25ad3559f7 Add Document.gettype 2025-12-21 17:13:36 +08:00
Karl Seguin
8fbd64955f Dynamically added scripts default to async 2025-12-21 16:51:39 +08:00
Karl Seguin
32c83d166d implement html5ever createPI callback 2025-12-21 16:04:59 +08:00
Karl Seguin
d95b19d31b update CI zig-v8-fork version, improve XHR state management 2025-12-21 15:26:26 +08:00
Karl Seguin
9e62e72d1f Merge branch 'fix_ci' into zigdom 2025-12-19 21:36:15 +08:00
Karl Seguin
29259c23d7 update zig-v8-fork version 2025-12-19 21:36:09 +08:00
Karl Seguin
3d6af216dc document.write, document.close, document.open
Add support for both modes - parsing and post-parsing. In post-parsing mode,
document.write implicitly calls document open, and document.open wipes the
document. This mode is probably rarely, if ever, used.

However, while parsing, document.write does not call document.open and does not
remove all existing nodes. It just writes the html into the document where the
parser is. That isn't something we can properly do..but we can hack it. We
create a new DocumentFragment, parse the html into the document fragment, then
transfer the children into the document where we currently are.

Our hack probably doesn't work for some advance usage of document.write (e.g
nested calls), but it should work for more common cases, e.g. injecting a script
tag.
2025-12-19 21:29:28 +08:00
Karl Seguin
f475aa09e8 backport https://github.com/lightpanda-io/browser/pull/1265 2025-12-19 16:06:25 +08:00
Pierre Tachoire
1278dc28cd cdp: add accessibility domain 2025-12-19 10:34:41 +08:00
Pierre Tachoire
33ee2fb1a0 ci: use macos-14-intel for building macos x86
macos-13 is unsupported. We Have to switch for payed instance.
see https://github.com/actions/runner-images/issues/13046
2025-12-19 10:33:42 +08:00
Pierre Tachoire
2ac90262b7 ci: add nightly integration test 2025-12-19 10:32:39 +08:00
Karl Seguin
bb1ea39c54 backport a variety of smaller CDP changes 2025-12-19 10:31:07 +08:00