Timothy Flynn
21cff645a2
LibUnicode: Use ICU to convert Unicode keywords to their BCP 47 value
...
We were manually doing this for the calendar keyword, and would need to
do so for the collation keyword as well. I wasn't aware of this API
originally, so let's start using it.
2025-06-03 09:03:33 +12:00
aplefull
486602e796
LibRegex: Fix handling of + quantifier with zero-width matches
...
CI / Lagom (arm64, Sanitizer_CI, false, macOS, macos-15, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macOS, macOS-arm64, macos-15) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, Linux, Linux-x86_64, blacksmith-8vcpu-ubuntu-2404) (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
Small change that allows quantifiers using Fork* forms (e.g., +) to
succeed after one match, even if that match has zero width.
2025-06-02 15:52:26 +02:00
Timothy Flynn
2380fb0ca1
Meta: Default chosen compilers to the CC and CXX environment variables
...
This regressed when porting find_compiler.sh to python.
2025-06-02 08:04:07 -04:00
Saksham Mittal
c52c05555b
LibWeb: Don't place cursor on certain <input> elements
...
For example, button inputs shouldn't have a cursor
displayed in their text since they're not editable,
and are not meant to be editable.
Fixes #4140
Co-authored-by: Sam Atkins <sam@ladybird.org>
2025-06-02 11:38:38 +01:00
Tim Ledbetter
17f14a277b
LibWeb: Don't crash when interpolating single-value repeatable lists
...
Previously, when interpolating a repeatable list from a list with
multiple values to a single value, we would crash.
2025-06-02 11:33:01 +01:00
Timothy Flynn
8ded0c65dc
LibJS+LibUnicode: Change time zones in a way that works on Windows
...
CI / Lagom (arm64, Sanitizer_CI, false, macOS, macos-15, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macOS, macOS-arm64, macos-15) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, Linux, Linux-x86_64, blacksmith-8vcpu-ubuntu-2404) (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
On Windows, ICU does not look at the TZ environment variable at all. So
to support changing time zones in test-js, let's set ICU's default time
zone directly.
Note that we no longer deal with "null" time zone strings. We just cache
whatever ICU thinks is the current time zone before attempting to change
it, for which we never have a null result.
Co-authored-by: Andrew Kaster <andrew@ladybird.org>
2025-06-01 18:48:58 -04:00
stasoid
8d33a97630
Tests/LibURL: Port to Windows
2025-06-01 16:42:19 -06:00
Tim Ledbetter
e2d0d8e2b9
LibWeb/CSS: Implement the scrollbar-color
property
...
This allows the user to set the scrollbar thumb and track colors.
2025-06-02 00:17:51 +02:00
Aliaksandr Kalenik
285bc005cb
LibJS: Do more comprehensive check if next()
fast path is possible
...
Before this change each built-in iterator object has a boolean
`m_next_method_was_redefined`. If user code later changed the iterator’s
prototype (e.g. `Object.setPrototypeOf()`), we still believed the
built-in fast-path was safe and skipped the user supplied override,
producing wrong results.
With this change
`BuiltinIterator::as_builtin_iterator_if_next_is_not_redefined()` looks
up the current `next` property and verifies that it is still the
built-in native function.
2025-06-02 00:15:36 +02:00
Lucien Fiorini
0fcb574041
LibGfx+LibWeb: Turn Gfx::Filter into a SkImageFilter wrapper
2025-06-01 23:22:10 +02:00
InvalidUsernameException
417f4edc46
Tests/LibWeb: Print properties without indexes
...
The test CSSStyleDeclaration-has-indexed-property-getter is a frequent
source of merge conflicts between PRs that are adding to or otherwise
modifying the list of supported CSS properties.
This is primarily because the test prints out a numeric index of each
property along with the property. As far as I can tell the indexes are
inconsequential for what the test is trying to verify. So lets modify
the printout to only contain the properties without indexes.
2025-06-01 19:09:10 +01:00
Julien Le Bras
3ba6d129df
LibJS: Cache string constants in Generator::add_constant
...
This mirrors the existing caching logic for int32 constants.
Avoids duplication of string constants in m_constants which could
result in stack overflows for large scripts with a lot of similar
strings.
2025-06-01 18:25:59 +02:00
Richard Gibson
9bf836e6c4
js: Don't escape printed strings with --disable-string-quotes
CI / Lagom (x86_64, Sanitizer_CI, true, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
CI / Lagom (arm64, Sanitizer_CI, false, macOS, macos-15, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, GNU) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macOS, macOS-arm64, macos-15) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, Linux, Linux-x86_64, blacksmith-8vcpu-ubuntu-2404) (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
Build Dev Container Image / build (push) Has been cancelled
2025-06-01 09:51:09 -04:00
Timothy Flynn
5e40db5a17
AK: Remove some now-unnecessary workarounds for simdutf base64 usage
2025-06-01 08:03:00 -04:00
Timothy Flynn
3693fd5caa
Meta: Update simdutf to version 7.3.0
2025-06-01 08:03:00 -04:00
Timothy Flynn
d9d87d4816
Meta: Update libjxl to version 0.11.1#1
...
This includes a CMake fix that we added for Ladybird.
2025-06-01 08:03:00 -04:00
Timothy Flynn
0f2bcd26c4
Meta: Update curl to version 8.14.0
2025-06-01 08:03:00 -04:00
Timothy Flynn
2205177d15
Meta: Update vcpkg baseline
2025-06-01 08:03:00 -04:00
Aliaksandr Kalenik
4b4d960cba
LibWeb: Cancel previous animation if new animation-name is "none"
...
CI / Lagom (arm64, Sanitizer_CI, false, macOS, macos-15, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macOS, macOS-arm64, macos-15) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, Linux, Linux-x86_64, blacksmith-8vcpu-ubuntu-2404) (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
"none" value should be interpreted as "no animation" to trigger the path
that cancels previous animation if it exists.
2025-06-01 05:02:12 +02:00
Timothy Flynn
985434ea10
headless-browser: Allow running LibWeb tests without specifying a path
...
CI / Lagom (arm64, Sanitizer_CI, false, macOS, macos-15, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macOS, macOS-arm64, macos-15) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, Linux, Linux-x86_64, blacksmith-8vcpu-ubuntu-2404) (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
Especially on new setups, it is handy for `headless-browser --run-tests`
to "just work". Anyone using ladybird.py will have LADYBIRD_SOURCE_DIR
set in their environment already.
2025-06-01 10:34:30 +12:00
Shannon Booth
bc4317be20
LibWeb/HTML: Handle failure determining mime type fetching module script
...
CI / Lagom (arm64, Sanitizer_CI, false, macOS, macos-15, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macOS, macOS-arm64, macos-15) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, Linux, Linux-x86_64, blacksmith-8vcpu-ubuntu-2404) (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 crash in WPT test:
https://wpt.live/html/semantics/scripting-1/the-script-element/css-module/content-type-checking.html
2025-05-31 09:15:52 -04:00
Shannon Booth
caf959f06c
LibWeb/FileAPI: Handle an aborted stream in Blob::get_stream() close
...
The streams AO that we were calling to close the stream would assert
if it was not in a readable state. This version of close is exported
publicly in the streams specification, and properly handles this
situation.
Fixes a crash in the imported test, and happens to fix some others!
2025-05-31 09:12:57 -04:00
Timothy Flynn
667a568526
Meta: Add compiler arguments to the debug build mode
CI / Lagom (arm64, Sanitizer_CI, false, macOS, macos-15, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macOS, macOS-arm64, macos-15) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, Linux, Linux-x86_64, blacksmith-8vcpu-ubuntu-2404) (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-30 20:06:15 -04:00
Andrew Kaster
6f9e56870e
CMake: Exclude GlobalFontConfig.h from autogenerated clang module
...
CI / Lagom (arm64, Sanitizer_CI, false, macOS, macos-15, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macOS, macOS-arm64, macos-15) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, Linux, Linux-x86_64, blacksmith-8vcpu-ubuntu-2404) (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
This header file is never included by any other headers, and including
it would require adding the fontconfig include paths to the swift
interop header generation, which is not desirable.
2025-05-30 15:21:17 -06:00
Andrew Kaster
17b7f192c4
LibGfx: Add a strict CMake check for the libpng apng patch
2025-05-30 15:21:07 -06:00
Andrew Kaster
8f0dad0898
CMake: Use static libraries for try_compile() in libfuzzer builds
2025-05-30 15:21:07 -06:00
Andrew Kaster
645eac1734
CI: Use new name for macOS JS artifact in js-benchmarks workflow
...
This was missed in 1a0b83a59f
2025-05-30 14:20:44 -06:00
Timothy Flynn
3786d56814
Meta: Remove msbuild presets
...
Let's just support ninja for simplicity. The msbuild presets are
significantly slower anyhow.
2025-05-30 13:52:51 -04:00
Andrew Kaster
1a0b83a59f
CI: Rename macOS js REPL artifact to match name of tgz
...
We haven't built a universal binary in over 11 months. The name is
confusing, and actually breaks esvu on macOS. The fact that nobody
has complained suggests that this is not a common use case..
2025-05-30 11:28:06 -06:00
Andrew Kaster
30fe721a3d
CMake: Set a higher default CMAKE_OSX_DEPLOYMENT_TARGET with Swift
...
We have tests that require 15.0 without checking for availability.
2025-05-30 12:54:12 -04:00
Andrew Kaster
68bba89dc3
CMake: Set macOS deployment target for vcpkg ports to match our build
...
Without this, ports get built with whatever default is there from the
toolchain, and we get all sorts of linker warnings about a mismatch.
2025-05-30 12:54:12 -04:00
Timothy Flynn
0958c5f508
Meta: Provide compiler jobs as a command line argument
...
On my Linux machine with 32 cores, ninja actually defaults to 34 jobs.
By defaulting ourselves to multiprocessing.cpu_count(), we actually
decrease the number of jobs used.
2025-05-30 12:03:38 -04:00
Timothy Flynn
e6938e11b0
Meta: Inspect the host compiler only when needed
...
We don't need to pick a host compiler every time ladybird.py is invoked.
We only need to do so when configuring the Build directory.
This shaves about 10ms off an invocation of `ladybird.py build` on my
machine, going from ~170ms to ~160ms.
2025-05-30 12:03:38 -04:00
Timothy Flynn
16743ee9d9
Meta: Invoke ninja directly instead of cmake --build
...
This shaves about 10ms off an invocation of `ladybird.py build` on my
machine, going from ~180ms to ~170ms.
2025-05-30 12:03:38 -04:00
InvalidUsernameException
52ba40f161
Tests/LibWeb: Fix flaky css background test
...
This test was introduced in 70b52e0994
and
was flaky in CI and on my local machine.
2025-05-30 12:03:25 -04:00
Andrew Kaster
0f81f021ce
LibWeb: Clean up main thread promise when exiting RenderingThreads
...
CI / Lagom (arm64, Sanitizer_CI, false, macOS, macos-15, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macOS, macOS-universal2, macos-15) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, Linux, Linux-x86_64, blacksmith-8vcpu-ubuntu-2404) (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
Not cleaning these up by rejecting or resolving the promise causes
the main thread to try to reject them at EventLoop::exit() time.
If the RenderThread has already been destroyed by then, we get into
use-after-free territory and segfault.
2025-05-30 16:18:23 +02:00
Aliaksandr Kalenik
3178679f0b
LibWeb: Implement CSS transitions support for pseudo elements
...
We already had all necessary things for pseudo elements support in place
except ability to save transition properties in Animatable. This commit
adds the missing part.
2025-05-30 15:48:16 +02:00
Timothy Flynn
9d0c307341
CI: Add a quoteless cache restore key for GitHub runners
...
The way we echo the cache keys for output variables strips these quotes.
So when we save the caches at the end of CI, the keys are sans quotes.
This patch adds an extra cache restore key without quotes to allow jobs
to fetch their own caches again. This will become moot once all runners
are able to use the Blacksmith cache action.
2025-05-30 09:03:35 -04:00
Timothy Flynn
877687d1f6
Meta: Make the ladybird.py test
pattern argument positional
...
Restores API compatibility with the old ladybird.sh.
2025-05-30 06:40:56 -04:00
Timothy Flynn
6345ebb78c
Meta: Don't assume all build commands have a target
...
For example, the "test" and "vcpkg" build commands do not.
2025-05-30 06:40:56 -04:00
Andreas Kling
61285ffbee
LibWeb: Add document null check in ...navigable_target_name_property_set
2025-05-30 10:13:25 +02:00
Andreas Kling
2eea8894a1
LibWeb: Don't crash on named property access on detached window
...
In WindowProxy.[[Get]] it's not guaranteed that the current principal
global object has an associated document at the moment. This may happen
if a script is continuing to execute while a navigation has been
initiated.
Because of that, we can't blindly dereference the active document
pointer, so this patch adds a null check.
2025-05-30 10:13:25 +02:00
InvalidUsernameException
456608cf03
Tests: Fix flaky test
...
CI / Lagom (arm64, Sanitizer_CI, false, macOS, macos-15, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macOS, macOS-universal2, macos-15) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, Linux, Linux-x86_64, blacksmith-8vcpu-ubuntu-2404) (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
This flake was introduced in 164afdcc59
.
2025-05-30 00:12:27 -04:00
Lucien Fiorini
8b08162942
js: Make print variadic for consistency with other repls
2025-05-29 17:33:26 -06:00
Lucien Fiorini
81e84c8273
js: Add option to disable quotes around strings
2025-05-29 17:33:26 -06:00
Timothy Flynn
f46f9b0f02
Meta: Restore default "build everything" behavior in ladybird.py
...
Push notes / build (push) Waiting to run
CI / Lagom (arm64, Sanitizer_CI, false, macOS, macos-15, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macOS, macOS-universal2, macos-15) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, Linux, Linux-x86_64, blacksmith-8vcpu-ubuntu-2404) (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
By default, we want `ladybird.py build` to build everything. We were
previously defaulting to only building the Ladybird target.
We now only fall back to the Ladybird target for commands that run a
program. So `ladybird.py run` will build and run Ladybird.
2025-05-29 16:24:17 -04:00
Timothy Flynn
aa0fcc67b3
Meta: Tentatively support BSD distributions in ladybird.py
...
Support was unknowingly dropped when porting ladybird.sh to ladybird.py.
This tentatively restores this support, but is untested on a BSD system.
2025-05-29 16:24:17 -04:00
Timothy Flynn
7ce88eb4cd
Everywhere: Document use of ladybird.py over ladybird.sh
2025-05-29 16:24:17 -04:00
Timothy Flynn
6ac729e03d
Meta: Replace ladybird.sh contents with invocation to ladybird.py
...
All features supported by ladybird.sh should now work in ladybird.py.
Let's forward invocations and warn that ladybird.sh will be removed.
2025-05-29 16:24:17 -04:00
Timothy Flynn
f2eaf1e57b
Meta: Use new run_command
utility to invoke subprocesses
...
As opposed to just running subprocess.check_call, our `run_command`
utility handles e.g. ctrl+c to avoid spamming the terminal with
KeyboardInterrupt stack traces.
2025-05-29 16:24:17 -04:00