4174 Commits
Author SHA1 Message Date
Undefine d191b2f5d0 Tests: Use release_as in TestAML
This avoids copies.
2026-11-07 13:27:30 +01:00
Stephan Unverwerth ac779f06cc LibSoftGPU: Improve depth interpolation precision
This should get rid of various artifacts when exact depth equality is
needed, such as when using GL_EQUAL or similar depth functions.
2026-11-02 18:27:57 -05:00
Sönke Holz cb9e1feee3 LibGL+LibSoftGPU: Support GL_{UN,}PACK_SKIP_{PIXELS,ROWS}
We already store these glPixelStorei() parameters in
m_unpacking_parameters/m_packing_parameters, but didn't do anything
with them.

Setting these parameters is equivalent to offsetting the input/output
texture data pointer by a constant offset.
2026-11-01 21:27:28 +01:00
Undefine b25994bb29 Tests: Add some tests for new LibACPI features
Just as the previous test, the AML table was compiled with using
IASL 20260930 without any flags.
2026-11-01 15:08:28 +01:00
Eduardo Casadei 393d8e150b Tests/Shell: Properly test Shell's cd
Fixes the issue of the test using braced parameter expansion, which is
not part of Shell's syntax, and correctaly sets up the test directory,
ensuring its path is fully resolved to avoid issues on macOS.
2026-10-31 10:45:18 +01:00
Eduardo Casadei 5e844e387d Tests/Shell: Reenable the valid.sh test 2026-10-31 10:21:34 +01:00
Eduardo Casadei d4f0fa7002 Tests/Shell: Reenable the backgrounding.sh test
Reeanables the test and makes it run inside of a temporary directory
instead of the current working directory.
2026-10-31 10:21:34 +01:00
Undefine b5d4da532a Tests: Add a simple test for the LibACPI AML Interpreter
The test .aml file was built with iASL 20260930, using
`iasl Tests/LibACPI/test-inputs/scope_and_name.dsl`
2026-10-28 18:13:04 +01:00
Sönke Holz 7af126f893 LibGL: Support GL_PROXY_TEXTURE_2D
Proxy textures don't have any image data. They can be used to determine
if a given texture configuration is supported by the implementation.

To support proxy textures in gl_tex_image_2d, we need to tweak the error
handling, since proxy textures don't report an error for unsupported
dimensions:
GL spec 1.5, 3.8.11 Texture State and Proxy State:
"When TexImage3D is executed with target specified as PROXY_TEXTURE_3D,
 the three-dimensional proxy state values of the specified
 level-of-detail are recomputed and updated. If the image array would
 not be supported by TexImage3D called with target set to TEXTURE_3D,
 no error is generated, but the proxy width, height, depth,
 border width, and component resolutions are set to zero."
(The same also applies to TexImage2D.)
2026-10-28 15:15:37 +01:00
Sönke Holz e225bb4255 LibGL: Make null textures have a size of 0x0
GL spec 1.5, 3.8.11 Texture State and Proxy State:
"Each initial texture array is null (zero width, height, and depth,
 zero border width, internal format 1, with the compressed flag
 set to FALSE, a zero compressed size, and zero-sized components)."

GL spec 1.5, 3.8.1 Texture Image Specification:
"An image with zero width, height, or depth indicates the null texture."

Previously, retrieving the texture size for an uninitialized texture
would have resulted in a crash. Since Texture2D initially has a null
device image and device images are not allowed to be 0x0 (GPU::Image
VERIFYs that), represent 0x0 textures by having a null device image.
2026-10-28 15:15:37 +01:00
Lucas Chollet 5b2dba5f45 Kernel/VFS: Allow rename to overwrite a symlink
Per POSIX:
If either the old or new argument names a symbolic link, rename() shall
operate on the symbolic link itself, and shall not resolve the last
component of the argument.
2026-10-19 17:29:35 +02:00
Lucas Chollet 067456f819 Kernel/VFS: Return an error if the path names a symlink in mkdir
Per POSIX:
If path names a symbolic link, mkdir() shall fail and set errno to
[EEXIST].

The test needs to be done in a subfolder of /tmp, I suppose that it
comes from the custom branch for mounted folders in
`resolve_path_without_veil`. Otherwise, the behavior is quite different
and seems to involve other bugs too.
2026-10-19 17:29:35 +02:00
Sönke Holz 31ed5be377 LibSoftGPU: Clamp fog factor between 0 and 1
We would otherwise pass factors outside of this range to mix(), leading
to weird colors.
2026-10-18 17:40:16 +02:00
Eduardo Casadei ff889da752 Tests/Shell: Add test cases for cd 2026-10-16 09:57:03 +02:00
Lucas Chollet 01f0686eac Revert "LibCrypto: Reject short encoded messages in EMSA_PKCS1_V1_5::verify"
This reverts commit a99c7d9f9d.
2026-10-15 08:56:45 +02:00
Lucas Chollet 5184c07e01 AK/Math: Rely on lgamma to implement gamma
Note that the current implementation of lgamma doesn't work for negative
values of x. But given that Stirling's approximation is also only
defined for positive values of x, this patch don't change anything in
that regard.
2026-10-14 22:19:04 +02:00
Chandan MK a99c7d9f9d LibCrypto: Reject short encoded messages in EMSA_PKCS1_V1_5::verify
encode() returns without writing anything when emLen < tLen + 11, but
verify() went on to compare the input against that untouched buffer.
For an empty signature both sides are empty, so LibTLS accepted an
empty RSA signature on certificates and on ServerKeyExchange.
2026-10-14 11:31:00 -04:00
Lucas Chollet 606b5fcaa8 AK/Math: Use a more precise stirling approximation in lgamma
This directly yields to better results for values of x > 2.
2026-10-12 18:39:50 +02:00
Lucas Chollet d0d79c2bcb AK/Math: Make lgamma_r's sign computation more sound
This still doesn't always produce the correct result for negative values
of x, but at least this fixes the reasoning.
2026-10-12 18:39:50 +02:00
Lucas Chollet 0a8a147389 Tests/Kernel: Reset SIGCHLD's handler at the end of TestWaitFirstNoHang
With this change, when we're done with our test the SIGCHLD handler is
set back to the default one. This fixes an issue when running the test
under LSan with libsanitizers. LSan works by forking and then using
ptrace on the parent to inspect its address space, when this child exits
it was triggering our handler and caused a crash. Restoring the default
handler solves the issue. For some reason, this only happens with GCC's
implementation of LSan while this works fine with Clang's.
2026-10-06 15:27:13 +02:00
Chandan MK cc35ecf5b9 LibSSH: Verify the MAC of incoming ChaCha20Poly1305 packets
The Poly1305 tag of received packets was never checked, so packets
modified in transit were decrypted and processed like genuine ones.
2026-10-06 09:19:23 -04:00
Lucas Chollet 5df6434e8c Kernel/VFS: Don't overwrite files when renaming a directory 2026-10-06 09:11:45 -04:00
Chandan MK 3bb1891bea LibCrypto: Reject wrongly sized inputs in Ed25519::verify
verify() copied two 32-byte halves out of the signature and read 32
bytes of the public key without looking at the size of either span, so
a shorter buffer was read past its end. SSHServer, LibTLS and LibWeb
all pass buffers whose size is chosen by the peer.
2026-10-01 13:38:23 +02:00
Lucas Chollet cccf3076aa Kernel: Return an error on long component names inside paths
From POSIX:
[ENAMETOOLONG]
    The length of the path argument exceeds {PATH_MAX} or a pathname
    component is longer than {NAME_MAX}.
2026-09-26 18:25:41 +02:00
Lucas Chollet a3b87c3293 LibC: Consider f80's explicit leading 1 in internal_to_integer
While the existing f80 path gave a valid result in the float extractor,
the rounding steps were applied as if it was a normal float.
2026-09-24 20:33:35 +02:00
Lucas Chollet d2a1d0e075 LibC: Make nextafterl return a correct value when given equal arguments
This is done by moving the check to the shared implementation.
2026-09-24 20:33:35 +02:00
Lucas Chollet 2b94b63ebc LibC: Handle edge cases correctly in erf 2026-09-24 20:33:35 +02:00
Lucas Chollet 627b81a7e5 LibC: Implement fdim* and remquo* functions 2026-09-24 20:33:35 +02:00
Aliaksandr Kalenik 3145f90c5e LibWeb: Delete public constructor of FontFaceSet
The IDL definition in the spec does not have a public constructor, and
our test that relies on it was failing to run in other browsers.

(cherry picked from commit 814fa0682a82c4d7416408e25691703cb9138d0a)
2026-09-21 20:57:52 -04:00
sideshowbarker 7b8d176b30 Tests: Import WPT html/dom/aria-attribute-reflection.html test
This change imports the WPT html/dom/aria-attribute-reflection.html test
into being an in-tree test — and deletes the related existing test
from https://github.com/LadybirdBrowser/ladybird/commit/a924e8747a4
previously “ported” from the WPT with changes to run under our (non-WPT)
in-tree test harness.

(cherry picked from commit 58b07bc531857a006959f015165b73480d90de10)
2026-09-21 20:55:55 -04:00
Sam Atkins 5c1f988523 LibWeb/CSS: Return 0 from CSSRule.type for non-spec types
We use the CSSRule::Type enum for identifying the type of a CSSRule, but
the spec requires that only some of these types are exposed via the
`type` attribute. For the rest, we're required to return 0, so let's do
so. :^)

(cherry picked from commit 51fc87bc1b051c45d8a93ea5098e7b8ce10551ad)
2026-09-21 20:55:55 -04:00
Alex Ungurianu f996646b36 LibWeb: Parse @property CSS directives
This is not a complete parse, as it doesn't validate or take into
account the parsed syntax.
Enough to get us a few more WPT tests though :)

(cherry picked from commit a4c72f50c0aa0d54819d6deb3676a18e2f16a42a)
2026-09-21 20:55:55 -04:00
Alex Ungurianu 891f486e2d LibWeb: Add and implement CSSPropertyRule IDL and bindings
(cherry picked from commit 50d64b0fb730b16d6cdc81ccb1efae567e4f9914)
2026-09-21 20:55:55 -04:00
rmg-x b6da0b8f22 LibWeb/Crypto: Fix sizes being passed into generate_aes_key()
Previously, callers were passing the size in bytes, but the method
expected bits. This caused a crash in LibCrypto when verifying the key
size later on.

Also make the naming of local variables and parameters a little more
clear between the different AES algorithms :^)

(cherry picked from commit 0db171c36eeb443314f0a5e60d683417f559e83e)
2026-09-21 20:55:55 -04:00
Ben Wiederhake 0ecc5b0d71 LibWeb: Omit padding in WebCrypto AES-CBC exportKey
(cherry picked from commit 3553861046958b2987af12af6713164f3a9668b2)
2026-09-21 20:55:55 -04:00
Ben Wiederhake b834d4ada9 LibWeb: Integration test for WebCrypto AES-CBC
(cherry picked from commit ff3d78f369d467018ee769dbb9a1db9e9a99ac36)
2026-09-21 20:55:55 -04:00
Ben Wiederhake b2096d66c0 LibCrypto: Fix and test CBC with CMS and ZeroLen padding
(cherry picked from commit 92d4cb7b09bf76fd22d2c49549a9fecf6c8401f2)
2026-09-21 20:55:55 -04:00
Lyra 89a4815969 LibWeb: Fix SRI handling of badly-formatted strings
(cherry picked from commit 39dae6fb2db58156dda7c58cb5293ca52ff35d4e)
2026-09-21 20:55:55 -04:00
Lucas Chollet df91038f4a LibC: Support a few other formats in strftime 2026-09-21 20:12:39 -04:00
Lucas Chollet 3fcd7ac87b LibC: Don't consider E and O modifiers in strftime
This only affect the output if the current locale has alternative
representations. Given that on Serenity we only use the POSIX/C locale,
and it doesn't have any alternative representations, these modifiers are
basically useless.

"If the alternative format or specification does not exist for the
current locale [...], the behavior shall be as if the unmodified
conversion specification were used."
2026-09-21 20:12:39 -04:00
Lucas Chollet 9fce834276 LibC: Display the correct week number when using %W in strftime
I'm not 100% sure if my formula always produces the right number, but it
is at least correct for the included test case.
2026-09-21 20:12:39 -04:00
Lucas Chollet 5f600d5529 Tests/LibC: Add basic tests for strftime 2026-09-21 20:12:39 -04:00
Andreas Kling 15c4a2431c LibWeb: Allow intrinsic size keywords for min-height and max-height
Serenity note: Test expectations were rebaseline'd.

(cherry picked from commit c5a54f1166e6f05277c8fae2e4b6a33346de2671)
2026-09-20 20:01:55 -04:00
Andreas Kling 2381771cc3 LibWeb: Disallow none for min-width and min-height
Serenity note: Test expectations were rebaseline'd.

(cherry picked from commit 5a9d538acc4fbea47a38def5769167a923f9f947)
2026-09-20 20:01:55 -04:00
Andreas Kling 2ddd89aa64 Tests: Import WPT tests from /css/css-sizing/parsing
Serenity note: Test expectations were rebaseline'd.

(cherry picked from commit ce6a7ba05095ef936cc8b00359b4b6a886db0c82)
2026-09-20 20:01:55 -04:00
Lucas Chollet 6f12afa77b AK: Add basic support %a formatting
No modifiers are currently supported.
2026-09-20 22:06:41 +02:00
Lucas Chollet 8243759bb2 AK: Apply modifiers when printing nan or inf
Before this patch, we would incorrectly handle the '+' (always_sign),
'-' (left padding) and padding size modifiers.
2026-09-20 22:06:41 +02:00
Timothy FlynnandJamie Mansfield bff7eccf6b AK: Add an option to the base64 encoder to omit padding
Will be used by an upcoming JS prototype

(cherry picked from commit 41e14e3fc3aab8417b8687df7e4242982e97ba23)

Co-authored-by: Jamie Mansfield <[email protected]>
2026-09-18 20:04:39 -04:00
Jamie Mansfield 651f72cab4 AK: Support decoding base64 strings without padding
This is to support future changes that will be merged from Ladybird,
which gained this functionality through moving to simdutf.
2026-09-18 20:04:39 -04:00
Shannon Booth b0cdfd0132 LibWeb: Implement HTMLElement.innerText setter
(cherry picked from commit 653c8f231d852071ad2c5f79985775e96f2c5167)
2026-09-17 10:39:03 -04:00