This opens up the code path for the `ArrayBuffer` type, which can now be
used as a method argument.
(cherry picked from commit 0b9d55b6761b85b3b80a459d6231841e72a26c51)
This should fix (at least) the last two remaining WPT test failures in
FileAPI/unicode.html.
(cherry picked from commit 55f0dc823ff266aeb29fd6f7d47d5e7f89a50ee6)
The IPCs to request a page's text, layout tree, etc. are currently all
synchronous. This can result in a deadlock when WebContent also makes
a synchronous IPC call, as both ends will be waiting on each other.
This replaces the page info IPCs with a single, asynchronous IPC. This
new IPC is promise-based, much like our screenshot IPC.
(cherry picked from commit 3332230cef8091f94f5c30e1f1984c1038cd4a1d)
The `[[GetOwnProperty]]` internal method invocation in
`OrdinarySetWithOwnDescriptor` was being invocated again with the same
parameters in the `[[DefineOwnProperty]]` internal method that is also
later called in `OrdinarySetWithOwnDescriptor`.
The `PlatformObject.[[DefineOwnProperty]]` has similair logic.
This change adds an optional parameter to the `[[DefineOwnProperty]]`
internal method so the results of the previous `[[GetOwnProperty]]`
internal method invocation can be re-used.
(cherry picked from commit 69f96122b6150c22d1e8dc848c097cead2d2ae3f)
This change completes handling for all ARIA properties defined in the
current ARIA spec — by adding handling for the following properties:
- aria-braillelabel
- aria-brailleroledescription
- aria-colindextext
- aria-description
- aria-rowindextext
(cherry picked from commit ede6924db8e4440ef3bdb0fbb34d31226568e55a)
UI event handlers currently return a boolean where false means the event
was cancelled by a script on the page, or otherwise dropped. It has been
a point of confusion for some time now, as it's not particularly clear
what should be returned in some special cases, or how the UI process
should handle the response.
This adds an enumeration with a few states that indicate exactly how the
WebContent process handled the event. This should remove all ambiguity,
and let us properly handle these states going forward.
There should be no behavior change with this patch. It's meant to only
introduce the enum, not change any of our decisions based on the result.
(cherry picked from commit 541968b30dc50208f473566498100769711f10c8;
amended to fix tiny conflict in ConnectionFromClient.h due to serenity
not having #1182 yet)
https://www.w3.org/TR/event-timing/#sec-performance-event-timing
Add idl, header and stubs for PerformanceEventTiming interface.
Two missing `PerformanceEntry` types that have come up in issues
are the `first-input` and the `event` entryTypes. Those are both
this.
Also, because both of those are this same interface, the static
methods from the parent class are difficult to implement because
of instance-specific details. Might either need subclasses or to
edit the parent and also everything that inherits from it :/
(cherry picked from commit d30ae92b82d997bc4db407c563c88f90d8260093)
This is really just a type alias for NonnullGCPtr<T>, but it provides
a way to have non-owning non-visited NonnullGCPtr<T> without getting
yelled at by the Clang plugin for catching GC errors.
(cherry picked from commit 6a6618f5eab6e6a2c7c3fc03f8063cc6b497a0ec)
This adds a new script for linting WebIDL files, and adds it to the set
of scripts Meta/lint-ci.sh runs. Initially, this script does just one
thing: normalizes IDL definition lines so they start with four spaces.
(cherry picked from commit a7578164d4ea2aa6e7831d83e9a55b1ff39e37f7;
minorly amended to resolve conflict in lint-ci.sh due to serenity still
having check-emoji.py and check-markdown.sh)
* Use argparse to add flags for printing cherry-picked and rejected
upstream PRs
* Add a few more entries to PRs we don't want, and for PRs that we
already have through non-cherrypicks
This change updates the Meta/check-debug-flags.sh script to avoid an
apparent Bach 3.2 parser bug. Specifically, it takes a comment and some
code of a process substitution and moves it into a separate function.
Otherwise, without this change, trying to run the check-debug-flags.sh
script with Bash 3.2 fails with the following error:
line 39: bad substitution: no closing `)' in <(
...apparently because Bash 3.2 chokes on the comment (and doesn’t choke
if the comment is completely removed).
Relates to https://github.com/LadybirdBrowser/ladybird/issues/283
(cherry picked from commit 15d67f0da2083c0a39964f8fc6bdcbbd4907b2ed)
There is an issue where gifs with many frames cannot be loaded, as each
bitmap is sent over IPC using a separate file descriptor, and there is
limit on the maximum number of descriptors per IPC message. Thus, trying
to load gifs with more than 64 frames (the current limit) causes the
image decoder process to die.
This commit introduces the BitmapSequence class, which is a thin wrapper
around the type Vector<Optional<NonnullRefPtr<Gfx::Bitmap>>> and
provides an IPC encode/decode routine that collates all bitmap data into
a single buffer so that only a single file descriptor is required per
IPC transfer, even if multiple frames are being sent.
(cherry picked from commit e0bd42be9590b967d0b5788ce7537a861a35ba74;
amended to fix conflict on build files since we still BitmapMixer.cpp
that upstream removed in LadybirdBrowser/ladybird#41, and
BitmapSequence.cpp conflicted with that. Also amended to not have
AlphaType in BitmapMetadata since we don't have that, and to have
scale instead, which we still do have. Also updated encode() and
decode() to send things in the order they're in in the struct.)
This ensures that a generated C++ method called `register` will have an
underscore appended to it, avoiding a compile error.
(cherry picked from commit 70fdf7affb95679382a1d46cdcea81bd847c8768)
This updates `run.py` so that it will configure the `qemu-vdagent`
(QEMU's built-in spice agent for clipboard support) when it's available.
Setting `SERENITY_SPICE=1` is only needed to use `spicevmc`, which
implements more features (such as file transfers), but requires more
setup to get working (see Documentation/SpiceIntegration.md).
This matches the behaviour of the old `run.sh` script, the logic was
changed (perhaps unintentionally) in the `run.py` rewrite.
Note: For copy/paste to work you may need to rebuild QEMU with
`--enable-gtk-clipboard` (which is added to `Toolchain/BuildQemu.sh`
for Linux as part of this patch).
We don't actually generate any such events ourselves. But Google Lens
will create one with the DataTransfer attribute set to that of any drop
event we send it.
(cherry picked from commit 0b0d44da275067458e61a5dd80c4563f6aa7fdc6)