Commit Graph

3681 Commits

Author SHA1 Message Date
Karl Seguin
a54e1db784 getElementsByName now returns a NodeList rather than an HTMLCollection
Auto-implement a toString accessor for any type that has a JsApi.Meta.name
2026-01-07 09:17:51 +08:00
Karl Seguin
2319b0fda5 Improve document.title getter
Collapse whitespace and find the first title, no matter where it is.
2026-01-07 07:52:20 +08:00
Karl Seguin
6864a22721 fix datetime-local input type 2026-01-07 07:39:42 +08:00
Karl Seguin
c9d0e2097d add input indeterminate accessor 2026-01-07 07:35:24 +08:00
Karl Seguin
d8f7eb3f24 Add 'clone' callback to build, implement for Input 2026-01-07 07:29:43 +08:00
Karl Seguin
90ee919f45 Merge pull request #1321 from lightpanda-io/event-init
set _time_stamp in the Event factory
2026-01-07 07:14:34 +08:00
Karl Seguin
ddc6431720 Merge pull request #1316 from lightpanda-io/reject_non_new_constructor
Reject constructors called as function (i.e. without 'new')
2026-01-07 07:14:13 +08:00
Pierre Tachoire
2ea6557fb7 add initEvent into Factory
and remove default value for Event._time_stamp
2026-01-06 15:30:13 +01:00
Karl Seguin
15358c1928 Improve Range, adding missing functions and more validation 2026-01-06 20:27:16 +08:00
Karl Seguin
d65025b3cb Merge pull request #1320 from lightpanda-io/fix-replaceChildren
remove children from previous parent
2026-01-06 19:07:15 +08:00
Pierre Tachoire
54fa3bc054 remove children from previous parent 2026-01-06 11:52:47 +01:00
Pierre Tachoire
68f5fa738c remove dead code Page._appendNode 2026-01-06 11:49:13 +01:00
Karl Seguin
2ea57ba979 update v8 dep 2026-01-06 18:30:25 +08:00
Karl Seguin
1acc0b0dc8 Merge pull request #1310 from lightpanda-io/zigdom-named-access
Named Access on the Window Object
2026-01-06 18:07:43 +08:00
Karl Seguin
645ec79fce access page from context, document call_depth usage 2026-01-06 18:04:17 +08:00
Karl Seguin
97e897e80e Merge pull request #1318 from lightpanda-io/node-self-replace
handle Node self replacement in insertBefore
2026-01-06 17:23:12 +08:00
Karl Seguin
6f72eeae65 Merge pull request #1319 from lightpanda-io/script_list_cleanup
Handle immediate call to Script.errorCallback
2026-01-06 17:22:14 +08:00
Karl Seguin
a845b2e35e Handle immediate call to Script.errorCallback
It's possible for Script.errorCallback to be called as part of the call to
`client.request`. This happens because we eagerly pump the libcurl message loop
to get the request going ASAP. For very obvious failures (e.g. an invalid URL)
this means that the error callback can be called from `client.request`.

Previously, we were only adding the script to its list _after_ the call to
`client.request`, but the error handler tries to remove the script from the list
.

This commit changes the order so that the script is first added to the list
and then the request is made.
2026-01-06 17:03:27 +08:00
Pierre Tachoire
b164ffeb95 handle Node self replacement in insertBefore 2026-01-06 09:49:08 +01:00
Karl Seguin
7ba34af884 Merge pull request #1317 from lightpanda-io/zigValueToJs-opts-pass-down
pass down opts to zigValueToJs
2026-01-06 16:36:44 +08:00
Pierre Tachoire
7f543ac7c8 pass down opts to zigValueToJs 2026-01-06 09:35:38 +01:00
Karl Seguin
a1bf92c07f Reject constructors called as function (i.e. without 'new')
Previously, `MessageEvent('')` would have been allowed, but invalid. This caused
problems as the receiver was the window. All such calls are now rejected.

Depends on https://github.com/lightpanda-io/zig-v8-fork/pull/131
2026-01-06 16:03:37 +08:00
Karl Seguin
0b221615b7 Merge pull request #1315 from lightpanda-io/replaceChild-itself
fix Node.replaceChild when of new child equals old
2026-01-06 08:00:03 +08:00
Pierre Tachoire
f81a9b54a7 fix Node.replaceChild when of new child equals old 2026-01-05 21:48:59 +01:00
Muki Kiboigo
05da040ce1 increment call_depth on callWithThis 2026-01-05 09:27:17 -08:00
Muki Kiboigo
b911051842 add named access shadowing test 2026-01-05 09:08:57 -08:00
Muki Kiboigo
a67f46b550 add named access on the Window object 2026-01-05 08:41:42 -08:00
Karl Seguin
dcde19de3c Merge pull request #1309 from lightpanda-io/zigdom-anchor-click
Anchor Click
2026-01-05 12:30:30 +08:00
Muki Kiboigo
a8b4e8c1bc fix handleclick for hash href on anchor 2026-01-04 20:28:34 -08:00
Karl Seguin
7b0e256408 copy history test from legacy 2026-01-05 10:12:41 +08:00
Karl Seguin
5a974f0d77 Merge pull request #1282 from lightpanda-io/nikneym/performance-observer
Support `PerformanceObserver` API
2026-01-05 07:52:58 +08:00
Halil Durak
f7fe8d00fb add a PerformanceObserver test 2026-01-04 18:09:45 +03:00
Halil Durak
946b6d8226 PerformanceObserver changes 2026-01-04 18:09:28 +03:00
Karl Seguin
25366f0e47 Support multiple blocking scripts waiting for the same response
I thought we eliminated this from being possible, but I guess not. It seems to
be related to multiple async scripts direct or indirectly (or a specific
combination?) waiting for the same synchronous script. The first async script
to block, grabs it and deletes it, making it invalid for the next.

This puts back a counter on blocking scripts which I took out when I thought
this could no longer happen.
2026-01-02 20:57:29 +08:00
Karl Seguin
562e8e8d87 ignore empty pseudo_element in getComputedStyle 2026-01-02 16:47:04 +08:00
Karl Seguin
11ff9ed366 update log src for fetch (xhr -> fetch) 2025-12-30 17:08:27 +08:00
Halil Durak
9a9f2ab94b rm ring_buffer.zig 2025-12-30 11:46:58 +03:00
Karl Seguin
27048fb06d Merge pull request #1305 from lightpanda-io/nikneym/observer-lists
prefer `DoublyLinkedList` for storing `MutationObserver`s in `Page`
2025-12-30 16:43:40 +08:00
Halil Durak
e103ee1ffa prefer low priority queue to execute performance observer 2025-12-30 11:43:24 +03:00
Halil Durak
acebbb9041 don't prefer microtask queue for execution
This still needs investigation. Spec doesn't refer usage of microtask queue for this, yet the current behavior doesn't match to Firefox and Chrome.
2025-12-30 11:43:24 +03:00
Halil Durak
0264c94426 proper interested function 2025-12-30 11:42:21 +03:00
Halil Durak
88de72a9ea core performance observer logic
Heavily based on MutationObserver and IntersectionObserver.
2025-12-30 11:42:21 +03:00
Halil Durak
9306adc786 add an overwriting ring buffer implementation 2025-12-30 11:42:20 +03:00
Halil Durak
43c30f8a34 avoid inline + don't initialize node 2025-12-30 11:39:09 +03:00
Karl Seguin
7c7240d5ab Try to protect against invalid use of document.write
Specifically, try to block multiple document.write which, when combined, have
multiple html documents.
2025-12-30 10:07:56 +08:00
Karl Seguin
169582c992 DOMRect constructor
More default computed styles (color and backgroundColor)

HTMLMetaElement properties

Case-insensitive findAdjacentNodes position parameter

Allow computedStyle pseudo_element parameter (ignore, log not implemented)

Window.isSecureContext always returns false
2025-12-30 09:33:00 +08:00
Karl Seguin
7b74161e9c Merge pull request #1270 from lightpanda-io/wp/mrdimidium/css-parsing
CSS parsing
2025-12-30 07:05:56 +08:00
Karl Seguin
633e98c8f4 Merge pull request #1306 from lightpanda-io/generic-tags
add more generic tags
2025-12-30 07:01:52 +08:00
Pierre Tachoire
5743c4fc93 add more generic tags 2025-12-29 18:15:02 +01:00
Nikolay Govorov
9984b3445f Add css tokenazer for parse style attribute 2025-12-29 15:06:07 +00:00