Commit graph

5 commits

Author SHA1 Message Date
Sam Atkins
cb47dbfc7a LibDevTools+LibWeb: Show IndexedDB in DevTools
Firefox asks the storage watcher for an indexed-db resource before it
shows IndexedDB entries in the Storage panel. Add an IndexedDB actor and
serialize the live LibWeb database registry on demand, so WebContent can
return the host tree and table rows without duplicating database state.

Use the LibWeb inspection helpers to read IndexedDB internals, and keep
the Firefox protocol shape in LibDevTools. WebContent only forwards the
serialized response over the existing DevTools IPC path.
2026-06-19 14:25:39 +02:00
Sam Atkins
a3e85ada85 LibDevTools: Share storage field descriptor creation
Storage actors all describe table columns with the same DevTools field
object shape. Extract a helper for constructing those objects so that
cookies, local storage, session storage, and soon IndexedDB, do not each
spell out the JSON fields by hand.
2026-06-19 14:25:39 +02:00
Sam Atkins
5b5f848689 LibDevTools: Make ErrorOr -> JsonValue helpers public
We want these for local/session storage too, so avoid duplicating them.
2026-06-11 16:08:33 +01:00
Sam Atkins
20f922cbdb LibWebView+LibDevTools: Populate DevTools cookies
Firefox asks the cookies actor for rows after selecting a Storage host.
Read the browser cookie jar through the DevTools delegate and serialize
matching cookies with the fields Firefox expects.

This keeps mutation support disabled, but makes existing cookies visible
in the Storage panel.
2026-06-11 15:03:47 +01:00
Sam Atkins
deec1ec2c3 LibDevTools: Add cookie storage actor
Firefox discovers Storage panel data through watcher resources. This
adds a read-only cookies actor with the fields and empty store response
expected by the Storage panel.

Mutation traits are reported as unsupported for now.

DevTools storage resources all have a "host" key derived from the URL,
which we produce in `storage_host_for_url()`.
2026-06-11 15:03:47 +01:00