summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/URL
AgeCommit message (Collapse)Author
2022-10-30LibWeb: Implement 'host is domain' concept from the URL specLinus Groh
2022-10-29LibWeb: Use StringView literals for all `WebIDL::SimpleException`sLinus Groh
2022-10-24LibWeb: Move url_origin() to URL/URL.{cpp,h}Linus Groh
2022-10-09LibWeb: Add Exposed attribute and IDL spec links where missingAndrew Kaster
The intent is to use these to autogenerate prototype declarations for Window and WorkerGlobalScope classes. And the spec links are just nice to have :^)
2022-10-01LibWeb: Remove unecessary dependence on Window from assorted classesAndrew Kaster
These classes only needed Window to get at its realm. Pass a realm directly to construct Crypto, Encoding, HRT, IntersectionObserver, NavigationTiming, Page, RequestIdleCallback, Selection, Streams, URL, and XML classes.
2022-09-25LibWeb: Move ExceptionOr from DOM/ to WebIDL/Linus Groh
This is a concept fully defined in the Web IDL spec and doesn't belong in the DOM directory/namespace - not even DOMException, despite the name :^)
2022-09-21LibWeb: Remove WRAPPER_HACK() macroLinus Groh
We no longer access Bindings::FooWrapper anywhere for a Foo platform object, so these can be removed :^)
2022-09-06LibWeb: Remove now-unused Bindings::Wrappable classAndreas Kling
2022-09-06LibWeb: Make URL, URLSearchParams & URLSearchParamsIterator GC-allocatedAndreas Kling
2022-09-06LibWeb+LibJS: Make the EventTarget hierarchy (incl. DOM) GC-allocatedAndreas Kling
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-08-23LibJS+LibWeb: Reduce use of GlobalObject as an intermediaryLinus Groh
- Prefer VM::current_realm() over GlobalObject::associated_realm() - Prefer VM::heap() over GlobalObject::heap() - Prefer Cell::vm() over Cell::global_object() - Prefer Wrapper::vm() over Wrapper::global_object() - Inline Realm::global_object() calls used to access intrinsics as they will later perform a direct lookup without going through the global object
2022-08-23LibWeb: Replace GlobalObject with Realm in wrapper functionsLinus Groh
Similar to create() in LibJS, wrap() et al. are on a low enough level to warrant passing a Realm directly instead of relying on the current realm from the VM, as a wrapper may need to be allocated while no JS is being executed.
2022-08-23LibJS: Replace GlobalObject with VM in Iterator AOs [Part 7/19]Linus Groh
2022-08-23LibJS+LibWeb: Replace GlobalObject with Realm in create() functionsLinus Groh
This is a continuation of the previous two commits. As allocating a JS cell already primarily involves a realm instead of a global object, and we'll need to pass one to the allocate() function itself eventually (it's bridged via the global object right now), the create() functions need to receive a realm as well. The plan is for this to be the highest-level function that actually receives a realm and passes it around, AOs on an even higher level will use the "current realm" concept via VM::current_realm() as that's what the spec assumes; passing around realms (or global objects, for that matter) on higher AO levels is pointless and unlike for allocating individual objects, which may happen outside of regular JS execution, we don't need control over the specific realm that is being used there.
2022-07-18LibWeb: Mark URLSearchParams::to_string() as constKenneth Myhra
2022-07-06AK: Use an enum instead of a bool for String::replace(all_occurences)DexesTTP
This commit has no behavior changes. In particular, this does not fix any of the wrong uses of the previous default parameter (which used to be 'false', meaning "only replace the first occurence in the string"). It simply replaces the default uses by String::replace(..., ReplaceMode::FirstOnly), leaving them incorrect.
2022-04-10AK+LibWeb: Encode ' ' as '+' in application/x-www-form-urlencodedAndreas Kling
This matches what the URL and HTML specifications ask us to do.
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2022-03-22LibWeb: Convert URL to use TRY for error propagationLinus Groh
2022-02-16LibWeb: Add imports to all IDL files that depend on othersAli Mohammad Pur
2022-02-14LibWeb: Add support for the record variant of URLSearchParamsLuke Wilde
2022-01-31LibWeb: Accept array pairs in URLSearchParams constructorLuke Wilde
2021-11-11Everywhere: Pass AK::StringView by valueAndreas Kling
2021-10-31LibWeb: Convert all generated bindings to ThrowCompletionOrTimothy Flynn
This also required converting URLSearchParams::for_each and the callback function it invokes to ThrowCompletionOr. With this, the ReturnType enum used by WrapperGenerator is removed as all callers would be using ReturnType::Completion.
2021-10-26LibWeb: Implement URLSearchParams.getAllLuke Wilde
2021-10-03LibWeb: Make the URL.port setter return after assigning the empty stringAndreas Kling
This matches the spec ("3. Otherwise, ...")
2021-09-28LibWeb: Make URLSearchParams iterableIdan Horowitz
This uses the new support for the iterable IDL property.
2021-09-14LibWeb: Add the URL::{protocol, pathname, search, hash} attributesIdan Horowitz
2021-09-14LibWeb: Add the URL::host, URL::hostname & URL:port attributesIdan Horowitz
2021-09-14LibWeb: Add the URL::username, URL::password & URL::origin attributesIdan Horowitz
2021-09-14LibWeb: Add the URL::searchParams attributeIdan Horowitz
2021-09-14LibWeb: Add the URL::href attribute and URL::to_json methodIdan Horowitz
2021-09-14LibWeb: Add a bare implementation of the URL built-inIdan Horowitz
This only has the constructor implemented for now.
2021-09-14LibWeb: Move url_{encode, decode} to URL/URLSearchParams.{h, cpp}Idan Horowitz
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-13LibWeb: Identical sub-expression bug in URLSearchParams::setBrian Gianforcaro
Flagged by sonarcloud, we appear to want to make sure the entry.name matches the name we are searching for duplicates of. Link: https://sonarcloud.io/project/issues?fileUuids=AXvdC606QRvsO1F91p5C&id=SerenityOS_serenity&open=AXvdC_NEQRvsO1F91p6j
2021-09-13LibWeb: Add the URLSearchParams built-inIdan Horowitz
This is a very partial implementation, as some features (like 2 of the possible constructor types, iteration and the getAll method) are missing, and other's are not implemented due to the currently missing URL built-in.
2021-09-13LibWeb: Add URL::url_decode for decoding form url encoded parametersIdan Horowitz
2021-09-13LibWeb: Add the Web::URL namespace and move URLEncoder to itIdan Horowitz
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.