Commit Graph

9 Commits

Author SHA1 Message Date
Shannon Booth
a0d4344d4e Tests/LibWeb: Import some more webstorage WPT tests
Which were helpful in determining property behaviour for the Storage
object.
2026-02-16 18:49:15 +01:00
Shannon Booth
57339a21a1 Tests/LibWeb: Import a WPT test for storage enumeration
Unfortunately the localStorage portion of this test is manually
disabled here as it is inherently racey with other localStorage
tests in the suite.
2026-02-01 08:35:36 -05:00
Shannon Booth
c6fab541b7 LibWeb: Fix storage set broadcast event never broadcasting old value
We had skipped some steps in the spec and were:
 * Always broadcasting an old value of null, instead of what it
   actually was previously.
 * Still broadcasting a storage event even if the value had
   not changed in storage compared to the last value.

Fix both issues by returning what the old value is in the setter and
implementing the missing logic.
2026-01-21 22:27:59 +01:00
Shannon Booth
2a8b83a568 LibWeb/WebIDL: Upgrade QuotaExceededError to its own interface
See https://github.com/whatwg/webidl/commit/48eba6d
2025-12-29 17:15:11 +01:00
Shannon Booth
c63e77142a Tests/LibWeb: Import webstorage symbol-props WPT test
I noticed a subtest in this test failing along with every
other browser. After investigation, the failure was due
to testing the previous specification before:

https://github.com/whatwg/webidl/commit/3fb6ab4

So this imports the now adjusted WPT test as of:

https://github.com/web-platform-tests/wpt/commit/bb3f032
2025-07-03 12:45:31 +01:00
Tim Ledbetter
689dff3ee8 Tests: Synchronize imported tests with the WPT repository 2025-06-22 23:51:34 +02:00
Shannon Booth
2066ed2318 LibWeb: Correctly initialize Storage objects on the Document
Instead of storing all storage objects in static memory, we now
follow the the spec by lazily creating a unique Storage object
on each document object.

Each Storage object now holds a 'proxy' to the underlying backing
storage. For now, this proxy is simply a reference to the backing
object. In the future, it will need to be some type of interface
object that stores on a SQLite database or similar.

Session storage is now correctly stored / tracked as part of the
TraversableNavigable object.

Local storage is still stored in a static map, but eventually this
should be factored into something that is stored at the user agent
level.
2025-01-02 11:31:15 +01:00
Shannon Booth
f3ecd23a21 LibWeb/HTML: Enforce quota limit for local and session storage
Fixes a timeout/crash for the two commited WPT tests.
2025-01-02 11:31:15 +01:00
Shannon Booth
f3e92f2ae5 LibWeb/HTML: Implement the StorageEvent interface 2024-12-25 11:57:14 +01:00