Commit Graph
6136 Commits
Author SHA1 Message Date
Karl Seguin 8350076972 update intercepted type from u8 to u32 2026-06-28 14:18:12 +08:00
Karl Seguin d550a89330 v8, dep: Update v8
This update of zig-v8-fork is an update of v8 itself.
2026-06-28 08:03:02 +08:00
Karl Seguin 01ad869dff Merge pull request #2831 from lightpanda-io/unused_imports
minor: remove unused imports
2026-06-28 07:46:43 +08:00
Karl Seguin a362a4e461 Merge pull request #2830 from lightpanda-io/xhr_multi_transfer_guard
fix: Reject xhr send() when send already active
2026-06-28 07:46:32 +08:00
Halil Durak a457ddf8a7 Merge pull request #2703 from lightpanda-io/nikneym/rework-url-resolve
`URL`: Rework `resolve` with new URL implementation
2026-06-27 23:56:47 +03:00
Halil DurakandKarl Seguin 0373b9ce3d Update src/browser/webapi/Node.zig
Co-authored-by: Karl Seguin <karlseguin@users.noreply.github.com>
2026-06-27 23:56:33 +03:00
Karl Seguin 0aaa77c7e6 minor: remove unused imports 2026-06-27 18:16:31 +08:00
Karl Seguin fb13ffc373 Merge pull request #2825 from lightpanda-io/replaceWith-DocumentFragment
webapi: replaceWith called with DocumentFragment should append its ch…
2026-06-27 12:08:24 +08:00
Karl Seguin 57b676459d Merge pull request #2824 from lightpanda-io/script_innerHTML
fix: Fix innerHTML parsing based on the target
2026-06-27 12:08:04 +08:00
Karl Seguin d18cb3ad79 Merge pull request #2823 from lightpanda-io/css_normalize_leading_zero
css: normalize fractions without leading 0
2026-06-27 12:07:50 +08:00
Karl Seguin f0e82f4d57 Merge pull request #2821 from lightpanda-io/sendBeacon
webapi, fake: Navigator.sendBeacon
2026-06-27 12:07:26 +08:00
Karl Seguin 7a59f24ee1 Merge pull request #2820 from lightpanda-io/select-add
webapi: Add Select.add
2026-06-27 12:06:53 +08:00
Karl Seguin b78170c71e fix: Reject xhr send() when send already active
This builds on top of 995efd57e6. That commit
tracked the number of requests being made on a single XHR instance (because a
new request can be initiated from a load/error callback of an existing one).
However, that was unbound. It wasn't just 1 old + 1 new, it was an unlimited
number of new requests, because we didn't prevent sending while sending was
already active.

This adds a boolean to track our send state, and prevents a send from happening
when a send is already active.
2026-06-27 09:05:26 +08:00
Karl Seguin 700b4daf2e webapi: replaceWith called with DocumentFragment should append its children 2026-06-26 18:46:36 +08:00
Karl Seguin bf14d2f05c fix: Fix innerHTML parsing based on the target
The parsing behavior of HTML depends on what we're parsing it for. innerHTML on
a script is parsed (slightly) differently than for, say, the body. html5ever
supports this, we just have to give it the tag name (which we have access to
in the html5ever bridge already).

Also, extend the tag types that dump does NOT escape for beyond noscript/script.

Fixes warnings with some NextJS sites
2026-06-26 18:05:06 +08:00
Karl Seguin 2439f6150e css: normalize fractions without leading 0
This causes some feature detection (jquery/amazon) to think we're some old
version of IE, which then requires IE-specific APIs. It sets a ".55" value and
then reads it, expecting 0.55.
2026-06-26 16:37:45 +08:00
Karl Seguin 78e008d5ec webapi, fake: Navigator.sendBeacon
This is a noop implementation of navigator.sendBeacon. It often shows up in the
logs. I believe that returning "true" to signal successful queuing is correct
as it'll prevent any attempts to fallback. However, I'm less sure that noop'ing
the entire thing is better than just implementing it.
2026-06-26 16:10:59 +08:00
Karl Seguin 32d52a828a webapi: Add Select.add 2026-06-26 15:51:16 +08:00
Karl Seguin 6a1e1f5ace fix: Crash on requestAnimationFrame from Worker
https://github.com/lightpanda-io/browser/pull/2817 added support for RAF to
workers (largely as a consequence of the real effort), but this wasn't wired
all the way through.
2026-06-26 15:29:18 +08:00
Karl Seguin ba5323e51e Merge pull request #2817 from lightpanda-io/DedicatedWorkerGlobalScope
webapi: Make Worker a proper DedicatedWorkerGlobalScope
2026-06-26 15:07:56 +08:00
Pierre Tachoire 9cae6b07e6 Merge pull request #2797 from lightpanda-io/brotli-false-err
fix: work around libcurl Brotli trailing-byte rejection (CURLE_WRITE_ERROR)
2026-06-26 05:43:38 +00:00
Karl Seguin b473b019cb Merge pull request #2814 from lightpanda-io/telemetry_thread
telemetry: Move telemetry worker to its own thread
2026-06-26 08:55:26 +08:00
Karl Seguin 05986de731 Merge pull request #2818 from lightpanda-io/no_note_logs_on_test
minor: don't log .note level logs during unit tests
2026-06-26 08:43:46 +08:00
Karl Seguin 13eb35720a telemetry: Move telemetry worker to its own thread
This reverts recent(ish) changes to telemetry which moved it from its own thread
onto the main thread.

The downside is: we have an extra thread.

The upside is largely that Network.zig becomes drastically simpler and more
efficient. There's a bunch of machinery in Network.zig to support arbitrary
workers, of which Telemetry is the only one. There's also a lot of code to
support an optional multi and requests made to is. This is all removed.

Also, fetch, agent and mcp without a cdp server no longer even need to start
the network loop. And, it IS started (e.g. serve/cdp), there's no longer an
arbitrary 250ms wakeup on poll to progress workers. Nor can telemtry block CDP.

Telemetry's implementation itself was changed. The ring buffer was removed in
favor of a double-buffer arraylist. When telemetry is disabled, this saves
64Kb of memory. When it's enabled, it creates more allocator churn, but should
still use less memory in most cases (and never more). Finally, Telemetry is
given its own easy connection rather than using one out of the pool (which
workers would maybe like to use).
2026-06-26 08:38:49 +08:00
Karl Seguin 5fcdc1c5ad Merge pull request #2808 from lightpanda-io/fetch-multiple-urls
cli: fetch multiple urls
2026-06-26 08:36:26 +08:00
Karl Seguin cd6c027dd9 Merge pull request #2807 from lightpanda-io/runner
design: Runner supports multi-pages
2026-06-26 08:36:07 +08:00
Karl Seguin ec1d6fcb27 minor: don't log .note level logs during unit tests 2026-06-26 08:34:24 +08:00
Karl Seguin 5d604d109f slight optimization to hasRunnablePage 2026-06-26 08:22:33 +08:00
Karl Seguin e1a8e036c6 webapi: Make Worker a proper DedicatedWorkerGlobalScope
When you create a worker (new Worker(...)), it creates 2 objects: the Worker
that lives in the caller, and the WorkerGlobalScope (WGS) which is more or less
like a Window, with its own v8::Context.

But WGS is really a base class meant to be used with various types of workers.
new Worker() shouldn't create a WGS directly, it should create a
DedicatedWorkerGloblaScope, which inherits from WGS. For now, our WGS can only
have 1 type (DedicatedWGS).

This fixes various errors on www.kitandace.com which would launch workers, and
then do a check (if (this === DedicatedWorkerGloblaScope)). It _should_ have
returned true, but it didn't (because our workers were WGS).
2026-06-26 07:50:39 +08:00
Halil Durak 004dbf259e Anchor: update tests 2026-06-25 18:06:09 +03:00
Halil Durak 30f10b4966 prefer error-less URL resolver for various getters 2026-06-25 18:06:09 +03:00
Halil Durak f6fb653a35 prefer resolveNavigation at page, target and fetch 2026-06-25 18:06:08 +03:00
Halil Durak 67cc2be817 URL.zig: update tests 2026-06-25 18:05:49 +03:00
Halil Durak 6bd4fddf62 URL: add resolveNavigation
This is needed for schemeless "address bar" style URLs. Would love to have a path that doesn't allocate for this...
2026-06-25 18:05:49 +03:00
Halil Durak 82d78ecd00 Node: add resolveURLReflect 2026-06-25 18:05:49 +03:00
Halil Durak a499c0cb92 URL: update tests 2026-06-25 18:05:48 +03:00
Halil Durak 7d5553238e URL: changes on host(name) setter, introduce clean_hostname_input 2026-06-25 18:05:48 +03:00
Halil Durak 0c4f6f0d87 getProtocol(Anchor, Area): return : if resolved href is null 2026-06-25 18:05:48 +03:00
Halil Durak 84fe33c679 URL(EncodeSet): bring back component value
Lost and found.
2026-06-25 18:05:48 +03:00
Halil Durak a12d781d4a KeyValueList.zig: update tests 2026-06-25 18:05:48 +03:00
Halil Durak 2cdcecaba4 KeyValueList(urlEncodeUnreserved): drop ~ case 2026-06-25 18:05:48 +03:00
Halil Durak 84870d5524 URL: include leading '?' in search/query 2026-06-25 18:05:48 +03:00
Halil Durak 8d41c6e221 KeyValueList: write = between key and value at all modes 2026-06-25 18:05:48 +03:00
Halil Durak 20c9a873fd URL: update tests 2026-06-25 18:05:47 +03:00
Halil Durak e223827789 URL: reintroduce parse static method 2026-06-25 18:05:47 +03:00
Halil Durak 3c91f3b3e2 URL: fix missing port problem in setter 2026-06-25 18:05:47 +03:00
Halil Durak 7bf68a484d URL: replace ensureEncoded with resolve
Both essentially do the same; we can stick to `resolve` for further IDNA compat.
2026-06-25 18:05:47 +03:00
Halil Durak 9732c33c3c URL: remove always_dupe option from all call sites 2026-06-25 18:05:08 +03:00
Halil Durak 3512f1fb1a update URL-involving tests 2026-06-25 18:05:08 +03:00
Halil Durak be6f1c9155 Caller: remove error.Idna case 2026-06-25 18:05:08 +03:00