Commit graph

61885 commits

Author SHA1 Message Date
MacDue d30350e951 LibWeb: Make methods for common AffineCommandExecutorCPU operations 2024-06-09 14:12:06 -04:00
MacDue 318f2925d3 LibGfx+LibWeb: Move generally useful path methods to LibGfx
This adds:

  - Path::rect()
  - Path::quad()
  - Path::rounded_rect()

Moving the corresponding implementations from LibWeb.
2024-06-09 14:12:06 -04:00
MacDue f9c944cc85 LibWeb: Support opacity in the AffineCommandExecutorCPU
This supports opacity via the standard method of painting stacking
context to a new bitmap, then blitting it back when popping the stacking
context.

One extra complication is we have to ensure clipping is flushed between
any change of the target bitmap. But other than that is all standard.
2024-06-09 14:12:06 -04:00
MacDue b2f63632f1 LibWeb: Support clipping in the AffineCommandExecutorCPU
This adds two paths for clipping. If the clip rect is known to be
rectangular (and axis-aligned), then normal/fast painter clipping is
used. Otherwise, a temporary buffer is made for 'expensive' clipping
(i.e. clipping by an arbitrary quadrilateral). All draw commands are
then redirected to the temporary buffer until the clipping needs to be
flushed. Clipping is flushed when the clip rect or target bitmap
changes. Flushing expensive clipping requires applying a clip mask to
the temporary buffer, and then blitting it to the target bitmap.

Note: If the bounds of a draw command are known to be within the current
clip 'expensive' clipping can be elided.

In future, it may be possible to avoid some of this masking by applying
path-clipping algorithms (but that's fairly tricky, and normally
requires stronger guarantees about paths than we currently have).
2024-06-09 14:12:06 -04:00
brody-qq 5058873d45 Kernel/Memory: Make release_all_clean_pages use try_release_clean_pages
The methods try_release_clean_pages() and release_all_clean_pages() in
InodeVMObject are almost identical. This commit makes them both use the
same code path.
2024-06-09 14:00:41 -04:00
Ali Mohammad Pur 0c99ce91f8 Meta: Use Python>=3.10 in the test262 action
The new Wasm test generation script needs this.
2024-06-09 18:10:37 +02:00
Kenneth Myhra 7cbe5c9d4a LibWeb: Implement static method ReadableStream.from(asyncIterable)
(cherry picked from commit 0ec0e92b100faf92256e704b9e94e9c90a04b642)
2024-06-09 16:24:09 +01:00
Kenneth Myhra 2e45967127 LibWeb: Implement AO readable_stream_from_iterable
(cherry picked from commit 01a8b5ee542c006665a0623c23df59bc6a94cb22)
2024-06-09 16:24:09 +01:00
Kenneth Myhra 9d016f5c7e LibWeb: Add non-standard AO set_up_readable_stream
This AO can be used instead of CreateReadableStream in cases where we
need to set up a newly allocated ReadableStream before initialization of
said ReadableStream, i.e. ReadableStream is captured by lambdas in an
uninitialized state.

(cherry picked from commit ce521a196dc3a50b5a7e35a09917e435b78da1d4)
2024-06-09 16:24:09 +01:00
Diego 11d81d6487 LibWasm: Validate that names are UTF-8 2024-06-09 16:30:09 +02:00
Diego 9721b63d13 CI+Documentation: Use WABT version 1.0.35
Required for `wast2json` to work with latest spec-tests.
2024-06-09 16:30:09 +02:00
Diego a8639245bf AK: Add AllowSurrogates to UTF-8 validator
The [UTF-8](https://datatracker.ietf.org/doc/html/rfc3629#page-5)
standard says to reject strings with upper or lower surrogates. However,
in many standards, ECMAScript included, unpaired surrogates (and
therefore UTF-8 surrogates) are allowed in strings. So, this commit
extends the UTF-8 validation API with `AllowSurrogates`, which will
reject upper and lower surrogate characters.
2024-06-09 16:30:09 +02:00
Diego 27905af9ec LibWasm: Generate all spec-tests properly 2024-06-09 16:30:09 +02:00
Enver Balalic b43d2307cd LibWasm: Implement f32x4 and f64x2 arithmetic SIMD ops
Adds all the arithmetic ops for f32x4 and f64x2 SIMD instructions.

With this, we pass 8375 additional tests :)

Quite a few of the spec tests for this are still failing.
I confirmed with the wasmer runtime manually for a number of them,
and we seem to match their and results. I'm not really sure
what's happening here, a spec bug or wasmer is broken in
the same way.

18476 failed before.
10101 failed after.
2024-06-09 16:30:09 +02:00
Enver Balalic 71cc8aeaef LibWasm: test-wasm: Default initialize u128 parameter bits to 0
This fixes 326 tests.

18802 failed without
18476 failed with.
2024-06-09 16:30:09 +02:00
Diego ebee41494e LibWasm: Check data section offset for overflow during instantiation 2024-06-09 16:30:09 +02:00
circl e8d4bf607c Meta: Update notice to new Ladybird organization name 2024-06-09 13:23:36 +02:00
Shannon Booth d1a997bdb5 LibWeb: Do not release_value twice parsing a referrer policy
This fixes a bug introduced in e7b752eb2d which was causing many live
sites (such as chat.openai.com and github.com/serenityos/serenity) to
crash.

(cherry picked from commit 7a77130923d2246e5b304b107b549388d1f93a0c)
2024-06-09 10:06:31 +01:00
brody-qq a4ca757db9 Kernel: Add method to clean up remapping region loops
In the VMObject code there are multiple examples of loops over
the VMObject's regions (using for_each_region()) that call remap()
on each region.

To clean up usage of this pattern, this patch adds a method in
VMObject that does this remapping loop. VMObject code that needs
to remap its regions call the new method.
2024-06-08 22:36:03 +01:00
Liav A. 0608f15e25 Ports: Update dmidecode to version 3.6 2024-06-08 22:28:29 +01:00
Jamie Mansfield ea69ec8e52 LibWeb: Use a single test for loading attribute 2024-06-08 14:16:48 -04:00
Jamie Mansfield e5a1f1e582 LibWeb: Test fetchPriority attribute on all elements 2024-06-08 14:16:48 -04:00
Jamie Mansfield 4913e09a82 LibWeb/CSS: Implement FontFaceSet.onloadingerror 2024-06-08 14:08:14 -04:00
Jamie Mansfield 9bfdecd165 LibWeb/CSS: Implement FontFaceSet.onloadingdone 2024-06-08 14:08:14 -04:00
Jamie Mansfield 06c1934c3e LibWeb/CSS: Implement FontFaceSet.onloading 2024-06-08 14:08:14 -04:00
Jamie Mansfield c171c9a6ec LibWeb/CSS: FontFaceSet extends EventTarget 2024-06-08 14:08:14 -04:00
Jamie Mansfield f99508a53a LibWeb/CSS: Stub FontFaceSet.check 2024-06-08 14:08:14 -04:00
Jamie Mansfield 4dfb52f133 LibWeb: Implement should block mixed content response to request 2024-06-08 14:07:54 -04:00
Jamie Mansfield e59bccd25e LibWeb: Upgrade mixed requests to potentially trustworthy URLs
(if appropriate)
2024-06-08 14:07:54 -04:00
Jamie Mansfield 7814dad6cf LibWeb: Implement should block mixed content request 2024-06-08 14:07:54 -04:00
Jamie Mansfield e7b752eb2d LibWeb: Implement "Set request’s referrer policy on redirect" AO 2024-06-08 14:07:38 -04:00
Jamie Mansfield 38bffd349b LibWeb/ReferrerPolicy: Add spec link for strip URL AO 2024-06-08 14:07:38 -04:00
Jamie Mansfield a5d298ff7a LibWeb/Fetch: Update "HTTP-redirect fetch" algorithm to latest spec
The spec and implementation's comments had diverged a little, this
brings them in line :)
2024-06-08 14:07:38 -04:00
Jamie Mansfield 91c7920b34 LibWeb: Implement HTMLAreaElement.referrerPolicy 2024-06-08 14:07:38 -04:00
Jamie Mansfield 07cd441e95 LibWeb: Implement HTMLIFrameElement.referrerPolicy 2024-06-08 14:07:38 -04:00
Jamie Mansfield c8e87352d8 LibWeb: Implement HTMLImageElement.referrerPolicy 2024-06-08 14:07:38 -04:00
Jamie Mansfield 901fb0d068 LibWeb: Implement HTMLLinkElement.referrerPolicy 2024-06-08 14:07:38 -04:00
Jamie Mansfield a6fd653afa LibWeb: Use Reflect for HTMLAnchorElement.referrerPolicy 2024-06-08 14:07:38 -04:00
Jamie Mansfield ade7c6c8fb LibWeb: Use Enumerated for HTMLScriptElement.referrerPolicy 2024-06-08 14:07:38 -04:00
Timothy Flynn a497f65578 Test: Skip flakey Text/input/WebAnimations/misc/DocumentTimeline test
Ref https://github.com/LadybirdWebBrowser/ladybird/issues/19

(cherry picked from commit 41c9cb032f56a306bdc3098a2a0d203acb0dd0ff)
2024-06-08 13:40:47 -04:00
circl 52c9a8ed93 Meta: Direct users to the Ladybird repo for future active development 2024-06-08 10:30:07 -04:00
circl 3672f49ad8 Meta: Remove most references to Ladybird in the README 2024-06-08 10:30:07 -04:00
circl ec1692eed2 Browser: Display name as "Browser" once again
This basically reverts 15211cd, since Ladybird has been hard-forked from
the SerenityOS project, this chrome is no longer officially part of it.
2024-06-08 10:30:07 -04:00
Andrew Kaster 3bb41e942f LibCore: Null-check struct addrinfo to avoid freeaddrinfo(NULL)
On some C libraries, like NetBSD and musl-libc, this under-specified
edge case results in a crash rather than silently ignoring the null
pointer.
2024-06-06 09:27:50 -06:00
Andrew Kaster 605aa2e34b Meta: Link librt to LibCoreMinimal on NetBSD
We were already linking librt to LibCore for shm_open and friends.
Now that we build the code that uses POSIX shm into LibCoreMinimal, we
need to link librt into that as well.
2024-06-06 09:27:50 -06:00
Andrew Kaster 1bf926a125 LibCore: Be more BSD-friendly in Core::Environment
FreeBSD and NetBSD don't have secure_getenv(3), same as macOS.
FreeBSD 13 and lower also don't allow setting environ pointers to null.

Co-Authored-By: Robert Clausecker <fuz@FreeBSD.org>
2024-06-06 09:27:50 -06:00
Andrew Kaster da6891bf2e LibJS: Pass -1 as fd when using MAP_ANONYMOUS with mmap
NetBSD and FreeBSD get upset when we don't set the fd to an invalid
value when using a non-shared mapping.

Reported-By: Thomas Klausner <wiz@gatalith.at>
2024-06-06 09:27:50 -06:00
Daniel Bertalan 6c4e0e8549 Tests: Stop invoking UB in AK::NeverDestroyed's tests
Instead of attempting a stack use-after-free by reading an out-of-scope
object's data member, let's keep a flag that checks if the destructor
had been called in the outer scope.
2024-06-06 13:01:12 +02:00
dgaston edb10aa17a Chess: Add time controls
This commit adds functionality to the new game dialog to allow time
controls to be selected. The game logic is updated to take into account
losing on time, time bonuses for moves, and exporting the time control
to PGN.
2024-06-05 20:45:38 -04:00
dgaston 215d348600 Chess: Add new game widget
This change paves the way for adding options such as time controls and
variants when creating a new game.
2024-06-05 20:45:38 -04:00