Commit Graph

25 Commits

Author SHA1 Message Date
Shannon Booth
cc6e048bd6 LibWeb+LibIDL: Remove support for #import directives during parsing
These no longer serve any purpose now that we run the IDLGenerator
on all of these files at once.
2026-04-24 20:08:29 +02:00
Shannon Booth
fd44da6829 LibWeb/Bindings: Emit one bindings header and cpp per IDL
Previously, the LibWeb bindings generator would output multiple per
interface files like Prototype/Constructor/Namespace/GlobalMixin
depending on the contents of that IDL file.

This complicates the build system as it means that it does not know
what files will be generated without knowledge of the contents of that
IDL file.

Instead, for each IDL file only generate a single Bindings/<IDLFile>.h
and Bindings/<IDLFile>.cpp.
2026-04-21 07:36:13 +02:00
Aliaksandr Kalenik
901cc28272 LibWeb: Reduce recompilation impact of DOM/Document.h
Remove 11 heavy includes from Document.h that were only needed for
pointer/reference types (already forward-declared in Forward.h), and
extract the nested ViewportClient interface to a standalone header.

This reduces Document.h's recompilation cascade from ~1228 files to
~717 files (42% reduction). Headers like BrowsingContext.h that were
previously transitively included see even larger improvements (from
~1228 down to ~73 dependents).
2026-02-11 20:02:28 +01:00
Timothy Flynn
8b10a3a39e LibHTTP: Clean up old cookie code a bit
* Transfer cookie-related enums over IPC as u8, rather than an int
* Use AK's safe ASCII ctype alternatives
* Use SCREAMING_CASE for constants
2026-02-10 12:21:20 +01:00
Timothy Flynn
8d97389038 LibHTTP+Everywhere: Move the cookie implementation to LibHTTP
This will allow parsing cookies outside of LibWeb.

LibHTTP is basically becoming the home of HTTP WG specs.
2026-02-10 12:21:20 +01:00
Timothy Flynn
76eb5b2fa6 LibWeb+LibWebView+WebContent: Perform cookie URL filtering in the UI
When cookies change or expire, we currently send a list of all changed
cookies to all WebContent processes. We then filter that list in the
WebContent process for cookies that match the page's URL before sending
out cookie change events to JS.

We now perform this filtering in the UI process, so each WebContent
process only receives the cookies it would be interested in, if any.
This serves two purposes:

1. Less IPC chatter.
2. This will let each ViewImplementation know that its cookie value has
   actually changed.

(2) is for an upcoming change that will introduce a cookie cache, and
will allow each view to know it should bust that cache.

Note that for this filtering to work, we must iterate ViewImplementation
instances rather than WebContentClient in order to have the view's URL.
We must then associate the IPC with the view's page ID.

No changes to the /cookiestore WPT subtests.
2026-02-01 08:31:58 -05:00
Timothy Flynn
a5cabf341b LibWeb+LibWebView: Extract the cookie-matching spec steps to a helper
These were repeated in the CookieStore, and will be needed again for an
upcoming feature.
2026-01-30 07:36:13 -05:00
Idan Horowitz
73266c8498 LibWeb: Add missing cookie-age-limit steps to CookieStore::set() 2025-08-26 06:28:10 -04:00
Idan Horowitz
e3a5d117a6 LibWeb: Mark CookieChangeEvent's changed and deleted as CachedAttribute
This makes them actually conform to the [SameObject] extended attribute.
2025-08-26 06:28:10 -04:00
ayeteadoe
3df8e00d91 LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
Idan Horowitz
1f1adb6d7e LibWeb+LibURL: Default empty string paths to URL's path in CookieStore 2025-08-17 22:17:36 +02:00
Idan Horowitz
2f61199b01 LibWeb: Rename __hosthttp- to __host-http- in CookieStore 2025-08-17 22:17:36 +02:00
Idan Horowitz
d126b31b92 LibWeb: Consistently trim whitespace from name and value in CookieStore 2025-08-17 22:17:36 +02:00
Timothy Flynn
70db474cf0 LibJS+LibWeb: Port interned bytecode strings to UTF-16
This was almost a no-op, except we intern JS exception messages. So the
bulk of this patch is porting exception messages to UTF-16.
2025-08-14 10:27:08 +02:00
Idan Horowitz
81e3afd1fd LibWeb+LibWebView: Implement emitting CookieChangeEvents 2025-08-08 13:09:58 -04:00
Idan Horowitz
70efa8c1c5 LibWeb: Implement CookieChangeEvent 2025-08-08 13:09:58 -04:00
Idan Horowitz
185f8f7d56 LibWeb: Implement CookieStore::delete(options) 2025-08-08 13:09:58 -04:00
Idan Horowitz
d62fea0340 LibWeb: Implement CookieStore::delete(name) 2025-08-08 13:09:58 -04:00
Idan Horowitz
f724f542ed LibWeb: Implement CookieStore::set(options) 2025-08-08 13:09:58 -04:00
Idan Horowitz
1f37130703 LibWeb: Implement CookieStore::set(name, value) 2025-08-08 13:09:58 -04:00
Idan Horowitz
1328754fb0 LibWeb: Implement CookieStore::getAll(options) 2025-08-08 13:09:58 -04:00
Idan Horowitz
972e4e2cfc LibWeb: Implement CookieStore::get(options) 2025-08-08 13:09:58 -04:00
Idan Horowitz
536158878d LibWeb: Implement CookieStore::getAll(name) 2025-08-08 13:09:58 -04:00
Idan Horowitz
5545d38d7a LibWeb: Implement CookieStore::get(name) 2025-08-08 13:09:58 -04:00
Idan Horowitz
d6c2893663 LibWeb: Add initial CookieStore support 2025-08-08 13:09:58 -04:00