Commit graph

61808 commits

Author SHA1 Message Date
Dan Klishch 8263e0a619 AK: Introduce AK::Coroutine 2024-06-13 17:40:24 +02:00
Dan Klishch 9054682536 AK: Qualify forward call in AK::exchange
Otherwise it fails to resolve ambiguity between std::forward and
AK::forward when called with the std:: type.
2024-06-13 17:40:24 +02:00
Nico Weber 3780499761 CI: Remove Nightly Android workflow 2024-06-11 19:40:08 -04:00
Nico Weber bb2d80a2bb Everywhere: Gently remove the ladybird android port
With Ladybird now being its own repository, there's little reason
to keep the Ladybird Android port in the SerenityOS repository.

(The Qt port is useful to be able to test changes to LibWeb in lagom
so it'll stay around. Similar for the AppKit port, since getting
Qt on macOS is a bit annoying. But if the AppKit port is too much
pain to keep working, we should toss that too.

Eventually, the lagom browser ports should move out from Ladybird/
to Meta/Lagom/Contrib, but for now it might make sense to leave them
where they are to keep cherry-picks from ladybird easier.)
2024-06-11 19:40:08 -04:00
Tim Ledbetter ce11613677 CrashReporter: Don't update window progress if window has been closed
This prevents a crash that could happen if crash reporter was closed
while generating a crash report.
2024-06-10 23:44:09 -04:00
MacDue 860804baa5 LibWeb: Add support for text in the AffineCommandExecutorCPU 2024-06-10 17:41:33 -04:00
MacDue 0ca71009d0 LibGfx: Add Path::transform()
This applies an affine transform to a path in-place.
2024-06-10 17:41:33 -04:00
MacDue dae6015431 LibGfx: Add cache for glyph paths
These are only cached via the `append_glyph_path_to()` API, so uses of
fonts that only care about bitmaps do not pay for this cache.
2024-06-10 17:41:33 -04:00
MacDue d62d5079f4 LibGfx: Add relative to last point mode to Path::append_path() 2024-06-10 17:41:33 -04:00
Kenneth Myhra 702ff7eb46 LibWeb: Implement and wire up TransformStream's cancel callback
(cherry picked from commit e70886595ab83d650662f46be2ac2e147603c790)
2024-06-10 08:23:32 -04:00
Kenneth Myhra 8f8d577b52 LibWeb: Update steps for transform_stream_default_sink_abort_algorithm
Updating these steps enables the writable side of a TransformStream to
raise the cancel callback when it's aborted.

(cherry picked from commit 6d7885e25036bf08e31f2ad7a13db31767deabaf)
2024-06-10 08:23:32 -04:00
Kenneth Myhra 99d5f1ca2e LibWeb: Update cancel_algorithm steps in AO initialize_transform_stream
(cherry picked from commit 38142eaf53bfc5bb97adbc46d0ce0687716b7df5)
2024-06-10 08:23:32 -04:00
Kenneth Myhra 30c5bc3db4 LibWeb: Implement AO transform_stream_default_source_cancel_algorithm
(cherry picked from commit e848249b8d15fe722e569c22c06f6e92482f35bf)
2024-06-10 08:23:32 -04:00
Kenneth Myhra e072913bac LibWeb: Add internal slots [[cancelAlgorithm]] and [[finishPromise]]
This adds internal slots [[cancelAlgorithm]] and [[finishPromise]] to
TransformStreamDefaultController.

(cherry picked from commit ff5be1fd363c4cb9ba510679b1ee65a0c0b10bc2)
2024-06-10 08:23:32 -04:00
Kenneth Myhra 44bc3a54a3 LibWeb: Implement AO transform_stream_unblock_write
(cherry picked from commit afb74eca52fda83475a863b307db50a7a9f86f7a)
2024-06-10 08:23:32 -04:00
Kenneth Myhra 2668aa90da Test/LibWeb: Add test to prove a ReadableStream can be cancelled
(cherry picked from commit fc37bc328e065465f4d60cf90a3185973be10598)
2024-06-10 08:23:32 -04:00
Andreas Kling 8994dcb4f9 Everywhere: Use HTTP::HeaderMap for request headers
No longer just for response headers! The same type is obviously useful
and ergonomic when making requests as well.

(cherry picked from commit 260c5c50ad19f19d0d4c30984e512f56c055ecff)

Updated various SerenityOS components to make it build.
2024-06-10 12:01:57 +02:00
Andreas Kling bec8d73cb3 LibHTTP+LibWeb: Stop bundling "Set-Cookie" headers as JSON
Before we had HTTP::HeaderMap (which preserves multiple headers with the
same name), we collected multiple "Set-Cookie" headers and bundled them
together as a JSON array.

This was a huge hack, and now we can stop doing that, since LibWeb gets
access to the full set of headers now.

(cherry picked from commit 5ac093885922246529a467054888e598f8832450)
2024-06-10 12:01:57 +02:00
Andreas Kling c9a1eebcb9 Everywhere: Add HTTP::HeaderMap and use for response headers
Instead of using a HashMap<ByteString, ByteString, CaseInsensitive...>
everywhere, we now encapsulate this in a class.

Even better, the new class also allows keeping track of multiple headers
with the same name! This will make it possible for HTTP responses to
actually retain all their headers on the perilous journey from
RequestServer to LibWeb.

(cherry picked from commit e636851481eabdf00953573a5eb459ee52feeacc)

Updated various SerenityOS components to make it build.

Fetch: Make sure we iterate over HeaderMap's headers()

This fixes a build failure when built with CMake option
'-DENABLE_ALL_THE_DEBUG_MACROS=ON'.

(cherry picked from commit c51d01bea712d75f9b2cd700be942935044e49b4)
2024-06-10 12:01:57 +02:00
Ali Mohammad Pur bf5c2d0859 Utilities: Add a crypto benchmarking tool 2024-06-10 11:59:14 +02:00
Andreas Kling 3d61428bb0 Tests: Skip Text/input/HTML/form-image-submission.html (flaky)
Issue: https://github.com/LadybirdWebBrowser/ladybird/issues/100
(cherry picked from commit LadybirdBrowser/ladybird@533eea1958)
2024-06-09 19:48:43 -04:00
Abhishek Raturi ceec7cd537 Hackstudio: Add a window title when diff is opened
Set window title when a diff is opened from Git
widget in HackStudio.
2024-06-09 14:13:29 -04:00
MacDue 9597403bf8 LibWeb: Slightly simplify popping SCs in AffineCommandExecutorCPU 2024-06-09 14:12:06 -04:00
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