Commit graph

13 commits

Author SHA1 Message Date
Andreas Kling
6f433c8656 LibWeb+LibJS: Make the EventTarget hierarchy (incl. DOM) GC-allocated
This is a monster patch that turns all EventTargets into GC-allocated
PlatformObjects. Their C++ wrapper classes are removed, and the LibJS
garbage collector is now responsible for their lifetimes.

There's a fair amount of hacks and band-aids in this patch, and we'll
have a lot of cleanup to do after this.
2022-09-06 00:27:09 +02:00
Idan Horowitz
086969277e Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Linus Groh
cd6896d343 LibWeb: Convert URL to use TRY for error propagation 2022-03-22 18:05:25 +00:00
Andreas Kling
ba0c907a6f LibWeb: Make the URL.port setter return after assigning the empty string
This matches the spec ("3. Otherwise, ...")
2021-10-03 21:31:46 +02:00
Idan Horowitz
ed5128d759 LibWeb: Add the URL::{protocol, pathname, search, hash} attributes 2021-09-14 00:14:45 +02:00
Idan Horowitz
7f9818bcbc LibWeb: Add the URL::host, URL::hostname & URL:port attributes 2021-09-14 00:14:45 +02:00
Idan Horowitz
e89320887e LibWeb: Add the URL::username, URL::password & URL::origin attributes 2021-09-14 00:14:45 +02:00
Idan Horowitz
fe32c9c3bd LibWeb: Add the URL::searchParams attribute 2021-09-14 00:14:45 +02:00
Idan Horowitz
1841fbd3e4 LibWeb: Add the URL::href attribute and URL::to_json method 2021-09-14 00:14:45 +02:00
Idan Horowitz
e6abc1b44e LibWeb: Add a bare implementation of the URL built-in
This only has the constructor implemented for now.
2021-09-14 00:14:45 +02:00
Idan Horowitz
af5b62d8cd LibWeb: Move url_{encode, decode} to URL/URLSearchParams.{h, cpp}
The new URL built-in that will reside in URL.{h, cpp} will have an
URLSearchParams member, which means it has to include its header, and
as such URLSearchParams.h can't include URL's header, which it needs as
it uses the url_{encode, decode} functions.
2021-09-14 00:14:45 +02:00
Idan Horowitz
de19dcf81a LibWeb: Add URL::url_decode for decoding form url encoded parameters 2021-09-13 01:43:10 +02:00
Idan Horowitz
4629f2e4ad LibWeb: Add the Web::URL namespace and move URLEncoder to it
This namespace will be used for all interfaces defined in the URL
specification, like URL and URLSearchParams.

This has the unfortunate side-effect of requiring us to use the fully
qualified AK::URL name whenever we want to refer to the AK class, so
this commit also fixes all such references.
2021-09-13 01:43:10 +02:00