Commit graph

7 commits

Author SHA1 Message Date
Timothy Flynn
48aa16d74b LibWebView: Add methods to remove cookies / WebStorage items
This allows removing cookies and local/session storage items last
accessed since a provided timestamp.
2025-11-12 09:06:21 -05:00
Timothy Flynn
c2c269814a LibWebView: Add methods to estimate cookie / WebStorage sizes 2025-11-12 09:06:21 -05:00
Timothy Flynn
23fb68b5a4 LibWebView: Add last access time to the WebStorage database
This will be used to delete entries accessed since a user-provided time.
2025-11-12 09:06:21 -05:00
Timothy Flynn
8a656e1232 LibWebView: Add a metadata table to track WebStorage schema changes
We will soon need to add a column to the WebStorage table. We cannot
blindly issue an ALTER TABLE statement, as that will fail once the
column already exists. The colloquial way to do this is to track a
schema version, then handle version changes explicitly.
2025-11-12 09:06:21 -05:00
Timothy Flynn
0fd1c2af09 LibWebView: Organize StorageJar a little bit
Basically, just define methods in the order they are declared. A bit
easier to read, rather than jumping around.
2025-11-12 09:06:21 -05:00
Timothy Flynn
187d02c45d LibDatabase+LibWebView: Extract our SQLite wrapper to its own library
It currently lives in LibWebView as it was only used for cookies and
local storage, both of which are managed in the UI process. Let's move
it to its own library now to allow other processes to use it, without
having to depend on LibWebView (and therefore LibWeb).
2025-10-14 13:40:33 +02:00
Aliaksandr Kalenik
84b9224121 Everywhere: Implement persistence of localStorage using sqlite
This change follows the pattern of our cookies persistence
implementation: the "browser" process is responsible for interacting
with the sqlite database, and WebContent communicates all storage
operations via IPC.

The new database table uses (storage_endpoint, storage_key, bottle_key)
as the primary key. This design follows concepts from the
https://storage.spec.whatwg.org/ and is intended to support reuse of the
persistence layer for other APIs (e.g., CacheStorage, IndexedDB). For
now, `storage_endpoint` is always "localStorage", `storage_key` is the
website's origin, and `bottle_key` is the name of the localStorage key.
2025-06-12 17:04:35 +02:00