Commit graph

69828 commits

Author SHA1 Message Date
Andrew Kaster
811d53d295 CI: Add nightly Windows CI job
This job uses the windows_ci_ninja preset to build just the
components and unit tests that are known to work with ClangCL on the
amd64-pc-windows-msvc target triple.

As a nightly job, its failures are non-blocking for any PRs, though
they should be fixed eventually or the job will get turned off by
email-annoyed maintainers.
2025-05-21 15:57:59 -06:00
Timothy Flynn
9f3526b080 LibWeb: Handle non-OK network responses in <object> elements
Some checks are pending
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macos-15, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
We were previously only testing for network errors, which includes e.g.
DNS resolution and connection errors. It does not include e.g. HTTP 404
responses, which is exercised by Acid 2.
2025-05-21 12:13:20 -06:00
Ashton
fc204c8732 Meta: Add addr2line command to ladybird.py 2025-05-21 11:35:20 -06:00
Ashton
061a7f766c Meta: Add rebuild command to ladybird.py 2025-05-21 11:35:20 -06:00
Ashton
56fd109252 Meta: Add clean command to ladybird.py 2025-05-21 11:35:20 -06:00
Ashton
bfc0715455 Meta: Add vcpkg command to ladybird.py 2025-05-21 11:35:20 -06:00
Ashton
08d11b9fba Meta: Add debug command to ladybird.py 2025-05-21 11:35:20 -06:00
Ashton
5602d3cdf1 Meta: Add install command to ladybird.py 2025-05-21 11:35:20 -06:00
Ashton
73159fe2ce Meta: Add run command to ladybird.py 2025-05-21 11:35:20 -06:00
Ashton
c51abfb2ca Meta: Add test command to ladybird.py 2025-05-21 11:35:20 -06:00
ayeteadoe
c9624d5118 Meta: Add build command to ladybird.py 2025-05-21 11:35:20 -06:00
Noah
85842c1739 LibWeb: Stub out several methods for ElementInternals
This begins implementation on form-associated custom elements.
This fixes a few WPT tests which I'm importing.

Co-authored-by: Sam Atkins <sam@ladybird.org>
2025-05-21 15:28:10 +01:00
Veeti Paananen
7c4fd9f624 LibWeb/CSS: Use case insensitive tag and attribute name in ancestor hash
Fixes #4793.
2025-05-21 08:54:40 -04:00
Shannon Booth
579730d861 LibWeb: Prefer using equals_ignoring_ascii_case
Which has an optmization if both size of the string being passed
through are FlyStrings, which actually ends up being the case
in some places during selector matching comparing attribute names.
Instead of maintaining more overloads of
Infra::is_ascii_case_insensitive_match, switch
everything over to equals_ignoring_ascii_case instead.
2025-05-21 13:45:02 +01:00
Ali Mohammad Pur
cfc241f61d LibRegex: Make the trie rewrite optimisation maintain the alt order
This is required by the spec.
2025-05-21 14:28:45 +02:00
Ali Mohammad Pur
2eccd68ba5 LibRegex: Document the append_alternative optimisation a bit 2025-05-21 14:28:45 +02:00
Timothy Flynn
95fc0a8070 LibWeb: Implement TransformStream transfer 2025-05-21 06:54:44 -04:00
Timothy Flynn
cca08ad833 LibWeb: Implement WritableStream transfer 2025-05-21 06:54:44 -04:00
Timothy Flynn
312db85a84 LibWeb: Implement ReadableStream transfer 2025-05-21 06:54:44 -04:00
Timothy Flynn
7e225b496d LibWeb: Implement transferable streams AOs
These AOs are common between transferable ReadableStream, WritableStream
and TransformStream objects.
2025-05-21 06:54:44 -04:00
Timothy Flynn
ee9d860ba2 LibWeb: Allow creating a MessagePort with a different primary interface
This is needed to transfer streams, which use message ports as the means
of transport.
2025-05-21 06:54:44 -04:00
Timothy Flynn
36da270dbe LibIPC+LibWeb: Flush MessagePort messages before closing
The spec isn't super clear on what disentagling a MessagePort means. But
we are required to send all pending messages before closing the port.

This is a bit tricky because the transport socket performs writes on a
background thread. From the main thread, where the disentanglement will
occur, we don't really know the state of the write thread. So what we do
here is stop the background thread then flush all remaining data from
the main thread.
2025-05-21 06:54:44 -04:00
Timothy Flynn
8b3355ed0d LibIPC: Address a couple of clangd warnings in IPC::TransportSocket
* We need the full definition of IPC::File in the header.
* We need(ed) Core::System in the header. Move AutoCloseFileDescriptor's
  ctor and dtor out-of-line to avoid this.
2025-05-21 06:54:44 -04:00
Timothy Flynn
356727f294 LibWeb: Provide missing includes to StructuredSerializeTypes.h 2025-05-21 06:54:44 -04:00
Aliaksandr Kalenik
95e1ec4abc LibJS: Skip caching get_by_id() if object's shape is changed by a getter
Some checks are pending
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macos-15, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Fixes a bug that reproduces with the following steps:
1. Create an object with a getter for property "a" in its prototype,
   where the getter adds an "a" property to the object itself.
2. Call the "a" getter in a loop for the first time. This triggers
   caching of metadata indicating that the "a" property is located in
   the prototype chain.
3. Call the "a" getter in a loop for the second time. Oops, the cache
   says the getter is in the prototype chain, but the object now
   also has its own "a" property that was added by the first getter
   call.
2025-05-20 19:10:56 -04:00
Ahmed Elawad
7af188dc52 Documentation: Fix Ladybird's documentation url 2025-05-20 15:53:48 -04:00
Andrew Kaster
0c434485b4 CMake: Rework Windows build and test presets
Make them work with the new preset names, and hide platform-specific
presets on platforms that don't support them.
2025-05-20 12:51:30 -06:00
ayeteadoe
8cf01a25c2 AK: Add initial support for AK testsuite on Windows
Some checks are pending
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macos-15, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
We now explicitly enabling support for the minimum libraries needed
to build and run the AK testsuite. 81/82 tests are running and
passing. The exception is LexicalPath, as some path behaviour on
Windows is different than Unix, so the current tests will have lots of
platform specific failures. The implementer of LexicalPathWindows
recommended windows-specific tests here, so I will do that in a
follow up.
2025-05-20 10:58:43 -06:00
ayeteadoe
a11242f3de CMake: Expose Windows CI utilities
This will allow us to gradually build up official support for Windows,
as only targets we have explicitly marked as supported on windows will
be built and ran during CI.
2025-05-20 10:58:43 -06:00
Timothy Flynn
d26b8b2537 Documentation: Show how to generate reference screenshots for tests 2025-05-20 10:48:03 -04:00
Timothy Flynn
344d6efd11 Documentation: Update notes about LibWeb test paths
All test types have `input` and `expected` folders.
2025-05-20 10:48:03 -04:00
Timothy Flynn
1933d5fa44 Documentation: Remove non-ASCII characters from Testing.md
Removes some NBSP and non-ASCII quotes/hyphens in favor of keeping this
document simpler to manage.
2025-05-20 10:48:03 -04:00
Timothy Flynn
141afbc63d headless-browser: Allow specifying the path to the saved screenshot
This is to help make creating Screenshot tests a bit easier.
2025-05-20 10:48:03 -04:00
Andreas Kling
d7cd8f0fc7 LibWeb: Make CSS sign(A) ignore A's unit and just look at the raw value
This allows stuff like sign(1em) even when we don't have something to
resolve the em unit against.

+25 new WPT subtest passes.
2025-05-20 13:28:40 +02:00
Andreas Kling
4ef34ebd96 LibWeb: Make CSS sign(A) behave correctly for negative zero
We were incorrectly returning 0 instead of -0 for sign(-0).

+7 new WPT subtest passes.
2025-05-20 13:28:40 +02:00
Andreas Kling
c1e79d0b13 LibWeb: Handle calc() in CSS z-index
We also make getComputedStyle() reflect the actually used z-index value,
since otherwise this change is hard to observe.

+26 new WPT subtest passes.
2025-05-20 13:28:40 +02:00
Andreas Kling
821d54de7f LibWeb: Invalidate layout tree on CSS position property change
When position changes, we may need to make larger structural updates
to the layout tree. A simple relayout is not sufficient.

This was a source of flakiness in the engine, and gives us at least
+28 new WPT subtest passes.
2025-05-20 13:28:40 +02:00
Andrew Kaster
f66c55138b Utilities: Move install rules for js repl to Utilities
Some checks are pending
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macos-15, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
2025-05-19 18:37:15 -04:00
Andrew Kaster
6548f9b6dd CMake: Move library subdirectory inclusion to Libraries/CMakeLists.txt 2025-05-19 18:37:15 -04:00
Andrew Kaster
e4fb3a86a1 Tests: Move Tests CMake rules to Tests/CMakeLists.txt
Get this logic out of Meta/Lagom/CMakeLists.txt, in the hope that we
can eventually remove the Lagom CMakeLists.txt file entirely.
2025-05-19 18:37:15 -04:00
Andrew Kaster
26c76a8347 Tests: Move test-wasm build rules to Tests/LibWasm 2025-05-19 18:37:15 -04:00
Andrew Kaster
da106177b4 AK: Move install rules into AK's CMakeLists 2025-05-19 18:37:15 -04:00
Andrew Kaster
5418165690 Tests: Move LibJS test rules to Tests/LibJS 2025-05-19 18:37:15 -04:00
Andrew Kaster
72ca813b6b CMake: Handle CMP0174 in Lagom CMake functions, and support CUSTOM_MAIN 2025-05-19 18:37:15 -04:00
Andrew Kaster
bf01470732 Tests: Remove unused test-test262 application
This test app was created to run test262-based tests on the SerenityOS
target, without having to port the entire test262 runner and driver
python script. We have no need for it here.
2025-05-19 18:37:15 -04:00
Andrew Kaster
432bc0f638 LibTLS+Tests: Build LibTLS tests from their test directory
Instead of building them from Lagom, build them here and use lagom_test.
Also remove second download of cacert.pem.
2025-05-19 18:37:15 -04:00
Andrew Kaster
1878ed10d2 CMake: Move Utilities build rules to Utilities directory 2025-05-19 18:37:15 -04:00
Andrew Kaster
94a20f6706 Tests+Utilities: Move test262-runner to Utilities
This is a utility more than it is a test in itself. We use it to run
test262 tests, which are external to this repo. The test-js runner is
still private test infrastructure though, so it stays where it is.
2025-05-19 18:37:15 -04:00
Andrew Kaster
52efd90445 CMake: Remove old gcc version check
We require newer than gcc 12 at this point, so this check is no longer
needed.
2025-05-19 18:37:15 -04:00
Sam Atkins
6e45d8ba6c LibWeb/CSS: Set enum sizes for PropertyID and Keyword
The effect of this is hard to measure, but reducing them from 4 bytes
each to 2 bytes can't hurt. :^)
2025-05-20 10:14:21 +12:00