Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
The intent is to use these to autogenerate prototype declarations for
Window and WorkerGlobalScope classes.
And the spec links are just nice to have :^)
|
|
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.
|
|
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
:^)
|
|
We no longer access Bindings::FooWrapper anywhere for a Foo platform
object, so these can be removed :^)
|
|
|
|
|
|
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.
|
|
- 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
|
|
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.
|
|
|
|
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.
|
|
|
|
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.
|
|
This matches what the URL and HTML specifications ask us to do.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
This matches the spec ("3. Otherwise, ...")
|
|
This uses the new support for the iterable IDL property.
|
|
|
|
|
|
|
|
|
|
|
|
This only has the constructor implemented for now.
|
|
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.
|
|
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
|
|
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.
|
|
|
|
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.
|