Commit graph

14 commits

Author SHA1 Message Date
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
Luke Wilde
b17783bb10 Everywhere: Change west consts caught by clang-format-21 to east consts 2025-08-29 18:18:55 +01:00
Idan Horowitz
81e3afd1fd LibWeb+LibWebView: Implement emitting CookieChangeEvents 2025-08-08 13:09:58 -04:00
Idan Horowitz
a72a0b3c2d LibWeb+LibWebView: Move RFC6265 helpers to LibWeb
This will make them usable by LibWeb's CookieStore code as well.
2025-08-08 13:09:58 -04:00
Idan Horowitz
5545d38d7a LibWeb: Implement CookieStore::get(name) 2025-08-08 13:09:58 -04:00
Shannon Booth
8794bf568a LibWebView: Remove uneeded URL valdity check in CookieJar
The URL given will always be valid.
2025-04-19 07:18:43 -04:00
Timothy Flynn
ee6b2db009 AK+LibURL+LibWeb: Use simdutf to validate ASCII strings
simdutf provides a vectorized ASCII validator, so let's use that instead
of looping over strings manually.
2025-04-06 11:05:58 -04:00
Luke Wilde
f3f51f2547 LibWebView: Consider wss a secure scheme for Secure cookies 2025-01-21 21:36:05 +01:00
rmg-x
dc34aeb764 LibWebView: Add method to remove all cookies globally
The inspector widget has this functionality, but it's limited to the
site you're currently viewing. This commit adds an option for removing
all cookies globally.

Previously, the workaround was to open a sqlite shell and run:
`DELETE FROM Cookies;` on the database yourself.
2025-01-05 13:58:27 +00:00
Jonne Ransijn
d7596a0a61 AK: Don't implicitly convert Optional<T&> to Optional<T>
C++ will jovially select the implicit conversion operator, even if it's
complete bogus, such as for unknown-size types or non-destructible
types. Therefore, all such conversions (which incur a copy) must
(unfortunately) be explicit so that non-copyable types continue to work.

NOTE: We make an exception for trivially copyable types, since they
are, well, trivially copyable.

Co-authored-by: kleines Filmröllchen <filmroellchen@serenityos.org>
2024-12-04 01:58:22 +01:00
Sam Atkins
900c131178 LibURL: Make URL::serialized_host() infallible
This can no longer fail, so update the return type to match.

This makes a few more methods now unable to return errors, but one thing
at a time. 😅
2024-11-30 12:07:39 +01:00
Sam Atkins
90e763de4c LibURL: Replace Host's Empty state with making Url's Host optional
A couple of reasons:
- Origin's Host (when in the tuple state) can't be null
- There's an "empty host" concept in the spec which is NOT the same as a
  null Host, and that was confusing me.
2024-11-30 12:07:39 +01:00
Sam Atkins
3124dca528 LibURL+LibWebView: Move public suffix data to LibURL 2024-11-30 12:07:39 +01:00
Timothy Flynn
93712b24bf Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Renamed from Userland/Libraries/LibWebView/CookieJar.cpp (Browse further)