Commit Graph

4447 Commits

Author SHA1 Message Date
ayeteadoe
3708ac5599 Meta: Use non-aliased "ladybird" ninja target on Windows in ladybird.py
When attempting to use "Ladybird" as the target passed to ninja, we get
"ninja: error: unknown target 'Ladybird', did you mean 'ladybird'?".

Note that "ladybird" also works on Unix; however, given the alias was
carried over from ladybird.sh for convenience, we will keep it in place
for non-Windows builds.
2025-10-29 21:07:52 -06:00
ayeteadoe
95f239a357 CMake: Add Windows executable helper function
The function currently has 2 purposes: (1) To copy dependent dlls for
executables to output binary directory. This ensures that these helper
processes can be ran after a build given not all DLLs from vcpkg libs
get implicitly copied to the bin folder. (2) Allow fully background
and/or GUI processes to use the Windows Subsystem. This prevents
unnecessarily launching a console for the process, as we either require
no user interaction or the user interaction is all handled in the GUI.
2025-10-29 21:07:52 -06:00
Tete17
676171bccd IDLGenerators: Allow set_attribute's to throw exceptions 2025-10-28 13:46:54 +00:00
Zaggy1024
9f44fcbded Everywhere: Remove AudioCodecPlugin and Qt Multimedia
These are no longer needed now that audio is played through
PlaybackManager.
2025-10-27 17:28:49 -07:00
Zaggy1024
ccf4b3f6e9 LibMedia: Implement media seeking
This implementation allows:
- Accurate seeking to an exact timestamp
- Seeking to the keyframe before a timestamp
- Seeking to the keyframe after a timestamp
These three options will be used to satisfy the playback position
selection in the media element's seeking steps.
2025-10-27 17:28:49 -07:00
Zaggy1024
3ebaa0cd3f LibMedia: Implement a generic MediaTimeProvider for video-only timing
This time provider can later be swapped out for the AudioMixingSink
when it implements the MediaTimeProvider interface, so that frame
timing can be driven by audio when it is present.
2025-10-27 17:28:49 -07:00
Zaggy1024
0ff330c906 LibMedia: Play audio through PlaybackManager using Providers/Sinks
This commit implements the functionality to play back audio through
PlaybackManager.

To decode the audio data, AudioDataProviders are created for each track
in the provided media data. These providers will fill their audio block
queue, then sit idle until their corresponding tracks are enabled.

In order to output the audio, one AudioMixingSink is created which
manages a PlaybackStream which requests audio blocks from multiple
AudioDataProviders and mixes them into one buffer with sample-perfect
precision.
2025-10-27 17:28:49 -07:00
Zaggy1024
7e238cd724 LibMedia: Add separate classes managing decoding and displaying video
These are unused in this commit, but will later be used to output video
via PlaybackManager, or to decode video directly to some consumer.
2025-10-27 17:28:49 -07:00
Callum Law
5381146e85 LibWeb: Include PropertyID.h in fewer header files
This reduces the size of the recompile when PropertyID.h is modified
from ~1500 to ~125
2025-10-27 14:50:54 +00:00
Callum Law
59a1184469 LibWeb: Remove custom hash function for PropertyID
The default hash function for enums does the same thing
2025-10-27 14:50:54 +00:00
Rocco Corsi
73b01a975a CI: Add All_Debug CI job 2025-10-27 08:46:02 -04:00
Jelle Raaijmakers
ba78e3d4be CI+Meta: Synchronize commit linting rules
Our CI commit linter now evaluates commit messages line by line, similar
to `Meta/lint-commit.sh`.

The URL rule was updated to allow any freestanding URL, optionally
prefixed by whitespace.
2025-10-24 13:09:46 +02:00
Tim Ledbetter
49a46522d0 Meta: Use binary search instead of a Trie for public suffix list lookups 2025-10-23 15:01:13 +02:00
Luke Wilde
4ede2cdf18 LibWebView+WebContent: Allow setting the default time zone
This is used by tests to set the default time zone to UTC.

This is because certain tests create JavaScript Date objects, which are
in the current timezone.
2025-10-23 14:42:45 +02:00
ste
b50b89b4a8 Meta: Do not set -march=native on riscv64 2025-10-23 12:17:21 +02:00
ste
b28a97b399 Meta: Add build support for RISC-V (riscv64)
Co-authored-by: Bas M. <bas@opvolger.net>
2025-10-23 12:17:21 +02:00
Callum Law
d32f99b16f LibWeb: Ensure all passed arguments are used when parsing math functions
This disallows things such as `log(1, foobar)` where we would previously
just skip over `foobar` and parse this as `log(1)`
2025-10-23 09:34:12 +01:00
Undefine
abe536652f Meta+LibCore: Disable --no-undefined on FreeBSD and remove LibCore hack
It turns out it's much cleaner to just allow undefined symbols like we
already do for sanitizer Clang and remove the weak symbol definition.
2025-10-22 13:54:54 +02:00
Luke Wilde
4ebe43af58 LibWeb/WebGL2: Implement most of the transform feedback APIs 2025-10-21 23:29:50 +02:00
Luke Wilde
5c1bf5c3f6 LibWeb/WebGL2: Implement most of the query APIs 2025-10-21 23:29:50 +02:00
Andreas Kling
dfa796a4e4 LibJS+LibWeb: Use GC::Weak instead of AK::WeakPtr for GC-allocated types
This makes some common types like JS::Object smaller (by 8 bytes) and
yields a minor speed improvement on many benchmarks.
2025-10-17 17:22:16 +02:00
Callum Law
0e82ab2966 LibWeb: Define <opacity-value> as a ValueType
Since `<opacity-value>` is used across multiple properties it makes
sense to have it defined as a value.
2025-10-17 11:10:05 +01:00
Ali Mohammad Pur
ddb35dcb5f LibWasm: Accept proposal 'memory64' (but don't actually run it)
This is a WIP implementation.
2025-10-15 01:26:29 +02:00
Ali Mohammad Pur
6a6f747701 LibWasm: Add support for proposal 'tail-call' 2025-10-15 01:26:29 +02:00
Tim Ledbetter
2f5481284d Meta: Don't attempt to download WPT test resources from external URLs 2025-10-14 10:27:11 +01:00
Timothy Flynn
281bf227ad Meta: Support importing WPT resources in fetch() invocations 2025-10-10 15:10:03 -04:00
Timothy Flynn
a229a9d7e1 Meta: Store parsed WPT resources as a set
If a resource appears in a test more than once, such as:

    <script src="/foo.png">
    <script src="/foo.png">

Then we end up replacing "/foo.png" in the test source that many times
as we iterate over the resource array, like so:

    source.replace("/foo.png", "../foo.png")

So we end up with:

    <script src="..../foo.png">
    <script src="..../foo.png">

Store the resources as a set instead.
2025-10-10 15:10:03 -04:00
R-Goc
5deeb55461 Meta: Add cpptrace to flatpak manifest
This commit adds cpptrace to the flatpak manifest, fixing the build.

Co-authored-by: Jan Koudijs <theappgineer@gmail.com>
2025-10-10 12:46:20 +02:00
R-Goc
3c7bad32cd AK: Clean up backtraces
This commit replaces the default backtrace logic with cpptrace, for
nicer, colored backtraces. Cpptrace runs on all of our supported
platforms excpet android. As such backtrace.h is left in place.

All the backtrace functions are made noinline to have a consistent
number of frames. A maximum depth parameter is added to dump_backtrace
with a default of 100. This should be enough, and can be easily
changed, and allows for limiting the maximum depth.

Setting the LADYBIRD_BACKTRACE_SNIPPETS environment variable enables
surrouding code snippets in the backtrace. Specifically 2 lines above
and below. This number can be changed by calling snippet_context on the
formatter. For the whole list of options of what can be done with
formatting see the cpptrace repository.

On Windows we skipped frames when verification fails and when
dump_backtrace was added the logic was wrong and would have skipped
frames we care about.

This commit also implements skipping frames on Linux.
The only time where this does not skip all frames is when the call to
backtrace gets intercepted. Then we will end up skipping one frame less
than needed.

To keep delayload on Windows a patch and overlay port is used. When
upstream accepts these changes and vcpkg bumps the version the patch
could be removed to have just the cmake define.
2025-10-08 07:07:57 +02:00
Jan Koudijs
597f04e462 Meta: Update fast_float to v8.1.0 in Flatpak manifest
Version 8.1.0 of fast_float contains a change that fixes #6205.
2025-10-05 14:41:01 +02:00
Jan Koudijs
ea178a85e1 Meta: Set option to enable baseline CPU target for CI in Flatpak
PR #6010 adds the ENABLE_CI_BASELINE_CPU option,
but for the Flatpak manifest it was missed to set the value.
This commit fixes that.
2025-10-05 14:41:01 +02:00
Sam Atkins
1e1752b33b LibWeb/CSS: Mark list-valued properties
Typed-OM requires us to have a generic way of asking "does property X
accept a list or a single value?" so this exists mainly for that.
Coordinating lists are annotated too - I'm not clear on exactly what
will be needed for those, but giving them a unique value now at the
worst will make them easier to find later.
2025-10-04 22:57:00 +02:00
Johannes Gustafsson
f04b866cb0 LibWeb: Implement stubs for XPathEvaluator 2025-10-03 13:16:11 +02:00
Sam Atkins
a8312bf571 LibWeb/CSS: Use FlyString const& for property name IDL parameters 2025-10-02 13:46:04 +01:00
Sam Atkins
c0ef7f09e4 LibWeb/CSS: Use PropertyNameAndID instead of old Variant 2025-10-02 13:46:04 +01:00
Aliaksandr Kalenik
ffc05a9ca9 LibWeb/WebGL: Define Uint32List exactly like in the spec
Same fix as d54cab60 but applied for Uint32List.
2025-09-30 18:35:32 +02:00
Aliaksandr Kalenik
c75a8fab3b LibWeb/WebGL: Define Int32List exactly like in the spec
Same fix as d54cab60 but applied for Int32List.
2025-09-30 17:57:46 +02:00
Aliaksandr Kalenik
22075c08e4 BindingsGenerator: Return the exact typed array member type for unions
Allows definition of:
`typedef (Float32Array or sequence<GLfloat>) Float32List;`

which did fail to compile before, because `GC::Root<JS::Object>` fails
to implicitly cast into
`AK::Variant<GC::Root<JS::Float32Array>, AK::Vector<float>>`.
2025-09-30 16:47:16 +02:00
Sam Atkins
a098b5fcc4 LibWeb/CSS: Remove PropertyID::Invalid 2025-09-30 15:21:09 +02:00
Tim Ledbetter
3299ea97c6 LibWeb: Treat word-wrap as an alias for overflow-wrap 2025-09-30 13:50:53 +01:00
Jan Koudijs
937f598de5 Meta: Update simdutf to v7.4.0 in Flatpak manifest 2025-09-26 17:23:53 +02:00
Sam Atkins
a1db5e7789 LibWeb/CSS: Implement CSSMatrixComponent
Equivalent to the matrix() and matrix3d() transform functions.

+19 WPT subtests.
2025-09-24 12:27:05 +01:00
Sam Atkins
8e86bf2dd0 LibWeb/CSS: Implement CSSTransformComponent
This is a base type for the various transform functions.

CSSMatrixComponent's to_string() can throw exceptions, so to_string() is
implemented that way. https://github.com/w3c/fxtf-drafts/issues/611

+9 WPT subtests.
2025-09-24 12:27:05 +01:00
Callum Law
43dd0f2dda LibWeb: Properly clamp interpolated opacity values
Opacity values are unique in that the range which calculated and
interpolated values should be clamped to [0,1] is different from the
range of allowed values [-∞,∞].

This fixes 28 WPT tests that were regressed in #6112
2025-09-24 12:01:52 +01:00
Niccolo Antonelli Dziri
a72b0c29bb LibWeb: Add a simplified Notification constructor
This allows the Notification object to be created in javascript without
any additional functionalities.

It passes two wpt tests which require a call to the notification
constructor with no arguments.

https://wpt.live/notifications/constructor-basic.https.html

https://wpt.live/notifications/constructor-invalid.https.html
2025-09-24 11:53:14 +01:00
Pavel Shliak
a7f85e1349 Meta: Use StringView consistently in IDL types argument list 2025-09-24 08:45:26 +01:00
Ali Mohammad Pur
83f52fca80 Meta: Pin Wasm spec testsuite to a known commit
The current HEAD contains a bunch of stuff not supported by wabt (or
us), that also appear to not be fully merged yet; stick to the last
known commit for now.
2025-09-22 13:49:59 +02:00
Aliaksandr Kalenik
451c947c3f LibJS: Fast-path own-property enumeration and reduce descriptor lookups
Before this change, PropertyNameIterator (used by for..in) and
`Object::enumerable_own_property_names()` (used by `Object.keys()`,
`Object.values()`, and `Object.entries()`) enumerated an object's own
enumerable properties exactly as the spec prescribes:
- Call `internal_own_property_keys()`, allocating a list of JS::Value
  keys.
- For each key, call internal_get_own_property() to obtain a
  descriptor and check `[[Enumerable]]`.

While that is required in the general case (e.g. for Proxy objects or
platform/exotic objects that override `[[OwnPropertyKeys]]`), it's
overkill for ordinary JS objects that store their own properties in the
shape table and indexed-properties storage.

This change introduces `for_each_own_property_with_enumerability()`,
which, for objects where
`eligible_for_own_property_enumeration_fast_path()` is `true`, lets us
read the enumerability directly from shape metadata (and from
indexed-properties storage) without a per-property descriptor lookup.
When we cannot avoid `internal_get_own_property()`, we still
benefit by skipping the temporary `Vector<Value>` of keys and avoiding
the unnecessary round-trip between PropertyKey and Value.
2025-09-21 15:06:32 +02:00
Tim Ledbetter
637724f8d9 LibWeb: Add the overflow-inline property 2025-09-19 13:41:27 +01:00
Tim Ledbetter
2e00ff80e5 LibWeb: Add the overflow-block property 2025-09-19 13:41:27 +01:00