Commit Graph
5931 Commits
Author SHA1 Message Date
Karl Seguin a311cd166b Merge pull request #2315 from navidemad/fix-a21-disabled-inheritance
selector: walk fieldset/optgroup ancestors when matching :disabled
2026-04-29 12:27:35 +08:00
Navid EMAD aca6518850 selector: gate :disabled / :enabled on the HTML "disabled concept"
Per HTML "concept-fe-disabled", only listed elements (button, input,
select, textarea, optgroup, option, fieldset) participate in the
disabled concept. Anything else (e.g. <div disabled>) has no disabled
state and never matches :disabled / :enabled.

Add Element.hasDisabledConcept() and gate isDisabled() on it. Update
the :enabled selector arm so non-form-controls no longer match.
2026-04-29 05:50:54 +02:00
Navid EMAD 628c170b11 Merge remote-tracking branch 'origin/main' into fix-a21-disabled-inheritance 2026-04-29 05:42:27 +02:00
Karl Seguin 78babf4017 Merge pull request #2261 from navidemad/fix-a3-handle-javascript-dialog
lp: add LP.handleJavaScriptDialog to drive confirm/prompt return values
2026-04-29 11:12:05 +08:00
Karl Seguin 5574bb0172 Merge pull request #2312 from navidemad/fix-a25-image-button-submit
dom: route <input type=image> click into form submission
2026-04-29 10:47:53 +08:00
Navid EMAD 7dccf59ec2 zig fmt linting 2026-04-29 03:45:09 +02:00
Navid EMAD 82497a78a8 selector: walk fieldset/optgroup ancestors when matching :disabled
The `:disabled` and `:enabled` pseudo-class matchers in
`webapi/selector/List.zig` only checked the element's own `disabled`
content attribute. Per HTML "selector-disabled" + "concept-fe-disabled"
+ "concept-option-disabled", a form control inside <fieldset disabled>
matches :disabled (with the first-<legend> exception), and an <option>
inside <optgroup disabled> matches :disabled.

Route both pseudo-classes through `Element.isDisabled` (which already
walks the fieldset chain) and extend `isDisabled` to cover the
<option> + <optgroup disabled> case. <option> intentionally does NOT
inherit from <fieldset disabled> or <select disabled> — confirmed
against Chrome.

Closes #2314
2026-04-29 03:36:41 +02:00
Navid EMAD 6211b21813 dom: route <input type=image> click into form submission
Frame.handleClick's .input arm matched only _input_type == .submit and
fell through for .image, so clicking an image button fired the click
event but never scheduled a navigation or dispatched the form's submit
event. Per HTML §4.10.18.6.4 image buttons are submit buttons and must
submit their owning form.

The submitForm path already passes the input element as the submitter,
and FormData.collectForm already handles image submitters by appending
`name.x` and `name.y` (or bare `x`/`y` for unnamed inputs) coordinate
entries to the form-data set. Only the routing in handleClick was
missing. Coordinates are 0 for programmatic .click() per the spec.

Closes #2311
2026-04-29 02:52:50 +02:00
Navid EMAD 8cc82d1d64 lp: move handleJavaScriptDialog pre-arm from Page to LP namespace
Per upstream review (#2261): Page.handleJavaScriptDialog is a standard
CDP method that reactive Chrome-style drivers send in response to a
Page.javascriptDialogOpening event. Repurposing it for the proactive
pre-arm flow risks surprising those drivers — the next dialog they
trigger would be blindly accepted.

Move the pre-arm handler to LP.handleJavaScriptDialog so only
Lightpanda-aware clients opt in. Page.handleJavaScriptDialog reverts
to the upstream stub returning -32000 "No dialog is showing" so the
reactive surface is unchanged. The Page.javascriptDialogOpening event
listener still pops the BrowserContext stash and fills the response
output param — only the setter moved.

Tests rename cdp.page: → cdp.lp: and target LP.handleJavaScriptDialog;
behavior coverage is identical.
2026-04-29 02:04:20 +02:00
Navid EMAD 6c2d78d0f0 Merge remote-tracking branch 'origin/main' into fix-a3-handle-javascript-dialog 2026-04-29 01:56:55 +02:00
Karl Seguin e133b26e9b Merge pull request #2306 from lightpanda-io/feat/2249-htmlframesetelement-stub
Feat/2249 htmlframesetelement stub
2026-04-29 07:46:06 +08:00
Karl Seguin f15948c5a4 Finalize *partial* frameset support 2026-04-29 07:16:33 +08:00
Navid EMAD fd2f26a065 Merge remote-tracking branch 'origin/main' into fix-a3-handle-javascript-dialog 2026-04-29 00:57:03 +02:00
muki f0675a8d2b Merge pull request #2304 from lightpanda-io/ci-rust-cache
Use Rust Cache in CI for `html5ever`
2026-04-28 11:03:16 -07:00
muki cf34a508d4 Merge pull request #2302 from lightpanda-io/http-cache-layer-arena-leak
Fix Request Arena Leak on CacheLayer Hit
2026-04-28 10:27:13 -07:00
Muki Kiboigo ec0af94939 use rust cache in ci for html5ever 2026-04-28 10:15:14 -07:00
Muki Kiboigo e8c9acd310 fix request arena leak on CacheLayer hit 2026-04-28 09:48:23 -07:00
Pierre Tachoire 427cdfe3ce Merge pull request #2079 from lightpanda-io/http-client-layering
Layering HTTP Client
2026-04-28 16:23:42 +02:00
Muki Kiboigo 1057b9de8d toRequestId2 -> toRequestId on CDP 2026-04-28 07:01:43 -07:00
Muki Kiboigo 85a5c0f927 decrement intercepted and properly deinit on BrowserContext deinit 2026-04-28 07:01:43 -07:00
Muki Kiboigo 1ab445843c better arena management in Robots Layer and Context 2026-04-28 07:01:43 -07:00
Muki Kiboigo 24ece021e1 remove interception stuff in Transfer 2026-04-28 07:01:42 -07:00
Muki Kiboigo 0ecf981f7e add assert to SyncRequest headerCallback 2026-04-28 07:01:42 -07:00
Muki Kiboigo 1370f6805b add a note about cdp callback cb 2026-04-28 07:01:42 -07:00
Muki Kiboigo 3fe774fbfb pass error all the way up to Layer chain to clean 2026-04-28 07:01:42 -07:00
Muki Kiboigo 4de1dc5424 properly call error callback in InterceptionLayer 2026-04-28 07:01:42 -07:00
Muki Kiboigo 83b047e66a assert that intercepted isn't 0 before decrementing 2026-04-28 07:01:42 -07:00
Muki Kiboigo c719a522b8 use lightpanda module log in layers 2026-04-28 07:01:42 -07:00
Muki Kiboigo 152a792c18 use Request Arena in RobotsLayer 2026-04-28 07:01:41 -07:00
Muki Kiboigo e56036fb50 use Request Arena in CacheLayer 2026-04-28 07:01:41 -07:00
Muki Kiboigo fc702794c2 use Request Arena in WebBotAuthLayer 2026-04-28 07:01:41 -07:00
Muki Kiboigo d14b75d93b use Request arnea in InterceptionLayer 2026-04-28 07:01:41 -07:00
Muki Kiboigo bb9e238f6c Requests now use arenas from the arena pool 2026-04-28 07:01:41 -07:00
Muki Kiboigo 175c2cc288 ensure robots params have arena and request id 2026-04-28 07:01:41 -07:00
Muki Kiboigo 87eec578aa use arena pool in InterceptionLayer 2026-04-28 07:01:41 -07:00
Muki Kiboigo 13cc122e26 remove InterceptState 2026-04-28 07:01:40 -07:00
Muki Kiboigo ca08f0c56d remove blocking from RequestParams 2026-04-28 07:01:40 -07:00
Muki Kiboigo 3db3281e8e working authentication with InterceptionLayer 2026-04-28 07:01:40 -07:00
Muki Kiboigo d0b421b085 partial auth challenge support 2026-04-28 07:01:40 -07:00
Muki Kiboigo dddd0dfb90 fix request id mismatch on cdp 2026-04-28 07:01:40 -07:00
Muki Kiboigo 0d50f706db more fixing of hanging in cdp interception 2026-04-28 07:01:40 -07:00
Muki Kiboigo 9c826159a0 crude InterceptionLayer 2026-04-28 07:01:40 -07:00
Muki Kiboigo 6d41ea6fd0 move arena up to Request instead of Transfer 2026-04-28 07:01:39 -07:00
Muki Kiboigo 14ad5c9cdc move RequestStart to InterceptionLayer 2026-04-28 07:01:39 -07:00
Muki Kiboigo e37c14a714 Transfer now uses Request's request_id 2026-04-28 07:01:39 -07:00
Muki Kiboigo e988e49136 remove Context and thread *Client 2026-04-28 07:01:39 -07:00
Muki Kiboigo b4a9bdd7a3 use syncRequest in ScriptManager 2026-04-28 07:01:39 -07:00
Muki Kiboigo 46d0b34c54 add RequestParams and SyncRequest 2026-04-28 07:01:39 -07:00
Muki Kiboigo 5dd15aa2cf use layers for Cache, Robots and WebBotAuth 2026-04-28 07:01:39 -07:00
Pierre Tachoire 86217dd78f Merge pull request #2295 from lightpanda-io/e2e-matrix
ci: create a matrix for e2e tests
2026-04-28 16:00:52 +02:00