Commit graph

2070 commits

Author SHA1 Message Date
Tim Schumacher
afa158bf99 Lagom: Add targets for lzcat, xzcat and tar 2023-03-30 14:39:31 +02:00
Timothy Flynn
a944eed013 CI: Bump clang used by the Fuzzer build to clang-15
This is required for an upcoming use of a constexpr function.
2023-03-29 07:19:14 +02:00
Andrew Kaster
1c01856021 Meta: Diable Wshorten-64-to-32 explicitly to silence Xcode defaults
Xcode will set this by default when creating a new project unless we
set an xcode property to disable it. Instead of doing that, disable
it globally.
2023-03-28 09:18:50 +01:00
Cameron Youell
0471ec0567 Toolchain: Update binutils to version 2.40 2023-03-27 16:13:48 +01:00
Aliaksandr Kalenik
9220cdc285 LibHTTP+WebDriver+WebServer: Return error from HTTP request parser 2023-03-26 17:56:17 +02:00
Timothy Flynn
04b51e39d6 LibTimeZone: Update to TZDB version 2023b
https://mm.icann.org/pipermail/tz-announce/2023-March/000078.html
2023-03-26 15:43:40 +01:00
Nico Weber
ee6843a13c Meta: Add "gunzip" and "gzip" to lagom build
This makes it easy to compare the performance of Serenity's
deflate implementation to the host system implementation.

On my M1 Max MBP:

    % time gunzip -c \
        /Users/thakis/Downloads/trace_bug.json.gz > /dev/null

takes between 0.064s and 0.082s.

    % time Build/lagom/gunzip -c \
        /Users/thakis/Downloads/trace_bug.json.gz > /dev/null

on the other hand takes 4 seconds.

(That .gz file is a 5.8M file -- the largest .gz file that happend to be
in my Downloads folder.)
2023-03-25 21:42:50 +00:00
Jelle Raaijmakers
e18c87c60c Meta: Make audio hardware configurable through environment variable
The new environment variable `SERENITY_AUDIO_HARDWARE` accepts the
values `ac97` and `intelhda` (default).
2023-03-25 21:27:03 +01:00
Jelle Raaijmakers
dd0a25de4d Meta: Use more aptly named variable for PC speaker configuration 2023-03-25 21:27:03 +01:00
Jelle Raaijmakers
dd8fa73da1 Kernel: Add support for Intel HDA
This is an implementation that tries to follow the spec as closely as
possible, and works with Qemu's Intel HDA and some bare metal HDA
controllers out there. Compiling with `INTEL_HDA_DEBUG=on` will provide
a lot of detailed information that could help us getting this to work
on more bare metal controllers as well :^)

Output format is limited to `i16` samples for now.
2023-03-25 21:27:03 +01:00
Sam Atkins
4b711932cc LibWeb: Split PercentageStyleValue out of StyleValue.{h,cpp} 2023-03-25 16:56:04 +00:00
Marco Cutecchia
f3363c1088 Meta: Run aarch64 with the disk image in the SD card slot
Co-authored-by: Timon Kruiper <timonkruiper@gmail.com>
Co-authored-by: Ollrogge <nils-ollrogge@outlook.de>
2023-03-25 16:50:36 +00:00
Luke Wilde
cbe0901706 LibWeb: Implement performance.mark and performance.clearMarks 2023-03-23 21:00:43 +00:00
Luke Wilde
31b507afbf LibWeb: Introduce Performance Timeline and its Performance functions 2023-03-23 21:00:43 +00:00
Luke Wilde
cb1deebc8f LibWeb: Implement the [Default] object toJSON() operation 2023-03-23 21:00:43 +00:00
Srikavin Ramkumar
daf421846c LibWeb: Return TypeError for [HTMLConstructor] IDL constructors
This matches the spec since there can be no matching custom element
definition if we don't support custom elements yet.
2023-03-23 13:37:40 +01:00
Lucas CHOLLET
496b7ffb2b LibGfx: Move all image loaders and writers to a subdirectory 2023-03-21 22:39:25 +01:00
Cameron Youell
1d24f394c6 Everywhere: Use LibFileSystem where trivial 2023-03-21 19:03:21 +00:00
Simon Wanner
63ca149be5 LibWeb: Make [PutForwards] work together with [ImplementedAs] 2023-03-20 20:37:40 -04:00
Tim Schumacher
123e9fa5d0 Lagom: Add a fuzzer for LZMA decompression 2023-03-20 12:15:38 +02:00
Tim Schumacher
fb0fd85e97 Meta: Don't install CA certificates during a on-Serenity build
`SERENITYOS` is also set when compiling Lagom on SerenityOS, so we can't
just check it and expect `CMAKE_STAGING_PREFIX` to be set.

Instead, check `CMAKE_STAGING_PREFIX` directly and use that as an
indicator for whether we can install a file there.
2023-03-20 09:33:30 +01:00
Andrew Kaster
5b5a76eadd CI: Add "set -e" to Azure DevOps scripts
Without setting this explicitly in every script, failing script lines in
multiline scripts will not fail the job themselves.
2023-03-19 14:31:10 -06:00
Andrew Kaster
958f9e960d Fuzzers: Use correct type name in FuzzilliJs fuzzer 2023-03-19 14:31:10 -06:00
kleines Filmröllchen
3e2e94bd01 Meta: Specify a working directory for the FLAC spec test on Lagom
The serenity_test function cannot set this up as it has no purpose on
Serenity itself.
2023-03-19 14:15:35 +00:00
kleines Filmröllchen
904a4dd314 Meta: Use extract_tar_path for WASM spec test generation 2023-03-19 14:15:35 +00:00
kleines Filmröllchen
d3d93ef1df Meta: Refactor FLAC spec test extraction with extract_tar_path 2023-03-19 14:15:35 +00:00
kleines Filmröllchen
a6dd992ad3 Meta: Add a tar extraction CMake wrapper
This is a copy of the zip wrapper adopted for tar archives.
2023-03-19 14:15:35 +00:00
Liav A
c66f7f2e7c Meta: Use non-VGA VirtIO GPU variants when running on macOS
It appears that QEMU on macOS doesn't have the VirtIO GPU variants that
support VGA functionality. Those variants are not especially important
to us, because we don't use any kind of VGA functionality in our kernel
anyway.

Therefore, for macOS, we could decide to use virtio-gpu-gl-pci and
virtio-gpu-pci devices instead.
2023-03-19 00:19:06 +00:00
Timothy Flynn
1b260ab1f8 Meta: Move global VM creation to fuzzer "global" structure
Turns out LLVMFuzzerTestOneInput may be called more than once per
process.
2023-03-19 00:15:05 +00:00
Andrew Kaster
cabc99e953 Fuzzers: Skip trying to parse invalid UTF-8 in LibJS Fuzzers
Invalid UTF-8 crashes JS::Script::Parse.
2023-03-18 15:56:18 +01:00
Timothy Flynn
5d7a85bc37 Meta: Ensure the main thread VM is created before use in the CSS fuzzer 2023-03-17 16:48:43 +00:00
Timothy Flynn
13dfadba79 LibJS: Propagate errors from VM creation 2023-03-17 16:39:08 +00:00
Luke Wilde
782cdaeccf LibWeb: Give generated constructor functions a name
Required by code that brand checks native constructors.

For example, Wistia brand checks XMLHttpRequest by doing:
```
XMLHttpRequest.prototype.constructor.toString()
```

It then checks if it matches either one of:
```
function XMLHttpRequest() { [native code] }
```
```
[object XMLHttpRequestConstructor]
```

If neither matches, it disables HLS playback and prints:
"The XMLHttpRequest constructor has been tampered with. Because this
affects CORS/Range XHR requests, HLS playback has been disabled.
To enable HLS playback and other important features, please remove code
that changes the definition of window.XMLHttpRequest."

We hit this path due to not giving generated constructors a name, as
we would provide `function () { [native code] }`.
2023-03-17 16:37:21 +00:00
Andreas Kling
d38a3ca9eb LibGfx/OpenType: Add some initial support for GPOS glyph positioning
This patch parses enough of GPOS tables to be able to support the
kerning information embedded in Inter.

Since that specific font only applies positioning offsets to the first
glyph in each pair, I was able to get away with not changing our API.
Once we start adding support for more sophisticated positioning, we'll
need to be able to communicate more than a simple "kerning offset" to
the clients of this code.
2023-03-17 09:36:20 +01:00
Timothy Flynn
2cd7159694 LibWeb: Add a custom extended attribute for namespace-level GC visitors
Currently, the WebAssemblyObject implements a visitor to keep its static
objects alive. This custom attribute will be used to hook the generated
namespace object's visitor to one that we define in non-generated code.
2023-03-16 19:39:17 +00:00
Timothy Flynn
aa06dd7f21 LibWeb: More fully implement the LegacyNamespace IDL extended attribute
Interfaces with a LegacyNamespace extended attribute should have their
constructors defined on the namespace identified by the LegacyNamespace
attribute value.
2023-03-16 19:39:17 +00:00
Timothy Flynn
a277e645d3 LibWeb: Add LibJS includes to generated IDL namespace files
These will be needed by any namespace having a BufferSource parameter,
such as WebAssembly.

Similar to 49e6cb7c3d.
2023-03-16 19:39:17 +00:00
Fabian Dellwing
b07654c3c1 Meta: Download cacert.pem at build time 2023-03-16 18:54:20 +03:30
Timothy Flynn
2cfcbccdb5 LibWeb: Port WebAssembly.Table to IDL 2023-03-16 13:54:16 +01:00
Timothy Flynn
ca96f8e364 LibWeb: Port WebAssembly.Memory to IDL 2023-03-16 13:54:16 +01:00
Timothy Flynn
de32c44762 LibWeb: Port WebAssembly.Instance to IDL 2023-03-16 13:54:16 +01:00
Timothy Flynn
fb1f15774f LibWeb: Port WebAssembly.Module to IDL 2023-03-16 13:54:16 +01:00
Timothy Flynn
5c97ffb94f LibWeb: Define WebAssembly namespace and import it in web bindings
This will contain concrete definitions of WebAssembly objects used by
generated WebAssembly IDL.
2023-03-16 13:54:16 +01:00
Timothy Flynn
af119d92cb LibIDL+LibWeb: Begin supporting the LegacyNamespace extended attribute
This is used by WebAssembly IDL files. For now, we mostly use this for
error messages and cache keys (to ensure compatibility with existing
code as WebAssembly is ported to IDL).
2023-03-16 13:54:16 +01:00
Timothy Flynn
3a11f65451 LibWeb: Add crude support for dereferencing JavaScript built-ins in IDL
This works similarly to the is_platform_object() helper, in that we do
not know that a type like ArrayBuffer needs to be qualified with JS::.
2023-03-16 13:54:16 +01:00
Timothy Flynn
0d921720b4 LibWeb: Support generating optional object IDL parameters
These are used by WebAssembly IDL.
2023-03-16 13:54:16 +01:00
Timothy Flynn
49e6cb7c3d LibWeb: Add LibJS includes to generated IDL constructor files
These will be needed by any constructor having a BufferSource parameter,
such as WebAssembly.Module.
2023-03-16 13:54:16 +01:00
Andrew Kaster
49b07cda12 CI: Bump Android NDK version used in CI to 25.2.9519653
The previous version is no longer able to compile Lagom

Clang version 14.0.1 in NDK 24.0.8215888 crashes trying to build
Core::Process
2023-03-15 20:36:22 -06:00
Sam Atkins
b18c1c7291 LibUnicode: Remove now-unused dir-iterator helper functions 2023-03-15 12:49:33 -04:00
Sam Atkins
414cafa7f8 LibLocale: Migrate code generators to Directory::for_each_entry() 2023-03-15 12:49:33 -04:00