Commit graph

4317 commits

Author SHA1 Message Date
Andrew Kaster
a0b902cca1 CMake: Set visibility flags with add_cxx_compile_options() helper
This makes the flags not break Swift builds
2025-07-09 16:26:49 -06:00
Luke Wilde
08a03534af Meta+RequestServer: Enable HTTP/3 for curl
This adds an overlay port for curl that adds the features required for
HTTP/3.

This is not quite compatible with the upstream vcpkg.json, because
enabling HTTP/2 makes it use the default SSL backend, which is
sectransp for macOS and schannel on Windows. These backends are not
compatible with ngtcp2. Additionally, we can not build curl with
multiple SSL backends when using ngtcp2.

I couldn't find a way to selectively disable/enable dependencies based
on what features are enabled, so I made HTTP/2 pick OpenSSL in our
overlay port. Upstream vcpkg will likely want to support wolfSSL and
GnuTLS backends for ngtcp2, so they'll be additional work to get this
into upstream.
2025-07-09 14:44:56 -06:00
Luke Wilde
993d8df29b Meta: Add overlay port for curl
This will be used to add HTTP/3 support.
2025-07-09 14:44:56 -06:00
Sam Atkins
1ff1093a24 LibWeb: Define a PropertyIDOrCustomPropertyName type
We often want to identify a property, but if we have a PropertyID we
don't want to have to convert it to a string to then convert it back
again. However, custom properties don't have a useful PropertyID. So,
here's a type with a verbose name.
2025-07-09 16:44:20 +01:00
Andrew Kaster
44d2e22b93 CMake: Add a flatpak build for org.ladybird.Ladybird
Some checks are pending
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / 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
This build depends on the KDE Flatpak SDK, and builds any missing
dependencies manually as source modules.

The flatpak can be built with the following command:

```sh
flatpak-builder --user --force-clean --install-deps-from=flathub \
    --ccache --repo=Build/repo --install Build/flatpak \
    Meta/CMake/flatpak/org.ladybird.Ladybird.json
```

After building, the flatpak can be run with:

```sh
flatpak run --user --devel org.ladybird.Ladybird
```

If there are issues launching RequestServer, the .pid and .sock files
under $XDG_RUNTIME_DIR may need removed.

```sh
flatpak run --user --command=sh --devel org.ladybird.Ladybird
rm -f $XDG_RUNTIME_DIR/Ladybird.*
```
2025-07-08 11:45:32 -06:00
Andrew Kaster
204e787131 CMake: Add service, desktop, and icon files for Linux-like systems
These files are lifted from the ladybird-gtk4 repository and adapted
to work with the Qt UI port. They are installed by default on Linux, but
can be installed via a CMake option on other platforms.

Co-Authored-By: Sergey Bugaev <bugaevc@serenityos.org>
Co-Authored-By: Nicolas Ramz <nicolas.ramz@adevinta.com>
Co-Authored-By: Beckett Normington <beckett@b0ba.dev>
Co-Authored-By: Xexxa <93391300+Xexxa@users.noreply.github.com>
2025-07-08 11:45:32 -06:00
Sam Atkins
69d4811ef7 LibWeb: Generate logical property mappings
To support this, how we declare logical property aliases has changed.
Instead of `logical-alias-for` being a list of properties, it's now an
object with a `group` and `mapping`. The group is the name of a logical
property group in LogicalPropertyGroups.json. The mapping is which
side/dimension/corner this property is. Hopefully it's self-explanatory
enough.

The generated code is very much a copy of what was previously in
`StyleComputer::map_logical_alias_to_physical_property_id()`, so there
should be no behaviour change.
2025-07-08 11:45:15 -06:00
Jelle Raaijmakers
ead0a2c78a Everywhere: Rename serenity_main to ladybird_main
No functional changes.
2025-07-08 09:17:16 -04:00
Aliaksandr Kalenik
5a874cc62a LibWeb: Remove ClippableAndScrollable mixin
Initially ClippableAndScrollable was introduced, because we had
PaintableBox and InlinePaintable and both wanted to share clipping and
scrolling logic. Now, when InlinePaintable is gone, we could inline
ClippableAndScrollable implementation into PaintableBox.
2025-07-07 22:04:25 +02:00
Andrew Kaster
5878715889 CMake: Set SKCMS_API to default visibility for non-vcpkg skia as well 2025-07-07 06:47:06 -04:00
Tim Ledbetter
c427f75b02 Meta: Include the --install-fonts argument when running WPT
This ensures the Ahem test font is installed.
2025-07-07 11:57:41 +02:00
Andrew Kaster
ffd600a7f5 Meta+RequestServer: Remove local download of ca-certificates
We haven't required a local copy of the ca-certificates since switching
to OpenSSL as the backend for TLS. Remove the script to download the
PEM file, and update the tests to use the system's CA certificates.
2025-07-07 09:10:05 +02:00
Andrew Kaster
12dd5f0804 CMake: Include utils from places that were implicitly dependent on it
These files use functions that are declared in utils.cmake, but were
relying on implicit inclusion from other files.
2025-07-07 09:10:05 +02:00
Sam Atkins
e63d81b36e LibWeb: Add CustomStateSet IDL type 2025-07-04 18:10:28 +01:00
Sam Atkins
bc94431b99 IDLGenerators: Add a callback for when a setlike's set is modified
For simplicity, this requires that the setlike Foo class has a
`void on_set_modified_from_js(Badge<Bindings::FooPrototype>)` method.

This will be called after the set is modified from a generated `add()`,
`delete()`, or `clear()` method.
2025-07-04 18:10:28 +01:00
Sam Atkins
be21d952b1 IDLGenerators: Generate impl_from() for types that have setlike
Found by this interface, which has nothing else in it:

```
[Exposed=Window]
interface CustomStateSet {
  setlike<DOMString>;
};
```
2025-07-04 18:10:28 +01:00
Sam Atkins
efcbec250f IDLGenerators: Support string types in setlike 2025-07-04 18:10:28 +01:00
Sam Atkins
0f859fd126 IDLGenerators: Remove redundant function forward declaration 2025-07-04 18:10:28 +01:00
Sam Atkins
9e1bbe7edd IDLGenerators: Correct the parameter type check for setlike methods 2025-07-04 18:10:28 +01:00
Sam Atkins
f2dd66e039 IDLGenerators: Remove unused numeric_type definition 2025-07-04 18:10:28 +01:00
ayeteadoe
f737ec2570 CMake: Rename SERENITY_* helper variables to LADYBIRD_*
Some checks are pending
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / 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-07-03 23:19:41 +02:00
ayeteadoe
d897bfae91 CMake: Rename all_generated target to better convey intent 2025-07-03 23:19:41 +02:00
ayeteadoe
25f5936dee CMake: Rename serenity_* helper functions/macros to ladybird_* 2025-07-03 23:19:41 +02:00
ayeteadoe
100b204a68 CMake: Move lagom target creation helper functions into Meta/CMake 2025-07-03 23:19:41 +02:00
Tim Ledbetter
cb4a5eca2e Meta: Add formatter to PropertyID code generator 2025-07-03 21:17:16 +01:00
Tim Ledbetter
c0390f759c LibWeb: Parse the border-image-repeat property 2025-07-03 10:19:44 +01:00
Tim Ledbetter
98e63e3dd5 LibWeb: Parse the border-image-outset property 2025-07-03 10:19:44 +01:00
Tim Ledbetter
245905b833 LibWeb: Parse the border-image-slice property 2025-07-03 10:19:44 +01:00
Tim Ledbetter
70c2621634 LibWeb: Parse the border-image-source property 2025-07-03 10:19:44 +01:00
Luke Wilde
e85b809f8d LibWeb+Meta: Move WebGL rendering context implementations in tree
This copies the latest generated code in tree and then removes code
generation for the WebGL rendering contexts. This is because it didn't
add much value, and we can maintain the generated output instead of
both that and the generator itself.
2025-07-02 19:00:49 +02:00
Tim Ledbetter
53adf3be1e Meta: Ensure local WPT repository is up to date before importing
The current import process assumes that the local WPT repository is up
to date. Let's make sure that's true before importing a new test.
2025-07-02 12:02:09 +01:00
Jelle Raaijmakers
180bb0fc5d Everywhere: Remove LibRIFF 2025-07-02 12:01:12 +01:00
ayeteadoe
43778e9493 Meta: Fix vcpkg angle port on Windows
Some checks are pending
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / 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-07-01 14:17:17 -06:00
Tim Ledbetter
7507906c68 Meta: Normalize relative URLs before fetching them in the WPT importer
Previously, fetching URLs with `..` components would fail.
2025-07-01 11:43:59 +12:00
ayeteadoe
3bce1934b1 Meta: Fix CMake configure warning in unix angle vcpkg port
Fixes Unexpected UNKNOWN_READ_ACCESS on WIN32 variable
2025-06-30 12:24:36 -06:00
Luke Wilde
454bf0b7cd LibWeb/WebGL: Use robust versions of API calls provided by ANGLE
The primary purpose of these is to add bounds checking to older OpenGL
API calls that take arbitrarily sized buffers, but don't know the size
of the buffer and thus rely on the application being certain the buffer
is large enough.

Since these API calls are exposed to arbitrary JS which can make
arbitrarily sized buffers, it is not safe to use the non-robust
variants, as we cannot know the size of the buffer ahead of time, nor
the amount of data required by the API call.

The robust variants provided by ANGLE adds a buffer size parameter,
where it'll calculate the amount of data it needs for that API call
for us and return an error if it's bigger than the given buffer size.

Credit to https://github.com/s41nt0l3xus for finding this during a CTF
and providing a write up that exploits this.
See: 92efbaed6c/gpnctf-2025/WebGL-bird
2025-06-30 11:54:23 -06:00
Luke Wilde
286fa7b3ca Meta: Update ANGLE to chromium/7258 2025-06-30 11:54:23 -06:00
Bastiaan van der Plaat
1a7932601a IDLGenerators: Fix Exposed extended attribute codegen 2025-06-30 11:39:16 -06:00
Bastiaan van der Plaat
da620d6ccf LibIDL+LibWeb: Move parse_exposure_set from code generator to LibIDL 2025-06-30 11:39:16 -06:00
ayeteadoe
dbba6c0df9 LibWeb: Enable in Windows CI 2025-06-30 10:50:36 -06:00
Totto16
f1a096d6e4 LibWeb: Add OffscreenCanvas to IDL types
Add OffscreenCanvas to TexImageSource and CanvasImageSource.
Implement all the necessary features to make it work in all cases where
these types are used.
2025-06-30 09:46:21 -06:00
Totto16
2ad3ce5d37 LibWeb: Implement basics for OffscreenCanvas
This implements the basic interface, classes and functions for
OffscreenCanvas. Many are still stubbed out and have many FIXMEs in
them, but it is a basic skeleton.
2025-06-30 09:46:21 -06:00
ayeteadoe
8ef7df2a95 Meta: Patch angle vcpkg to build on Windows
Some checks are pending
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
Build Dev Container Image / build (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / 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-06-30 08:00:38 -06:00
Andrew Kaster
435aee2b1e Meta: Patch angle vcpkg to build on Linux
This involves removing x11 dependencies, and not setting angle_use_x11.
2025-06-30 08:00:38 -06:00
ayeteadoe
1a3a9eee7a Meta: Add help to generate_python_encoding_indexes.py
Some checks are pending
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / 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-06-30 14:03:55 +12:00
ayeteadoe
2682f370dd Meta: Rewrite GeneratePublicSuffixData in python 2025-06-30 14:03:55 +12:00
Shannon Booth
e6ecafea84 LibURL: Remove ErrorOr from get_public_suffix
The caller only expects ASCII and let's ignore any OOM.
2025-06-29 12:47:57 +01:00
Shannon Booth
c3618b891f Meta+LibURL: Always enable public suffix data
We should not encourage no public suffix data as a supported
configuration.
2025-06-29 12:47:57 +01:00
Tim Ledbetter
c5eca713e9 Meta: Ignore tag namespace when rewriting paths in the WPT importer
This allows us to import SVG tests, which distinguish between HTML and
SVG script tags using namespaces.
2025-06-27 08:36:15 +02:00
ayeteadoe
2f7a83304f Meta: Patch libjxl port to not link with libm when building with msvc
The libjxl port is required to add the `msvc-remove-libm` patch.
Otherwise LibGfx attempts to link with 'm.lib' which is not valid
for MSVC as the CRT bundles math functions implicitly unlike on Unix
2025-06-26 19:35:14 -06:00