Commit Graph

50541 Commits

Author SHA1 Message Date
Caoimhe
476774d681 SpiceAgent: Implement FileTransferStart messages 2023-05-21 18:45:53 +02:00
Caoimhe
0d98920930 SpiceAgent: Implement sending clipboard data to the spice server 2023-05-21 18:45:53 +02:00
Caoimhe
9f92e52464 SpiceAgent: Add support for copying images to the clipboard 2023-05-21 18:45:53 +02:00
Caoimhe
50a8db3922 SpiceAgent: Add support for reading chunks larger than 2048 bytes 2023-05-21 18:45:53 +02:00
Caoimhe
3b6d63f723 SpiceAgent: Implement setting the user's clipboard contents for text
We also now use GUI::Clipboard for setting the clipboard contents,
instead of using a custom connection to the Clipboard server.
2023-05-21 18:45:53 +02:00
Caoimhe
9c4538a9a8 SpiceAgent: Implement ClipboardRequest messages 2023-05-21 18:45:53 +02:00
Caoimhe
8202f13169 SpiceAgent: Implement ClipboardGrab messages 2023-05-21 18:45:53 +02:00
Caoimhe
79c73dd260 SpiceAgent: Let's start rewriting the messaging system :^)
The old message system was very dependent on syscalls, and the overall
structure made it hard to implement new features.

The new message system is pretty expandible, where each message has its
own dedicated class. As well as this, we now use Core::File and
AK::Stream for reading and writing messages.

Using AK::Stream also allows us to change the actual data source
(in this case, Core::File) without having to update a whole lot of code
in the future.
2023-05-21 18:45:53 +02:00
Caoimhe
fd4f00ee91 AK: Add SPICE_AGENT_DEBUG flag 2023-05-21 18:45:53 +02:00
Caoimhe
3c0b6919f7 SpiceAgent: Minor formatting changes 2023-05-21 18:45:53 +02:00
Caoimhe
7e3fd73410 SpiceAgent: Use ErrorOr<T> for on_message_received 2023-05-21 18:45:53 +02:00
Andreas Kling
0d82cc8a67 LibWeb: Don't assume response object isn't null in fetch abort algorithm
The callee that we're passing it to expects a GCPtr anyway, so there's
no need to explicitly dereference this.

Fixes a crash when loading https://spotify.com/
2023-05-21 16:19:31 +02:00
Aliaksandr Kalenik
f9803a7319 LibWeb: Represent OccupationGrid using HashTable in GFC
Using HashTable of grid positions to represent OccupationGrid allows to
simplify positioning code. For example maybe_add_row() and
maybe_add_column() calls are not needed anymore because there is no
Vector<Vector<bool>> that need to be resized.

No observable changes in grid layout are expected :)
2023-05-21 16:18:46 +02:00
Andreas Kling
0f4b82bdea LibWeb: Move SVGElement's dataset construction to initialize()
It's not safe to allocate new cells while in a cell constructor.
2023-05-21 16:01:19 +02:00
Andreas Kling
055dabc123 LibWeb: Fix unsafe capture of stack variables in main_fetch() 2023-05-21 16:01:19 +02:00
Andreas Kling
e69a06b358 LibJS: Don't dereference well-known symbols when gathering roots
This fixes an issue where very early GC would crash trying to
dereference not-yet-initialized entries in the well-known symbol set.
2023-05-21 16:01:19 +02:00
Undefine
0374351595 Shell: Properly detect the kill executable 2023-05-21 14:59:26 +01:00
Andreas Kling
cfe663435e LibWeb+LibJS: Don't lazily construct web prototypes in cell constructors
It's not safe to allocate from the GC heap while in the constructor of a
GC heap cell. (Because if this ends up triggering a collection, we may
end up trying to call through an uninitialized vtable).

This was already done safely in the initialize() virtual in much of
LibJS and LibWeb. This patch moves the logic for prototypes, mixins,
and CSSStyleDeclaration as well.

Fixes a long-standing GC crash that was pretty easy to reproduce by
refreshing https://vercel.com/
2023-05-21 14:23:58 +02:00
Andi Gallo
e6221117a5 LibWeb: Implement table rowspan
Adjust computing the table height and positioning of cells to account
for the rowspan property.

Fixes #18952.
2023-05-21 14:23:41 +02:00
Andreas Kling
6cb9d755d9 LibWeb: Don't crash on percentage values for CSS stroke-width
Fixes a crash when loading https://vercel.com/
2023-05-21 12:40:27 +02:00
Daniel Bertalan
beb55f726f Kernel/aarch64: Detect if access faults come from SafeMem
This commit lets us differentiate whether access faults are caused by
accessing junk memory addresses given to us by userspace or if we hit a
kernel bug.

The stub implementations of the `safe_*` functions currently don't let
us jump back into them and return a value indicating failure, so we
panic if such a fault happens. Practically, this means that we still
crash, but if the access violation was caused by something else, we take
the usual kernel crash code path and print a register and memory dump,
rather than hitting the `TODO_AARCH64` in `handle_safe_access_fault`.
2023-05-21 12:00:22 +02:00
Daniel Bertalan
0da2d2102a Kernel/aarch64: Flatten safe_{memset,strnlen,memcpy}()
We want to detect if an access fault comes from within these operations,
so they cannot be calling out to the non-safe variants.
2023-05-21 12:00:22 +02:00
Daniel Bertalan
ab279c850b Kernel/aarch64: Stub out atomic SafeMem functions
These are used in futexes, which are needed if we want to get further in
`run-tests`.

For now, we have no way to return a non-fatal error if an access fault
is raised while executing these, so the kernel will panic. Some would
consider this a DoS vulnerability where a malicious userspace app can
crash the kernel by passing bogus pointers to it, but I prefer to call
it progress :^)
2023-05-21 12:00:22 +02:00
Aliaksandr Kalenik
09ef2c14e9 LibWeb: Use code to size spanning tracks for non-spanning tracks in GFC
Since the specifications indicate that the algorithm for sizing tracks
without any spanning items is a simplified version of the more general
algorithm used for sizing tracks with spanning items, we can reuse the
code to size both cases.
2023-05-21 11:59:19 +02:00
Aliaksandr Kalenik
409333d80a LibWeb: Implement more of spanning tracks sizing in GFC
Implements more parts of sizing algorithm for tracks with spanning
items to archive parity with implementation for sizing of tracks
with non-spanning items.
2023-05-21 11:59:19 +02:00
Ben Wiederhake
943ecaede6 LibIPC: Remove redundant IPC::Dictionary type
We already have and use HashMap<DeprecatedString, DeprecatedString>
nearly everywhere, which is essentially equivalent.
2023-05-21 07:53:45 +02:00
Ben Wiederhake
d030f0fe9b WebSocket: Avoid unnecessary IPC::Dictionary wrapper
We already have and use HashMap<DeprecatedString, DeprecatedString>
nearly everywhere, which is equivalent.
2023-05-21 07:53:45 +02:00
Ben Wiederhake
9b9a38ec81 RequestServer: Avoid unnecessary IPC::Dictionary wrapper
We already have and use HashMap<DeprecatedString, DeprecatedString>
nearly everywhere, which is equivalent.
2023-05-21 07:53:45 +02:00
Ben Wiederhake
0ee5a4e308 Clipboard: Avoid unnecessary IPC::Dictionary wrapper
We already have and use HashMap<DeprecatedString, DeprecatedString>
nearly everywhere, which is equivalent.
2023-05-21 07:53:45 +02:00
Ben Wiederhake
67d9172885 LibIPC: Fix HashMap detection in case of non-trivial traits 2023-05-21 07:53:45 +02:00
Ben Wiederhake
4e101d1fa2 Ladybird: Remove unused IODevice.h include 2023-05-21 07:52:52 +02:00
Ben Wiederhake
f0586d74d7 WebServer: Convert document_root_path from DeprecatedString to String 2023-05-21 07:52:41 +02:00
Ben Wiederhake
e795641d99 WebServer: Prefer LibFileSystem over DeprecatedFile 2023-05-21 07:52:41 +02:00
Ben Wiederhake
fecaf27b3a FileSystemAccessServer: Prefer LibFileSystem over DeprecatedFile 2023-05-21 07:52:41 +02:00
Ben Wiederhake
81700d1b92 LibCodeComprehension: Remove unused #include <DeprecatedFile.h> 2023-05-21 07:52:41 +02:00
Ben Wiederhake
6055eed5a5 xml: Prefer LibFileSystem over DeprecatedFile 2023-05-21 07:50:52 +02:00
Ben Wiederhake
9e755ccfef wasm: Prefer LibFileSystem over DeprecatedFile 2023-05-21 07:50:52 +02:00
Ben Wiederhake
666e312693 userdel: Prefer LibFileSystem over DeprecatedFile 2023-05-21 07:50:52 +02:00
Ben Wiederhake
e935cb9f09 unzip: Prefer File over DeprecatedFile 2023-05-21 07:50:52 +02:00
Ben Wiederhake
8afd09b423 shot: Prefer LibFileSystem over DeprecatedFile 2023-05-21 07:50:52 +02:00
Ben Wiederhake
487ec64a78 run-tests: Prefer LibFileSystem over DeprecatedFile 2023-05-21 07:50:52 +02:00
Ben Wiederhake
6e08f860f8 open: Prefer LibFileSystem over DeprecatedFile 2023-05-21 07:50:52 +02:00
Ben Wiederhake
34eb797013 markdown-check: Prefer LibFileSystem and String over Deprecated* 2023-05-21 07:50:52 +02:00
Ben Wiederhake
0420e12dad headless-browser: Prefer FileSystem over DeprecatedFile 2023-05-21 07:50:52 +02:00
Ben Wiederhake
f43f83512e Meta: Also run markdown-check on markdown files in each Port subdir 2023-05-21 07:50:09 +02:00
Tim Ledbetter
7ad212ff63 tail: Count lines correctly when file ends with two or more newlines
Previously, an extra line would be displayed when a file ended in more
than one newline.
2023-05-21 07:49:43 +02:00
Tim Ledbetter
daa9812cea tail: Don't skip the last line if it doesn't end in a newline 2023-05-21 07:49:43 +02:00
Tim Ledbetter
51b91af60b tail: Don't read past EOF when reading from a seekable stream
Previously, using tail to read from a file would fail, as we would
seek to the end of the file then try to read a byte from that
position.
2023-05-21 07:49:43 +02:00
Andreas Kling
3c7b0192fa LibWeb: Load external images with image/svg+xml as SVG-as-image 2023-05-21 07:44:29 +02:00
Andreas Kling
94a26e2715 LibWeb: Include SVG-as-image isolated contexts in layout/DOM tree dumps
This allows us to see the inside of SVG-as-image in layout tests. :^)
2023-05-21 07:44:29 +02:00