Commit graph

48988 commits

Author SHA1 Message Date
Linus Groh
b3cc320718 LibWeb/HTML: Use correct spec link for multipart/form-data encoding 2023-04-09 17:59:36 +02:00
Kenneth Myhra
d39ac0a0ed LibWeb: Port fire_webgl_context_event() to new FlyString 2023-04-09 17:27:27 +02:00
Kenneth Myhra
fb96966f1e LibWeb: Add WebGL::EventNames 2023-04-09 17:27:27 +02:00
Kenneth Myhra
f9d50e6eca LibWeb: Port fire_keyboard_event() to new FlyString 2023-04-09 17:27:27 +02:00
Kenneth Myhra
8f4d7f2854 LibWeb: Port fire_a_synthetic_pointer_event() to new FlySring 2023-04-09 17:27:27 +02:00
Kenneth Myhra
cbefab21be LibWeb: Port fire_a_page_transition_event() to new FlyString 2023-04-09 17:27:27 +02:00
Kenneth Myhra
bf048da8cb LibWeb: Port fire_progress_event() + request_error_steps() to new String
This ports XHR's fire_progress_event() and request_error_steps() to new
FlyString.

Signature of fire_progress_event() parameter event_name  was changed
from 'String const&' to 'FlyString const&'.
2023-04-09 17:27:27 +02:00
Kenneth Myhra
fdd33d818c LibWeb: Port DOMEventListener to new FlyString 2023-04-09 17:27:27 +02:00
Kenneth Myhra
2091a11488 LibWeb: Port EventTarget to new {Fly}String 2023-04-09 17:27:27 +02:00
Matthew Olsson
868cd95069 LibWeb: Add the WritableStreamDefaultController 2023-04-09 17:14:48 +02:00
Tim Schumacher
83701ec54b Meta+Toolchain: Redirect GDB error output to stdout before grepping 2023-04-09 16:51:11 +02:00
Tim Schumacher
022a55e825 Meta: Add a missing dash to the GDB detection code 2023-04-09 16:51:11 +02:00
Ben Wiederhake
86b83d5823 Ports: Repair the launcher icons of 'stpuzzles' 2023-04-09 16:50:35 +02:00
Nico Weber
1f0b54c857 LibGfx: Limit ICC-size-is-multiple-of-4 check to v4 files
The v2 spec doesn't require it, and it's not true in practice
(e.g. Compact-ICC-Profiles/profiles/sRGB-v2-nano.icc has size 410).
2023-04-09 16:49:49 +02:00
Nico Weber
bed86fb578 LibGfx: Remove some of the noisier logging from webp lossless decoder
Prefix code decoding seems to work fairly well and produces a ton of
log output with `#define WEBP_DEBUG 1`, so remove the log lines.

(If needed it's always possible to just locally revert this commit.)

No behavior change, since WEBP_DEBUG isn't usually defined.
2023-04-09 16:49:38 +02:00
Ben Wiederhake
4107ae1dea Ports: Remove abandoned port 'fheroes2' which was never playable 2023-04-09 11:39:31 +01:00
Liav A
9f217222b7 Meta: Run the QEMU ISA-PC machine with a 64-bit capable CPU
When we had 32 bit support in the OS kernel and userland, the very bare
minimum CPU we supported was Pentium 3, but now the CPU is just required
to support x86-64 long mode to be supported, so the exact model is not
very important.

I chose the QEMU64 virtual CPU model, because the whole concept of the
QEMU ISA-PC machine is that it checks how the kernel handles arbitrarily
old hardware setup.
2023-04-09 10:25:20 +02:00
Idan Horowitz
01318d8f9b Kernel: Check flags for MAP_FIXED instead of prot in sys$mmap
We were accidentally not enforcing the map_fixed pledge
2023-04-09 11:10:37 +03:00
Idan Horowitz
6b08b18a9a Kernel: Crash process instead of panicking on KSYMS access
Also do the same for READONLY_AFTER_INIT and UNMAP_AFTER_INIT.
2023-04-09 11:10:37 +03:00
Idan Horowitz
f412e73bba DynamicLoader: Remove the unused load_regions vector 2023-04-09 11:10:37 +03:00
Brian Gianforcaro
e891f13c84 Kernel: Fix compilation of aarch64/RPi/Framebuffer.cpp
The definitions were being defined already by `BootInfo.h` and that was
being included here via transitive includes. The extern definitions of
the variables do not have the `READONLY_AFTER_INIT` attribute in
`BootInfo.h`. This causes conflicting definitions of the same variable.

The `READONLY_AFTER_INIT` specifier is not needed for extern variables
as it only effects their linkage, not their actual use, so just use the
versions in `BootInfo.h` instead of re-declaring.
2023-04-08 19:16:35 -07:00
Tim Schumacher
56fdbf81dc Ports: Reapply the SDL2_sound patch 2023-04-09 01:53:33 +02:00
Karol Baraniecki
f532f9d279 BrickGame: Remember the "Show Shadow Piece" setting between executions
by using the ConfigServer.
2023-04-09 00:44:45 +02:00
Karol Baraniecki
439076df8a BrickGame: Add a menu option to disable the shadow drop hint 2023-04-09 00:44:45 +02:00
Karol Baraniecki
f3f14a7ef1 BrickGame: Show where a piece would end up when after a fast drop
To show it to the player, draw a faint outline of where the piece would
end up.
2023-04-09 00:44:45 +02:00
Karol Baraniecki
652a19b232 BrickGame: Use title case in menu items consistently
by fixing the "Toggle pause" option
2023-04-09 00:44:45 +02:00
Karol Baraniecki
bd12a72546 BrickGame: Add a missing [[nodiscard]] for consistency
Every other function there returning a RenderRequest has one, so might
as well.

Don't add it to check_and_remove_full_rows(), because it's only used
inside other functions returning a RenderRequest, when it's already
clear a render will happen.
2023-04-09 00:44:45 +02:00
Karol Baraniecki
962d39cc05 BrickGame: Port from DeprecatedStrings to Strings 2023-04-09 00:44:45 +02:00
Ben Wiederhake
2344666725 Documentation+Ports: Be upfront about dependencies
Yes, these can be 'discovered' incrementally, but it's usually nicer to
be upfront instead of making the user play trial-and-error.
2023-04-08 15:20:33 -07:00
Tim Schumacher
381da77ffb LibCompress: Mark some XZ-related variables and functions as const 2023-04-08 15:18:59 -07:00
Tim Schumacher
e9789e9f36 LibCompress: Move loading XZ blocks into its own function 2023-04-08 15:18:59 -07:00
Tim Schumacher
e6b1e1bb33 LibCompress: Move finishing the current XZ stream into its own function 2023-04-08 15:18:59 -07:00
Tim Schumacher
68984abc43 LibCompress: Move finishing the current XZ block into its own function 2023-04-08 15:18:59 -07:00
Tim Schumacher
0e11e7012d LibCompress: Move loading XZ stream headers into its own function 2023-04-08 15:18:59 -07:00
Nico Weber
95e35b7f5e LibGfx: Correctly decode webp lossless with small palette and odd width
WebP lossless files that use a color indexing transform with <= 16
colors use pixel bundling to pack 2, 4, or 8 pixels into a single pixel.

If the image's width doesn't happen to be an exact multiple of the
bundling factor, we need to:

1. Use ceil_div() instead of just dividing the width by the bundling
   factor

2. Remember the original width and use it instead of computing
   reduced width times bundling factor

This does these changes, and adds a simple test for it -- it at least
checks that the decoded images have the right size.

(I created these images myself in Photoshop, and used the same
technique as for Tests/LibGfx/test-inputs/catdog-alert-*.webp
to create images with a certain number of colors.)
2023-04-09 00:14:15 +02:00
Ben Wiederhake
625b29f507 Ports: Repair qt6-qtbase by disabling QDnsLookup 2023-04-08 14:25:30 -07:00
Marco Cutecchia
401946947c Toolchain: Stop building QEMU with i386 support 2023-04-08 14:12:29 -07:00
Timothy Flynn
4555e3b8d2 LibWeb: Begin painting video controls on HTMLVideoElement layout nodes
If the video element has a 'controls' attribute, we now paint some basic
video controls over the video element. If no frame has been decoded yet,
we paint a play button on the center of the element.

If a frame has been decoded, we paint that frame and paint a control bar
on the bottom of the frame. This control bar currently only contains a
play/pause button, depending on the video's playback state. We will only
paint the control bar if the video is paused or hovered.
2023-04-08 22:04:14 +02:00
Timothy Flynn
4f29cac715 LibWeb: Set the media ready state to HAVE_ENOUGH_DATA after fetching
Because we currently both fetch and process the media data in one chunk,
we have enough data for playback immediately.
2023-04-08 22:04:14 +02:00
Timothy Flynn
90e1d4f545 Base: Add playback state data to the video test page 2023-04-08 22:04:14 +02:00
Timothy Flynn
d99a075ff9 LibWeb: Implement HTMLMediaElement.play
This also includes the HTMLMediaElement's list of pending play promises,
which is coupled pretty tightly with HTMLMediaElement.play.
2023-04-08 22:04:14 +02:00
Timothy Flynn
b8a37ef809 LibWeb: Implement HTMLMediaElement.pause 2023-04-08 22:04:14 +02:00
Timothy Flynn
90921a4f16 LibWeb: Implement the HTMLMediaElement paused attribute
Note that the default value of the attribute is true. We were previously
autoplaying videos as soon as they loaded - this will prevent that from
happening until the paused attribute is set to false.
2023-04-08 22:04:14 +02:00
Timothy Flynn
e130525c24 LibWeb: Implement HTMLMediaElement.load 2023-04-08 22:04:14 +02:00
Timothy Flynn
9ad4c9e6b0 LibWeb: Log correct error object when failing to decode a video sample 2023-04-08 22:04:14 +02:00
Timothy Flynn
8dd5bf7f11 LibWeb: Add missing include to WebIDL::Promise
WebIDL::Promise is aliased to a JS::PromiseCapability. This missing
include would cause a compile error in an upcoming commit.
2023-04-08 22:04:14 +02:00
Nico Weber
f2efb97578 Tests: Add webp lossless test with color index and < 16 colors
For the test files, I opened Base/res/icons/catdog/alert.png in Adobe
Photoshop 2023, used Image->Mode->Index Color...->
Palette: Local (Perceptive) to reduce the number of colors to 13, 8, and
3 with transparency, and 2 without transparency, then converted it back
to Image->Mode->RGB Color (else it can't be saved as webp), then
File->Save a Copy... to save a WebP (mode lossless) for every palette
size.
2023-04-08 19:24:13 +02:00
Nico Weber
1dab480015 LibGfx: Implement color index pixel bundling in webp decoder
See the lengthy comment added in this commit for details.

With this, the webp lossless decoder is feature complete :^)

(...except for bug fixes and performance improvements, as always.)
2023-04-08 19:24:13 +02:00
Nico Weber
7309441b31 LibGfx: Enable webp lossless Transform to return new bitmap
...in addition to modifying in-place. This is needed for bitpacking
support for the color indexing transform (and it could also be used
to make the color indexing transform return an indexed bitmap, which
is something we could do if that's the last transform that's applied).

No behavior change.
2023-04-08 19:24:13 +02:00
Nico Weber
13f8bbb284 LibGfx: Add some more dbgln_if()s to webp decoder 2023-04-08 19:24:13 +02:00