Commit Graph
9542 Commits
Author SHA1 Message Date
Karl Seguin 1407033b02 Merge pull request #3198 from lightpanda-io/implicit-iterator
webapi: Give iterator to types with an indexed property
2026-08-15 07:36:29 +08:00
Karl Seguin 36293edc07 Merge pull request #3196 from lightpanda-io/cache-maintenance
chore: Move cache maintenance to startup and browser.deinit
2026-08-15 07:34:50 +08:00
Karl Seguin e3d2ff795f Merge pull request #3191 from lightpanda-io/url-is-same-origin
`URL.isSameOrigin`
2026-08-15 07:23:43 +08:00
Pierre Tachoire ca4726c1cd add --user-agent unit test 2026-08-14 19:04:16 +02:00
Pierre Tachoire 859543ed3e add missing user-agent validator for CLI 2026-08-14 18:35:55 +02:00
Muki Kiboigo 7cb6590642 better handling of allowed and disallowed robots cases 2026-08-14 08:52:37 -07:00
Muki Kiboigo e22812ffea fix isSameOrigin compairson with ports 2026-08-14 08:05:08 -07:00
Muki Kiboigo bcea0afa24 add URL isSameOrigin to WorkerGlobalScope 2026-08-14 07:59:14 -07:00
Muki Kiboigo fc8f89e157 use URL.isSameOrigin in Frame.isSameOrigin 2026-08-14 07:46:33 -07:00
Pierre Tachoire 7a2e5370dd webapi: check user-agent override via webapi 2026-08-14 16:37:08 +02:00
Pierre Tachoire dd83300095 htttp: add Transfer.appendHeader
and make transfer.addHeader private.
2026-08-14 16:33:49 +02:00
Pierre Tachoire 6e72441001 make Sec-Ch-Ua not modifiable via cdp 2026-08-14 16:05:19 +02:00
Pierre Tachoire a61ad53690 Merge pull request #3173 from lightpanda-io/nikneym/cdp-ws-origin
`Origin` and (additional) `Host` header validation for CDP conns
2026-08-14 12:57:08 +02:00
Pierre Tachoire 80e45ab016 apply user-agent validation rules on request intercepted 2026-08-14 12:26:33 +02:00
Halil Durak b10f901fdc Connection: implementation for origin and host allowing
`Connection`: update tests

`Server.zig`: add a test for origin check at handshake + update tests

`help.zon`: entry for `--remote-allow-origins`

`Connection`: only look for existence of `Origin` header key alone

Also reworks `Host` header check to IP alone.

update tests

remove `--remote-allow-origins` flag
`Connection`: reject on `Origin`

`Connection`: prefer `parseLiteral` + return early from `Origin` check

update tests
2026-08-14 12:11:11 +03:00
Pierre Tachoire 1d8517cdd2 Merge pull request #3197 from lightpanda-io/release-arm-bump-ubuntu
ci: bump ubunutu to 24.04 for arm release.
2026-08-14 10:50:05 +02:00
Karl Seguin b53fa18c3d webapi: Give iterator to types with an indexed property
Apparently, any type that ah indexed property also gets an iterator, even if
the iterator isn't explicitly listed in the spec. This showed up as a bug
rendering washingtonpost.com.
2026-08-14 16:43:33 +08:00
Pierre Tachoire 34aae91fa1 ci: bump ubunutu to 24.04 for arm release.
apt.llvm.org no longer publishes an LLVM 23 repo for 22.04.
https://github.com/lightpanda-io/zig-v8-fork/pull/199
2026-08-14 10:30:25 +02:00
Karl Seguin 18afa56eb6 Merge pull request #3194 from lightpanda-io/test-log-silence
chore: silence test log
2026-08-14 16:29:57 +08:00
Pierre Tachoire 6f7afeb09e Merge pull request #3193 from lightpanda-io/linux-dev-fast-default-on
dev: On linux -dev_fast is on by default
2026-08-14 10:24:43 +02:00
Karl Seguin a3034105aa chore: Move cache maintenance to startup and browser.deinit
--http-cache-entry-limit is currently implemented as a hard-limit via a check
on every put. For a large --http-cache-entry-limit, this can result in a non-
trivial delay on every http get.

This commit calls cache.maintenance() on Browser.deinit and on startup.
maintenance:
1 - purges stale entries
2 - enforces the limit

With concurrent requests, the number of entries can easily exceed the limit by
hundreds of entries (but this is temporary).
2026-08-14 15:55:37 +08:00
Karl Seguin b56b292da0 webapi: Custom Element reactions need pierce the shadowdom
CustomElement reactions (connected/disconnected) need to pierce the shadowdom.
This represents a potentially expensive treewalk on some common operations (add
/remove). That walk requires checking Frame._customized_builtin_definitions and
Frame._element_shadow_roots on every element. EXPENSIVE.

So, a packed _flags: Flags struct is added to Elements which is used to signal
that the element is present in  Frame._customized_builtin_definitions and
Frame._element_shadow_roots (1 bool per lookup). Element has spare padding, so
this currently costs no memory. There's spare space  in the flag which we should
use for the other hot lookups, but I'll do that in a separate commit.

Because of this new optimized flag, the change touches a few more files than
just the CE reaction change. (Any place that accessed those two Frame lookups
directly now go through a helper which first checks the flag).

Also added a bunch of Element aria getter/setter.

(All of this was done while looking at various /custom-elements/ WPT failures).
2026-08-14 13:42:19 +08:00
Karl Seguin eb25f6cc1c chore: silence test log 2026-08-14 10:50:13 +08:00
Karl Seguin 8caaf7ad96 dev: On linux -dev_fast is on by default
Assuming the conditions are met for -dev_fast to work (linux, debug, x86-64
without sanitizers), the -dev_fast now defaults to true.

download-v8 make target always downloads the .a (as before) and on linux x86-64
it also downloads the .so.
2026-08-14 10:43:34 +08:00
Karl Seguin fb7123cf75 Merge pull request #3185 from lightpanda-io/console
webapi: improve console conformance
2026-08-14 06:42:36 +08:00
Karl Seguin 84769e555f Merge pull request #3188 from lightpanda-io/wpt-mem-limit
chore: bump WPT --max-mem from 100 to 200
2026-08-14 06:42:23 +08:00
Muki Kiboigo de5c34f092 add isSameOrigin to URL 2026-08-13 13:56:50 -07:00
muki 563ccaf4d1 Merge pull request #3158 from lightpanda-io/singleflight
Single Flight
2026-08-13 13:21:04 -07:00
Pierre Tachoire 92e3cfcbe9 fix errdefer path on singleflight 2026-08-13 17:55:48 +02:00
Muki Kiboigo a356840c63 remove from pending on waiting append error in SingleFlight 2026-08-13 08:25:18 -07:00
Muki Kiboigo fb5a9b6a35 get rid of allocator stored in RobotsGate 2026-08-13 08:20:15 -07:00
Muki Kiboigo 21856170e3 single lookup for SingleFlight pending 2026-08-13 08:20:14 -07:00
Halil Durak 90adef8c92 HostnameTrie: update doc-comment 2026-08-13 16:54:39 +03:00
Halil Durak 48282a9307 Parser: count the rule lines it drops 2026-08-13 16:39:17 +03:00
Halil Durak a481cd7c40 update tests 2026-08-13 16:39:16 +03:00
Halil Durak 971b758f29 Network: changes after relocation of fromConfig 2026-08-13 16:39:16 +03:00
Halil Durak c4b0b7cc33 HttpClient: check the adblocker inside isUrlBlocked` 2026-08-13 16:39:16 +03:00
Halil Durak 493065e348 Parser: update test 2026-08-13 16:39:16 +03:00
Halil Durak d8de3b0dd4 AdBlocker: change how we count skipped 2026-08-13 16:39:15 +03:00
Halil Durak 4845a98b1f NetworkFilter: drop dead pattern field, reduce $domain= to a bool 2026-08-13 16:39:15 +03:00
Halil Durak 168ed8157b domain: introduce validate and remove parse fn + dead code 2026-08-13 16:39:15 +03:00
Halil Durak 6f76f8053f AdBlocker: update tests 2026-08-13 16:39:15 +03:00
Halil Durak 60cd7e63db AdBlocker: tracking of rules_loaded and rules_skipped
Also moves `fromConfig` and `loadList` to here.
2026-08-13 16:39:14 +03:00
Halil Durak c111fc5675 load and parse block list once and share between HTTP clients 2026-08-13 16:39:14 +03:00
Halil Durak 0d8e926bae src/adblock -> src/network/adblock 2026-08-13 16:39:14 +03:00
Halil Durak 5b5cf9b304 domain.zig: remove dupe, update test block 2026-08-13 16:39:14 +03:00
Halil Durak cab06bdf8a add an help.zon entry for --adblock-lists 2026-08-13 16:39:13 +03:00
Halil Durak b5ef7d56b2 remove CosmeticFilter
This doesn't have ties to anything since we only support network blocking for now.
2026-08-13 16:39:13 +03:00
Halil Durak 835cf8917b update tests 2026-08-13 16:39:13 +03:00
Halil Durak b1b9a64573 CLI option for adblock list passing + integrate adblocker to http client 2026-08-13 16:39:13 +03:00