Age | Commit message (Collapse) | Author |
|
Implement XMLHttpRequest.setRequestHeader() and include the headers in
the outgoing HTTP request.
|
|
Since Web::Bindings::WindowObject inherits from JS::GlobalObject, it
cannot also inherit from Web::Bindings::EventTargetWrapper.
However, that's not actually necessary. Instead, we simply set the
Window object's prototype to the EventTargetPrototype, and add a little
extra branch in the impl_from() function that turns the JS "this" value
into a DOM::EventTarget*.
With this, you can now call window.addEventListener()! Very cool :^)
Fixes #4758.
|
|
Instead of each IDL interface wrapper having its own set of all the
attributes and functions, they are moved to the prototype. This matches
what we already do in LibJS.
Also, this should be spec compliant with the web as well, though there
may be *some* content out there that expects some things to be directly
on the wrapper since that's how things used to work in major browsers
a long time ago. But let's just not worry about that for now.
More work towards #4789
|
|
Have each IDL prototype trigger the construction of its own prototype.
|
|
We now instantiate all the generated web API constructors and expose
them on the window object. We also set the generated prototypes on
instantiated wrappers.
Also, we should obviously find a way to generate this code. :^)
|
|
This patch adds a FooPrototype and FooConstructor class for each IDL
interface we generate JS bindings for.
These classes are very primitive and don't do everything they should
yet, but we have to start somewhere. :^)
Work towards #4789
|
|
|
|
|
|
This adds support for FUTEX_WAKE_OP, FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET,
FUTEX_REQUEUE, and FUTEX_CMP_REQUEUE, as well well as global and private
futex and absolute/relative timeouts against the appropriate clock. This
also changes the implementation so that kernel resources are only used when
a thread is blocked on a futex.
Global futexes are implemented as offsets in VMObjects, so that different
processes can share a futex against the same VMObject despite potentially
being mapped at different virtual addresses.
|
|
I want to give Bitmap an intrinsic scale factor and this is a step
in that direction.
No behavior change.
|
|
Also get rid of the awkward IF_BMP_DEBUG macro while we're here.
|
|
The generic is<T>() uses dynamic_cast which is fine in the majority
of cases, but when one of them shows up in profiles, we can make it
faster by answering the is-a question manually.
|
|
This is only used for debugging anyway, so performance doesn't matter
too much.
|
|
All users of this mechanism have been switched to anonymous files and
passing file descriptors with sendfd()/recvfd().
Shbufs got us where we are today, but it's time we say good-bye to them
and welcome a much more idiomatic replacement. :^)
|
|
This was the last remaining user of shbufs! :^)
|
|
Just for semantic correctness and better visibility of those
unimplemented stub functions.
|
|
decode_png_chunks() is not handling "critical" chunks, unlike
decode_png_size() for example. When we encounter a chunk decoding
failure, e.g. because not enough bytes were left to read, just continue
with decoding the bitmap - which will fail on its own, if we're missing
some required chunk(s).
Fixes #4984.
|
|
There are no remaining users of this syscall so let it go. :^)
|
|
|
|
|
|
|
|
...instead of sending shbufs back and forth. :^)
|
|
|
|
To support this, the GUI process and the WebContent service will now
coordinate their backing store bitmaps. Each backing store can be
referred to by a serial ID, and we don't need to keep resending it
as a file descriptor.
We should probably do something similar in WindowServer. :^)
|
|
Note that this is only used by OOPWV in LibWeb at the moment.
|
|
|
|
Nobody is using globally shared shbufs anymore, so let's remove them.
|
|
This gives us the superpower of knowing the ideal buffer length if it fails.
See also https://github.com/SerenityOS/serenity/discussions/4357
|
|
The realpath syscall can attempt to return arbitrarily long paths, in particular
paths that are longer than PATH_MAX. The only way to detect this case is
checking whether 'rc', the true length of the returned path including NUL byte,
exceeds our buffer length. In such a case, the buffer contains invalid data.
All Serenity code calls LibC's realpath() with a nullptr buffer, meaning that
realpath is supposed to allocate memory on its own. All Serenity code can handle
arbitrarily long paths returned by LibC's realpath, so it is safe to "do the
dance" and repeat the syscall with a new buffer.
Ports are likely to be graceful in this regard, too. If a Port calls realpath()
with a pre-allocated buffer, however, there is nothing better we can do than
return a truncated buffer.
|
|
Noone seems to check 'errno' when using LibCore, but let's make sure it's correct anyway.
|
|
|
|
|
|
|
|
Always accept the events so that they don't bubble up to the
parent object.
Fixes #4967
|
|
This was the last remaining user of shbufs in WindowServer, and so
WindowServer no longer pledges "shared_buffer" :^)
|
|
This will be used to migrate remaining clients off of shbufs.
|
|
The priority boosting mechanism has been broken for a very long time.
Let's remove it from the codebase and we can bring it back the day
someone feels like implementing it in a working way. :^)
|
|
This is no longer used. We can bring it back the day we need it.
|
|
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
|
|
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
|
|
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
|
|
64 was cutting it pretty close, especially now as we start using file
descriptor passing more and more.
This (1024) matches many other systems, and if we need more there's
always sys$poll().
|
|
When decoding a ShareableBitmap that came over IPC, it's safe to assume
that it's backed by an anonymous file (since we just decoded it.)
|
|
If this is called with ShouldCloseAnonymousFile::Yes, it's entrusted
with closing the anon_fd and nobody else will take care of it.
|
|
Nobody outside needs to see this, so let's just hide it.
|
|
|
|
IPC::File should only be used when there's an actual file to pass.
Invalid ShareableBitmaps don't have a backing file, so fix this by
first encoding a "valid" flag.
|
|
|
|
This makes them backed by anonymous files instead of shbufs and also
simplifies the code significantly on both client and server side.
|
|
Adds a mechanism through which windowing clients can re-request an
UpdateSystemTheme message. This is currently used in SystemMenu's
ShutdownDialog to refresh it's theme when the dialog is instantiated.
|