Commit Graph

1766 Commits

Author SHA1 Message Date
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