Commit Graph
9126 Commits
Author SHA1 Message Date
Muki Kiboigo 5ab8c121e9 pass body bytes or throw error in fetch init 2026-09-02 07:09:27 -07:00
Muki Kiboigo 9d98901d17 resolve ReadableStream into bytes at consumption time 2026-09-02 07:06:47 -07:00
Karl Seguin 91187e9483 Merge pull request #3381 from lightpanda-io/canvas-measure-text
webapi: canvas measureText and the drawing methods chart libraries probe
2026-09-02 15:15:41 +08:00
Karl Seguin 195e240c9d Add buffers to Context2D state to minimize allocations
RC TextMetrics

Share more state between CanvasRenderingContext2D and Offscreen
2026-09-02 14:51:15 +08:00
Karl Seguin 235d10c6b5 Merge pull request #3373 from lightpanda-io/streams-queuing-strategies
webapi: CountQueuingStrategy and ByteLengthQueuingStrategy
2026-09-02 12:37:03 +08:00
Karl Seguin fceec923fc Merge pull request #3382 from lightpanda-io/http-keepalive-maxconnects
http: keep connections alive across navigations
2026-09-02 11:53:31 +08:00
Karl Seguin 10c6f553c8 fix copyright date, improve js parameter mapping 2026-09-02 11:00:22 +08:00
Adrià Arrufat a8ff1c6c91 webapi: CountQueuingStrategy and ByteLengthQueuingStrategy
Both globals were missing, so MDN-canonical stream setup code threw
ReferenceError. size() is a method rather than an accessor returning a
function; the streams don't consume it yet.
2026-09-02 11:00:22 +08:00
Karl Seguin c85208a3be zig fmt 2026-09-02 11:00:04 +08:00
Karl Seguin 1b50e235d5 Set max_connect based on config.httpMaxConcurrent()
This is per multi. So the original suggested 128 could result in 2048 idle
connection with 10 CDP connections.
2026-09-02 11:00:04 +08:00
Adrià Arrufat 39bd76e079 http: keep connections alive across navigations
CURLMOPT_MAXCONNECTS was never set, so libcurl used its default of 4x the
number of easy handles currently attached to the multi. Handles are added
and removed per transfer, so between page loads that default collapses to
roughly zero and every cached connection is evicted: revisiting a host
after browsing elsewhere re-paid connect + TLS every time.

Measured over 25 navigations across 5 sites (5 rounds, ReleaseFast), median
warm navigation drops from 0.73s to 0.42s on news.ycombinator.com and from
0.71s to 0.42s on github.com; total navigation time 11.1s -> 7.3s. Loading
one host repeatedly was already fast and is unchanged; the win is on
cross-site browsing, which is what agents and crawlers actually do.
2026-09-02 11:00:04 +08:00
Karl Seguin 2745d8510a Merge pull request #3388 from lightpanda-io/tests-no-watchdog
ci: disable watchdog during tests to reduce flake
2026-09-02 10:55:45 +08:00
Karl Seguin 2817922305 ci: disable watchdog during tests to reduce flake 2026-09-02 10:41:46 +08:00
Karl Seguin d7c70b0b60 Merge pull request #3386 from lightpanda-io/ci-orderfile-2
ci: regenerate orderifle
2026-09-02 10:00:29 +08:00
Karl Seguin fe3a491d22 ci: regenerate orderifle
remove auto orderfile generation, too much hassle.

Manually regenerate the two orderfiles. Change it to use newlines so the diff
is better.
2026-09-02 09:44:25 +08:00
Karl Seguin 2474a2c2bc Merge pull request #3368 from lightpanda-io/window-stop
webapi: window.stop()
2026-09-02 09:06:07 +08:00
Karl Seguin 9bbabfe92a Merge pull request #3364 from lightpanda-io/owner-consolidation
chore: Simplify making HTTP requests.
2026-09-02 09:03:00 +08:00
Karl Seguin 9df492b453 Merge pull request #3385 from lightpanda-io/ci-orderfile-2
strip spacing in captured output
2026-09-02 08:18:36 +08:00
Karl Seguin ed88bd763f complete merge 2026-09-02 08:17:15 +08:00
Karl Seguin 537ea4d890 strip spacing in captured output 2026-09-02 08:04:39 +08:00
Karl Seguin e25d2da0c0 chore: Simplify making HTTP requests.
If you look at https://github.com/lightpanda-io/browser/pull/3293, you'll see
a relatively contained change that has to touch over 20 files. The issue is that
every HttpClient.newRequest needs to provide a lot of data. But `newRequest`
takes a 2nd parameter: the HttpClient.Owner. If we make that Owner a little
smarter, we can start to remove some of the individual fields needed in
newRequest. For example, we can still allow a callsite to pass frame_id but,
by default, we can use the owner's frame_id (which is what we want in most
cases).
2026-09-02 07:55:53 +08:00
Karl Seguin eea50fe98a Merge pull request #3293 from lightpanda-io/nikneym/samesite-strict-bypass
compute site-for-cookies from ancestor chain of a `Frame`
2026-09-02 07:54:24 +08:00
Karl Seguin 5e42a253e1 Merge pull request #3372 from lightpanda-io/html-contenteditable-reflect
webapi: reflect HTMLElement.contentEditable
2026-09-02 07:29:40 +08:00
Karl Seguin 07198b71ff fix comments 2026-09-02 07:28:25 +08:00
Halil Durak add8a8c003 Cookie: getter/setter changes for site-for-cookies
Also updates matchCookies/onCookieChanged from the hard-coded "same-site + navigation" to areSameSite(exec.siteForCookies(), host) and is_navigation=false.
2026-09-02 07:19:39 +08:00
Halil Durak 9ddf6ad02a Worker: inherit site-for-cookies from the creating document 2026-09-02 07:19:39 +08:00
Halil Durak 87308b5e23 compute site-for-cookies from ancestor chain of a Frame
The site for cookies were computed from the immediate parent `Frame`, which would allow sending a cookie that's `SameSite=Strict` from 2 levels deep under. Directly from RFC6265bis, this PR essentially implements (except for step 4, we skip host-less ancestors):

   Given a Document (document), the following algorithm returns its
   "site for cookies":

   1.  Let top-document be the active document in document's navigable's
       top-level traversable.

   2.  Let top-origin be the origin of top-document's URI if top-
       document's sandboxed origin browsing context flag is set, and
       top-document's origin otherwise.

   3.  Let documents be a list consisting of the active documents of
       document's inclusive ancestor navigables.

   4.  For each item in documents:

       1.  Let origin be the origin of item's URI if item's sandboxed
           origin browsing context flag is set, and item's origin
           otherwise.

       2.  If origin is not same-site with top-origin, return an origin
           set to an opaque origin.

   5.  Return top-origin.
2026-09-02 07:19:35 +08:00
Karl Seguin eb9d12205e Merge pull request #3384 from lightpanda-io/ci-orderfile-2
CI permission tweak
2026-09-02 07:16:49 +08:00
Karl Seguin 3befda2acc Merge pull request #3360 from lightpanda-io/indexeddb-better-errors
indexeddb: Improve error handling
2026-09-02 07:13:24 +08:00
Karl Seguin 0b3e75ca08 Merge pull request #3361 from lightpanda-io/cdp-urlpattern
cdp: support request interception patterns
2026-09-02 07:13:02 +08:00
Karl Seguin b852b7b89a Merge pull request #3380 from lightpanda-io/RenderTree
chore: Extract common Markdown/Screenshot logic
2026-09-02 07:12:29 +08:00
Karl Seguin 4df0b5e5a3 Merge pull request #3374 from lightpanda-io/webapi-small-accessors
webapi: Headers.getSetCookie, customElements.getName, Element.part
2026-09-01 19:11:58 +08:00
Karl Seguin 41ae39789b zig fmt 2026-09-01 18:52:58 +08:00
Karl Seguin 96de22fc0a webapi: enhance header to block forbidden response headers 2026-09-01 18:51:39 +08:00
Karl Seguin d663afc0ee Merge pull request #3379 from lightpanda-io/input-value-as
webapi: input valueAsNumber, valueAsDate, stepUp/stepDown, showPicker
2026-09-01 18:43:32 +08:00
Karl Seguin 83b3b21a34 CI permission tweak 2026-09-01 18:40:55 +08:00
Karl Seguin 40fb080509 Merge pull request #3370 from lightpanda-io/svg-ctm
webapi: SVGGraphicsElement.getCTM and getScreenCTM
2026-09-01 18:13:54 +08:00
Karl Seguin 6f92ef4a4f Merge pull request #3362 from lightpanda-io/ci-orderfile
CI: Weekly orderfile generation + PR
2026-09-01 18:10:06 +08:00
Adrià Arrufat 20ac0baa99 webapi: match browsers for step, time strings, empty patterns and tooLong
Checked the three test files in Firefox and Chrome:
- stepUp/stepDown use the HTML step base (min, else the value attribute)
  and snap off-ladder values to the next rung, counting the snap as the
  first step as browsers do; clamping lands on the last rung inside
  min/max.
- time strings keep a three-digit fraction.
- an empty pattern attribute is a pattern (matches only "").
- tooLong/tooShort only for values last changed by a user edit, so the
  text-entry path marks the value and script/attribute values never trip
  them; same for textarea.
- showPicker dropped: browsers throw NotAllowedError without a gesture,
  a no-op would be a lie.
- month/week assertions skipped where the browser has no such input.
2026-09-01 12:09:49 +02:00
Karl Seguin ddb0dc09b9 Merge pull request #3377 from lightpanda-io/image-decode
webapi: img.decode()
2026-09-01 17:21:23 +08:00
Karl Seguin 9d2b3cf456 Merge pull request #3376 from lightpanda-io/disabled-fieldset-state
webapi: a disabled fieldset disables its controls' activation and validation
2026-09-01 17:21:12 +08:00
Karl Seguin 17dde356f4 add option and optgroup to controls we need to check disabled on 2026-09-01 17:05:55 +08:00
Karl Seguin 8e9ecb4a64 Merge pull request #3375 from lightpanda-io/option-selected-single
webapi: option.selected = true deselects its siblings in a single select
2026-09-01 16:56:46 +08:00
Karl Seguin 512d2269b8 Merge pull request #3369 from lightpanda-io/navigator-sendbeacon-returns
webapi: navigator.sendBeacon returns true
2026-09-01 16:45:25 +08:00
Adrià Arrufat cb8ad6faa6 webapi: canvas measureText and the drawing methods chart libraries probe
measureText was missing and roundRect, ellipse, setLineDash, gradients,
patterns, isPointInPath and the shadow/filter properties threw, so
Chart.js, D3 and ApexCharts died at init. Widths come from the
deterministic text model in text_measure.zig; nothing is painted.
2026-09-01 10:41:41 +02:00
Karl Seguin c564e4e2db chore: Extract common Markdown/Screenshot logic
https://github.com/lightpanda-io/browser/pull/3333 improved markdown rendering
for flexbox items. But screenshot generation didn't benefit from that change.
This commit introduces a RenderTree that extracts and shares functionality
between markdown and screenshots.
2026-09-01 16:37:32 +08:00
Adrià Arrufat 396ec5fe18 webapi: input valueAsNumber, valueAsDate, stepUp/stepDown, showPicker
react-hook-form and date pickers read valueAsNumber/valueAsDate and got
undefined. The date types convert through the existing validators; the
same conversion now also drives min/max range validation for
date/time/month/week/datetime-local, which only number/range had.
2026-09-01 10:36:54 +02:00
Adrià Arrufat db64ced3fb webapi: img.decode()
Missing, so Next.js <Image> and React lazy images threw TypeError. No
decoding happens, so it resolves once the element exists.
2026-09-01 10:21:57 +02:00
Adrià Arrufat 33befd7caf webapi: a disabled fieldset disables its controls' activation and validation
click(), willValidate and the WebDriver click read only the control's own
attribute. They now use Element.isDisabled, which already walks fieldset
ancestors with the first-legend exception for :disabled. The disabled IDL
attribute keeps reflecting the attribute alone, per spec.
2026-09-01 10:21:20 +02:00
Adrià Arrufat 68e11c57f2 webapi: option.selected = true deselects its siblings in a single select
Two options ended up selected and select.value reported the stale one;
form-filling agents got silently wrong data.
2026-09-01 10:20:06 +02:00