Commit Graph
8385 Commits
Author SHA1 Message Date
Halil Durak af45e00a94 Mime: move ContentTypeIterator to Mime 2026-07-29 12:51:47 +03:00
Halil Durak af143e82d0 body_init: remove dead code 2026-07-29 12:51:47 +03:00
Halil Durak 4dfb365d2b change how we identify and parse FormData in Request and Response 2026-07-29 12:51:46 +03:00
Halil Durak 69c05031fd simd: update tests 2026-07-29 12:51:46 +03:00
Halil Durak 7ed9ac2cdb simd: add ContentTypeIterator type
Allows parsing `Content-Type` header value with ease.
2026-07-29 12:51:46 +03:00
Halil Durak 4d612b7517 simd: remove dead parseHttpHeaders function 2026-07-29 12:51:45 +03:00
Halil Durak 34de819aca update tests 2026-07-29 12:51:45 +03:00
Halil Durak da417dd126 Response: add Response#formData 2026-07-29 12:51:45 +03:00
Halil Durak 03b1e611bd update tests 2026-07-29 12:51:45 +03:00
Halil Durak 50d942f807 Request: add Request#formData 2026-07-29 12:51:44 +03:00
Halil Durak 0c93b50748 FormData: introduce new ways to create FormData objects
Adds `initFromUrlEncoded` and `initFromMultipart`; which are required for `Request#formData`.
2026-07-29 12:51:44 +03:00
Halil Durak e3fbd745a7 introduce simd.zig
Idea is to have reusable parsing utilities here; not sure on the name, we can surely go for something else.
2026-07-29 12:51:44 +03:00
Halil Durak 07f7366d73 FormData: add parseUrlEncoded
Introduces another url decoder also, we may like to unite these at some point.
2026-07-29 12:51:44 +03:00
Karl Seguin 5bbec625d0 Merge pull request #3068 from lightpanda-io/node-children-design
mem: optimize node child list
2026-07-29 06:45:51 +08:00
Karl Seguin 53ad5f53f6 Merge pull request #3067 from lightpanda-io/dead-imports
chore: remove unused imports
2026-07-29 06:45:30 +08:00
Karl Seguin 0c32de315f Merge pull request #3066 from lightpanda-io/svg-cleanup
webapi: SVG cleanup
2026-07-29 06:45:15 +08:00
Karl Seguin 1414a7d549 Merge pull request #3072 from staylor/fix/htmlcollection-indexed-walk
Keep ascending live collection reads linear
2026-07-28 19:46:14 +08:00
Adrià Arrufat c9f7a11e42 Merge pull request #3073 from lightpanda-io/agent-tool-cap
agent: reduce tool output cap to 64KB except for extract
2026-07-28 09:44:39 +02:00
Adrià Arrufat a2e8ce8f50 agent: reduce tool output cap to 64KB except for extract 2026-07-28 09:17:34 +02:00
Scott Taylor 90ce6cc8d5 Keep ascending live collection reads linear
Assisted-By: devx/c039aa47-6c81-41c4-bd11-6e6cb835334c
2026-07-27 23:49:48 -04:00
Karl Seguin 3bf98a33fd mem: optimize node child list
Reworks how a Node's child list is modeled. This used to be a optional pointer
to the child list, along with a Node representing this node's linkedlist node
in the parent's child list.

The new model is the same 24 bytes, but it's fully embedded: nodes with children
don't require another 16 byte allocation.

Generally speaking, this is more linked-list-ish, so it does simplify the code.
`linkToNode` is removed BUT, the first child's `_prev` points to the last child,
which is a bit unusual but necessary so that `lastChild` remains O(1).
2026-07-28 10:39:49 +08:00
Karl Seguin a67fe9f90a chore: remove unused imports 2026-07-28 09:39:02 +08:00
Karl Seguin 5fe387a46a Merge pull request #3065 from lightpanda-io/remove-sendMessageToTarget-assertion
crash: remove Target.sendMessageToTarget session_id assertion
2026-07-28 09:23:51 +08:00
Karl Seguin f02d73e978 Merge pull request #3063 from lightpanda-io/js-error-metrics
metrics: Add JS error count
2026-07-28 09:20:54 +08:00
Karl Seguin 2312972097 Merge pull request #3062 from lightpanda-io/remove-session-injection
chore: remove Session injection code (nothing is using it)
2026-07-28 09:20:38 +08:00
Karl Seguin cc33bb38d1 Merge pull request #3061 from lightpanda-io/consistent-clocks
chore: make our use of clock/timestamp more consistent
2026-07-28 09:20:18 +08:00
Karl Seguin b7b910cae5 Merge pull request #3060 from lightpanda-io/unmanaged-memory-pool
chore: Replace deprecated MemoryPool with Managed Memory Pool
2026-07-28 09:19:55 +08:00
Karl Seguin 738ff60b57 webapi: SVG cleanup
This is a follow up to the large SVG change that has landed (1). Most changes
are mechanical or superficial (proper license headers, removing "pub" where not
needed, ...). But there were also a few finalizer/arena tweaks to tighten
lifetimes.

(1) https://github.com/lightpanda-io/browser/pull/3012
2026-07-28 09:17:28 +08:00
Adrià Arrufat 8b34853629 Merge pull request #3064 from lightpanda-io/translate-c
Replace @cImport with build-system translateC
2026-07-27 20:06:28 +02:00
Karl Seguin 470c0ef782 Merge pull request #3032 from mh0pe/codex/svg-07-text
webapi: add dependency-free SVG text DOM
2026-07-27 21:58:43 +08:00
Karl Seguin 700dfe5b74 count in utf-16, like a browser 2026-07-27 20:27:51 +08:00
Madison Steiner 5e6395c6ad webapi: add dependency-free SVG text DOM 2026-07-27 19:59:08 +08:00
Karl Seguin 1e6cd4f4bf Merge pull request #3029 from mh0pe/codex/svg-06-resources
webapi: add live SVG resource elements
2026-07-27 19:56:23 +08:00
Karl Seguin 51d63098fd Fix license header
more consistent formatting. More consistent results with Chrome
2026-07-27 19:37:34 +08:00
Madison Steiner bb063c77bd webapi: add live SVG resource elements 2026-07-27 19:06:05 +08:00
Karl Seguin 708835b08b crash: remove Target.sendMessageToTarget session_id assertion
closeTarget above implies that the state this assertion guards against IS valid
AND we just had a crash report confirming. That's enough for me to remove it.
2026-07-27 18:56:29 +08:00
Karl Seguin 302fc79a59 Merge pull request #3031 from mh0pe/codex/svg-05-structure
webapi: add SVG structural elements
2026-07-27 18:56:06 +08:00
Karl Seguin 00a0517df3 Add correct license header
Format / consistency with rest of the codebase
2026-07-27 18:36:51 +08:00
Madison Steiner 0648da895c webapi: add SVG structural elements 2026-07-27 18:13:13 +08:00
Adrià Arrufat cbce632401 Replace @cImport with build-system translateC
Zig 0.17 removes @cImport in favor of translate-c steps in the build
system. Each library's link function now creates an addTranslateC step
exposed as a module import: curl and isocline translate their headers
straight from the dependency tree, while sqlite3 uses the artifact's
emitted include tree since the amalgamation lives in a sub-dependency.

Terminal.zig and prompt_assist.zig previously instantiated two
independent @cImport namespaces for isocline; they now share one
translated module, so its types are identical across both files.
2026-07-27 12:07:28 +02:00
Karl Seguin 3a84a83d8c Merge pull request #3033 from mh0pe/codex/svg-04-geometry
webapi: implement SVG geometry
2026-07-27 18:04:44 +08:00
Karl Seguin b364a8d487 metrics: Add JS error count
This isn't exhaustive, but it covers _most_ cases where we call v8 (and the
most important ones, e.g. from ScriptManager and EventManager).

There's also a Page counter which, in the future, I'd like to expose in some way
such as via a custom cdp command or in a fetch --dump json to provide insight
on the "health" of the page/result.
2026-07-27 18:04:14 +08:00
Karl Seguin 952a860119 Add re-usable buffer (instead of frame.arena) to limit memory usage
Fix PathData.zig flatness bug.

Ensure tests pass on Chrome, and match implementation to that
2026-07-27 17:27:06 +08:00
Madison Steiner 2e89b805fc webapi: implement SVG geometry 2026-07-27 13:48:18 +08:00
Karl Seguin 5790670ec0 chore: remove Session injection code (nothing is using it) 2026-07-27 13:46:12 +08:00
Karl Seguin 8a256f59e0 Merge pull request #3030 from mh0pe/codex/svg-03-collections
webapi: add live SVG collections
2026-07-27 13:02:50 +08:00
Karl Seguin e50c3e9a3b Align with Chrome/Firefox
1 - Split out test to have more granular units
2 - Try to make our test and implementation consistent with Chrome and Firefox
    - Chrome and Firefox diverge here in a lot of ways (e.g. serialization),
      and there isn't always a WPT tests to break the tie.
3 - Removed some defensive code around OOM. OOM isn't generally recoverable
4 - SVGTransform no longer pretends to be 3D. #D writes drop the z/w component
    and stays SVG_TRANSFORM_MATRIX

Small improvement to WPT correctness with no regression (though, the WPT tests
here seem to be a little lacking from what I can tell, which probably helps
explain why Chrome and Firefox disagree on things).
2026-07-27 12:26:30 +08:00
Karl Seguin dcb98853b9 chore: make our use of clock/timestamp more consistent
Zig 0.16 changed clocks/timestamps. Our migration to Zig 0.16 took the path of
least resistance. For example, we kept 'monotonic' and 'real' even though Zig
0.16 renamed them to 'boot' and 'clock'

This commit tries to standardize all timestamp usage to: lp.datetime.timestamp
and lp.datetime.milliTimestamp using the new zig 0.16 names ('boot' and 'clock')
2026-07-27 09:28:48 +08:00
Karl Seguin 6716f1c12a chore: Replace deprecated MemoryPool with Managed Memory Pool 2026-07-27 07:56:30 +08:00
Madison Steiner 391993807d svg: make string list updates transactional 2026-07-26 11:58:11 -07:00