Commit graph

3511 commits

Author SHA1 Message Date
Nico Weber
bd5e5c1a0c Utilities+Meta: Add a simple imgcmp utility
For now, it checks if two images are completely identical, and if not,
it prints the first differing pixel.
2025-01-10 06:22:01 -05:00
Kevin F. Konrad
d46e90ce0f Meta: Omit -cpu arguments on windows for qemu 9 compatibility 2025-01-09 13:42:56 +01:00
Nico Weber
801d7e2ced LibGfx/JPEG2000: Add LRCP and RLCP progression iterators 2025-01-07 08:23:28 -05:00
Sönke Holz
94a5e88aa8 Meta: Disable "Zoom To Fit" when using the gtk display backend
This option causes the window to not resize automatically on guest
display resolution changes.
QEMU has this option enabled by default when using virtio-gpu.
2025-01-06 01:50:28 +01:00
Davi
e166003179 Base+Meta: Add Canadian Provincial flags 2025-01-02 08:15:38 -05:00
Eduardo HCS
e6099bea77 Meta: Add User-Agent string on request for download_file 2025-01-01 14:06:03 -05:00
Andrew Kaster
ee891462b8 Meta: Move raspberry pi models to a SERENTIY_RUN argument
This makes a virt machine the default for aarch64 builds.
And other associated cleanup.

Co-Authored-By: Sönke Holz <sholz8530@gmail.com>
2024-12-30 12:56:52 +01:00
Sönke Holz
7ac8aac9ef Meta: Download both Raspberry Pi 3 and 4 DTBs
Co-Authored-By: Andrew Kaster <andrew@ladybird.org>
2024-12-30 12:56:52 +01:00
Andrew Kaster
ee2632fe0b Meta: Default to host architecture instead of x86_64 2024-12-30 12:56:52 +01:00
Andrew Kaster
e1e44a820d CMake: Enable policy CMP0177 for normalization of install() DESTINATIONs
This removes a few dozen warnings with CMake 3.31+
2024-12-30 12:56:52 +01:00
Eyad Ahmed
e395dd9cb2 Meta: Use rm -rf instead of rmdir in QEMU image build script
If you run `serenity.sh run` with missing fuse2fs and/or fusermount3,
then install the needed packages, and then try to run the script
again, rmdir step will fail with "non-empty directory" error
causing QEMU to not start. The patch avoids this by recursively
removing disk mount directory instead of just unlinking it.
2024-12-28 11:56:21 -07:00
Nico Weber
25365e2890 Meta: Use response file for linking shared libraries in GN build
Linking liblagom-web.so produces a ~132K long command line. Ninja
passes the whole command line as a single arg to `sh -c <arg>`,
and the limit for single arguments (`MAX_ARG_STRLEN`) on Linux
is `PAGE_SIZE * 32` == 128K.

A response file passes the list of files in a file on disk, which
lets us sidestep this problem. Ninja writes response files before
invoking commands, and deletes them after (unless `-d keeprsp` is
passed to ninja, then it keeps them on disk).
2024-12-21 20:50:35 -05:00
Nico Weber
5222f0e4c7 Meta: Update GN files after #25537 2024-12-21 14:58:20 -05:00
Nico Weber
c73ab635cd Meta: Add serenity sed to lagom
Useful for testing.
2024-12-19 20:07:02 +01:00
Linus Groh
5db1ddc677 Meta: Ignore title length of revert commits
Even if a commit message title previously fit into the 72 character
limit it may go over that with 'Revert ""' added - asking the author to
tweak the commit message is not appropriate in that case.

Since additional context can be added to the commit message body the
usual length restriction applies to the remaining lines.

Also restructure the code to group checks based on the line number we're
currently looking at.
2024-12-16 22:08:51 +01:00
Sönke Holz
ddd9ab21e6 LibDeviceTree: Add functions for getting and translating addresses
I created this test file by running the following command:

    dtc -o address-translation.dtb <<EOF
    /dts-v1/;

    / {
        compatible = "serenity,address-translation-test";
        #address-cells = <2>;
        #size-cells = <1>;

        soc {
            compatible = "simple-bus";
            #address-cells = <1>;
            #size-cells = <1>;
            ranges = <0xa0000000 0xfe 0xd0000000 0x40000000>;

            usb@a0010000 {
                reg = <0xa0010000 0x100000>;
            };

            some-bus@b0000000 {
                compatible = "simple-bus";
                #address-cells = <2>;
                #size-cells = <2>;
                ranges = <0x02 0x00 0xb0000000 0x00 0x200000>;

                leds@200100000 {
                    reg = <0x02 0x100000 0x00 0x1000>;
                };
            };
        };
    };
    EOF
2024-12-10 16:25:46 +01:00
implicitfield
a3fc110ea8 Meta: Use the same disk size for genext2fs as for everything else
INODE_COUNT gets modified after it has been initially used to compute
DISK_SIZE_BYTES, so the approach introduced in caefb208 didn't actually
work as intended.
2024-12-02 10:24:36 -05:00
Sönke Holz
220e6d8f3d Meta: Don't use the gtk,gl=on display backend with NVIDIA graphics
This is quite a crude check and may lead to false positives. But it's
better than having a black screen on systems with NVIDIA graphics.
2024-11-30 17:37:28 -05:00
Timothy Flynn
091e832b48 LibIPC: Pass AK::Duration by value over IPC
AK::Duration is simply an integer, and does not need to be passed by
reference.

(cherry picked from commit 6ce473af72ba666a8bae80a7f7691d233bdd2a43)
2024-11-29 20:25:45 -05:00
Tim Ledbetter
d094fc8351 IDLGenerators: Set reflected unsigned long value according to spec
Setting an unsigned long attribute with IDL to a value outside the
range 0 to 2147483647, the value should be set to the default value.

(cherry picked from commit e5c99b475aba6a2a4a957f2adc8398a1693aade6)
2024-11-29 20:25:25 -05:00
Andreas Kling
073b3b992d AK: Make String::number() infallible
This API will always succeed in creating a String representing the
provided number in base-10.

(cherry picked from commit dd419b5a8df3b9a32478c4a8f0ea9f70334214cd;
amended to update the rest of the system. No conflicts though!)
2024-11-29 16:03:30 -05:00
implicitfield
caefb208f0 Meta: Stop requesting 128-byte inodes when creating the root filesystem
We now have full support for large inodes, so we don't need to rely on
the deprecated 128-byte inodes anymore. Note that genext2fs doesn't
support large inodes, so we have to account for that when using that
utility.
2024-11-29 10:59:24 -05:00
Nico Weber
1948dbaaf1 Meta: Add UIEvents/InputTypes.cpp to the GN build 2024-11-28 21:31:42 -05:00
Timothy Flynn
1c4996ff34 LibWeb: Move some classes from the DOM namespace to the HTML namespace
The following classes are in the HTML spec and thus belong in the HTML
namespace:

* BeforeUnloadEvent
* HTMLFormControlsCollection
* RadioNodeList

(cherry picked from commit 13b7355ec10c21be90df997c66022e246c57656d)
2024-11-28 21:31:42 -05:00
Nico Weber
61ebfdab56 Meta: Remove Ladybird dep on LibGUI in GN build
Ladybird's cmake dependency on LibGUI was removed in #21782, and
LibWeb's in #24526. This updates the GN build to match.
2024-11-28 20:07:48 -05:00
Nico Weber
50b7fff178 Meta: Add HTML/NavigationObserver.cpp, WebDriver/HeapTimer.cpp to GN 2024-11-28 18:58:55 -05:00
Nico Weber
7a735481ba Meta: Add BeforeUnloadEvent to the GN build 2024-11-28 14:15:33 -05:00
Nico Weber
7211ba30be Meta: Add more commits and PRs to lb-cherry-picks.py 2024-11-26 23:27:06 -05:00
Nico Weber
71ea3c53a6 LibLocale: Add Segmenter.h
This is aspirationally in LibLocale in hopes that it does
locale-dependent segmentation one day.

For now, it just wraps LibUnicode's Segmentation.h.

Everything except Segmenter.cpp are from the first commit of
LadybirdBrowser/ladybird#218, by trflynn.

Co-authored-by: Tim Flynn <trflynn89@serenityos.org>
2024-11-26 13:50:49 -05:00
Nico Weber
968c5f965a Meta: Make LibIDL depend on LibCoreMinimal in GN build
Reduces the number of build steps after touching a file in LibUnicode
from 915 to 87.
2024-11-24 21:31:56 -05:00
Nico Weber
bcff78ceee Meta: Add WebDriver/{Actions,InputSource,InputState}.cpp to the GN build 2024-11-24 19:40:10 -05:00
Nico Weber
1699ec259f Meta: Add WebDriver/ElementReference.cpp to GN build 2024-11-24 15:19:49 -05:00
implicitfield
c98071dd69 CMake: Remove all uses of globs in conventional builds
This also makes the Shell tests run on Lagom again, as they have been
silently skipped ever since d46be35f (which moved the tests but didn't
update the glob.)
2024-11-23 23:50:17 -05:00
implicitfield
72b2e40ce1 Meta: Dereference headers when building the root file system
This is in preparation for installing LibC headers into the sysroot as
symlinks rather than as plain copies.
2024-11-23 23:50:17 -05:00
Luke Wilde
67e65204b5 LibWeb: Add CMake dependencies for GeneratedCSSStyleProperties.idl
Co-Authored-By: Andrew Kaster <andrew@ladybird.org>
(cherry picked from commit c0ae3aa884290a2814bb2fa151cd8f89179b4912)
2024-11-23 22:07:22 -05:00
Nico Weber
e4ee3d1692 Meta: Port GenerateCSSStyleProperties changes to GN 2024-11-23 22:07:22 -05:00
Jonne Ransijn
3eabeaa198 LibIDL: Fix use-after-free in GenerateWindowOrWorkerInterfaces
`lexical_bases` was storing `StringView`s into `ByteString`s returned
from `LexicalPath::string()` that might no longer exist.

(cherry picked from commit c3783cf3bd8261b6f456cd9f796cc6a0b03096ee)
2024-11-23 22:07:22 -05:00
Luke Wilde
772be9dec0 LibWeb: Generate IDL attributes for all supported CSS properties
The CSSOM spec tells us to potentially add up to three different IDL
attributes to CSSStyleDeclaration for every CSS property we support:
- A camelCased attribute, where a dash indicates the next character
  should be uppercase
- A camelCased attribute for every -webkit- prefixed property, with the
  first letter always being lowercase
- A dashed-attribute for every property with a dash in it.

Additionally, every attribute must have the CEReactions and
LegacyNullToEmptyString extended attributes specified on it.

Since we specify every property we support with Properties.json, we can
use that file to generate the IDL file and it's implementation.

We import it from the Build directory with the help of multiple import
base paths. Then, we add it to CSSStyleDeclaration via the mixin
functionality and inheriting the generated class in
CSSStyleDeclaration.

(cherry picked from commit aacf9b08ed8c4286c84145b52fa70f399ed0bdff;
amended to fix tiny conflict in libweb_generators.cmake, and to change
the default value of all gap-related properties from 'auto' to 'normal'
since serenity does not yet have LadybirdBrowser/ladybird#2253 and
cherry-picking that has a pretty long dependency tree. It's easy to
update the test once that is cherry-picked)
2024-11-23 22:07:22 -05:00
Luke Wilde
3ce2605096 LibIDL: Allow overwriting the generated attribute callback name
This will allow the CSSStyleDeclaration IDL attribute generator to
implement it's own C++ acceptable identifier sanitization and
deduplication.

(cherry picked from commit d95ae629ee03b99d39930ee5806739622dc8cee6)
2024-11-23 22:07:22 -05:00
Luke Wilde
c0adae8d7d LibIDL: Support multiple import base paths for resolving imports
This allows us to specify multiple base paths to look for imported IDL
files in. This will allow us to import IDL files from sources and from
the Build directory (i.e. for generated IDL files).

(cherry picked from commit 300f212044e5475a8e14c585a79c0b5bb56688f4)
2024-11-23 22:07:22 -05:00
Nico Weber
0197bfcadf LibUnicode+LibWeb: Rework bidirectional_class() API a bit
Before this commit, GenerateUnicodeData generated a
`BidirectionalClass` enum directly from UnicodeData.txt.

Now, GenerateUnicodeData instead generates `BidirectionalClassInternal`
and CharacterTypes.h has an explicit enum `BidiClass` with nicer names
-- no underscores, but also names more similar to ICUs names.

(Since CharacterTypes.h is included in some of LibUnicode's generators,
it can't refer to generated `BidirectionalClassInternal`, so we instead
have a big manual mapping switch in UnicodeData.cpp.)

`bidirectional_class()` used to return an `Optional<BidirectionalClass>`
for when unicode data was disabled. Now we return `BidiClass` and
just return `BidiClass::LeftToRight` instead of making every client
do this.

It also updates LibWeb's Element.cpp to this new system.

Also remove now-unused `bidirectional_class_from_string()`.

This kind of cherry-picks the 4th commit of
LadybirdBrowser/ladybird#239 (aa3a30870b58c47cb37bce1418d7e6bee7af71d9):
The CharacterTypes.h, Element.cpp and TestUnicodeCharacterTypes.cpp changes are
by trflynn.

Co-authored-by: Tim Flynn <trflynn89@serenityos.org>
2024-11-23 19:24:11 -05:00
Nico Weber
aff777c5e0 Meta: Use property aliases for BidirectionalClass enum values
Changes the generated UnicodeData.h from

    enum class BidirectionalClass : BidirectionalClassUnderlyingType {
        AL,
        AN,
        B,
        ...
    };

to

    enum class BidirectionalClass : BidirectionalClassUnderlyingType {
        AL,
        AN,
        B,
        ...
        Arabic_Letter = AL,
        Arabic_Number = AN,
        Boundary_Neutral = BN,
        ...
    };
2024-11-23 19:24:11 -05:00
Sönke Holz
d56cedf3cd Kernel/aarch64: Use generic kprintf.cpp 2024-11-23 19:29:50 +01:00
Ali Mohammad Pur
03e1dfb620 Meta: Delete jakt toolchain in delete_toolchain too 2024-11-22 19:43:12 +01:00
Andreas Kling
9b4db4a0e0 LibWeb: Make DOMException take error message as a String
There was no need to use FlyString for error messages, and it just
caused a bunch of churn since these strings typically only existed
during the lifetime of the error.

(cherry picked from commit 175f3febb8037a440d4ead7347d3266ee3d345e1;
minorly amended to fix conflict in WebSocket.cpp due to serenity
not having the adapter class removal in LadybirdBrowser/ladybird#1671)
2024-11-22 11:13:42 -05:00
Andrew Kaster
9448fe10da LibWeb: Implement most of Service Worker registration
This approach will need some rework to be properly handled at the user
agent level instead of per renderer process, but it's a start.

(cherry picked from commit 7faebb2702a2a19fc401fde1856a0d90861d2904)
2024-11-22 08:47:53 -05:00
Aliaksandr Kalenik
ff4c99ec0a Meta+Tests: Substitute Ahem font path in import-wpt-test.py
(cherry picked from commit 3833049fc8680d4e6349511cf566f27a25225ada)
2024-11-21 22:16:48 -05:00
sideshowbarker
c4b4f293e9 Meta: Make import-wpt-test.py use html.parser, not BeautifulSoup
This change switches the Meta/import-wpt-test.py script to using the
standard html.parser module rather than BeautifulSoup.

Otherwise, without this change, when a contributor first tries to run
the script, if they don’t have BeautifulSoup installed, it will fail.

Note that this patch also includes an unrelated small change that
switches to using os.path.normpath — rather than Path.absolute() — to
“normalize” the destination names of the downloaded test files.

(cherry picked from commit 286511c4cf9dcd985882c9bbb2de42b01e7494a9)
2024-11-21 22:16:48 -05:00
sideshowbarker
c5b9ce19eb Meta: Make import-wpt-test.py resolve “..” parent refs in URLs/pathnames
This change makes the Meta/import-wpt-test.py script handle URLs such as
https://wpt.live//WebCryptoAPI/generateKey/../util/helpers.js and paths
containing, e.g., wpt-import/WebCryptoAPI/generateKey/../util/helpers.js
(that is, URLs and paths with “..” parent-directory references in them).

Otherwise, without this change, when the import-wpt-test.py script tries
a URL like https://wpt.live//WebCryptoAPI/generateKey/../util/helpers.js
which contains a “..” parent-directory reference, the script fails with
a “urllib.error.HTTPError: HTTP Error 404: Not Found” error message.

(cherry picked from commit cf7a1f6a5297f4b01a98a39a3d9da6dd4cbcf5d2)
2024-11-21 22:16:48 -05:00
stelar7
4181fe7453 Meta: Add a script to import WPT tests
(cherry picked from commit 5630a0d6b44c3599f8a70b07dc294080dcb50ae1)
2024-11-21 22:16:48 -05:00