Commit Graph
13 Commits
Author SHA1 Message Date
Karl Seguin 2e6999f20b chore: make declarations private if they don't need to be public
This change is 99%  s/pub//   + a handful of dead code removal.
2026-09-10 14:42:09 +08:00
Muki Kiboigo 8a8bb3814f fix test running 2026-09-04 07:00:01 -07:00
Muki Kiboigo 1fe8456cbd add modes to the tests 2026-09-04 07:00:01 -07: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
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
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 21856170e3 single lookup for SingleFlight pending 2026-08-13 08:20:14 -07:00
Muki Kiboigo 4ed60ffc90 use reference to http client in SingleFlight tests 2026-08-13 01:37:19 -07:00
Muki Kiboigo d3a1dd77f2 use test_browser http client in SingleFlight tests 2026-08-13 00:30:30 -07:00
Muki Kiboigo bb8b46145f get rid of SingleFlight abort 2026-08-13 00:26:14 -07:00
Muki Kiboigo f7e6464370 SingleFlight should own the key 2026-08-13 00:25:33 -07:00
Muki Kiboigo 7593eb5af7 add SingleFlight component 2026-08-12 18:04:02 -07:00