Commit graph

52169 commits

Author SHA1 Message Date
Tim Schumacher 89b0a61067 Ports: Remove support for auth_types other than sha256 2023-07-10 13:08:27 +02:00
Tim Schumacher f7ccdc268d Ports: Migrate remaining signature-based ports to sha256 2023-07-10 13:08:27 +02:00
Andreas Kling e0b2757f95 LibJS/Bytecode: Always make own properties in object expressions
When building an object from an object expression, we don't want to
go through the full property setting machinery. This patch adds a new
PropertyKind::DirectKeyValue for PutById which guarantees that the
property becomes an own property.

This fixes an issue where setting the "__proto__" property in object
expressions wasn't working right.

12 new passes on test262. :^)
2023-07-10 09:29:54 +01:00
Andrew Kaster 91528e94ac Meta: Add example linux gn args, fix CSS build on case-insensitive FS 2023-07-09 16:29:31 -06:00
Andrew Kaster 16b83cd8fb Meta: Add gn build rules for Ladybird 2023-07-09 16:22:58 -06:00
Andrew Kaster 85c8cd5205 Meta: Add gn build rules for LibWeb 2023-07-09 16:22:58 -06:00
Andrew Kaster 7b3d0fb002 Meta: Add gn rules for dependencies of LibWeb
There's a lot of them, and LibWeb is a massive set of files to build as
well, so let's add these first :^).
2023-07-09 16:22:58 -06:00
Andrew Kaster 13a5606cdc Meta: Add gn build rules for LibGL and its dependencies 2023-07-09 16:22:58 -06:00
Andrew Kaster bf02069a89 Meta: Add dependencies for the JS repl to the gn build 2023-07-09 16:22:58 -06:00
Andrew Kaster 165a67b115 Meta: Add LibJS and its dependencies to gn build 2023-07-09 16:22:58 -06:00
Andrew Kaster 1d3898f308 Meta: Add LibUnicode and LibLocale to gn build
A lot of code gen happening here. These generators are kind of
awkward to work with, and the fact that the CLDR data download
extracts over 8,000 files makes it hard to fit into the explicit
patterns GN expects of us.
2023-07-09 16:22:58 -06:00
Andrew Kaster b1e94a02fe Meta: Add compiled_action from LLVM, use it to generate TZDB sources 2023-07-09 16:22:58 -06:00
Andrew Kaster 0e24bfb464 Meta: Add file download and archive extraction tools to gn build
Use them to download and extract the TZDB files
2023-07-09 16:22:58 -06:00
Andrew Kaster 05f56e09b5 Meta: Add CodeGenerators and library dependencies for them to gn build 2023-07-09 16:22:58 -06:00
Andrew Kaster cbda1a6c73 Meta: Add LibTest and Tests/AK to gn build 2023-07-09 16:22:58 -06:00
Andrew Kaster 4bfb146181 Meta: Add the start of a gn build based on the LLVM gn build
"based on" in this context means "largely copied from"
2023-07-09 16:22:58 -06:00
Aliaksandr Kalenik 4a9a1d1656 LibJS: Skip bindings creation for locals during block declaration init
No need to create bindings for local variables as their values are not
stored in an environment.
2023-07-09 21:09:35 +02:00
djwisdom 47eaef9b41 Ports: Update serenity-theming use latest commit 103b0ad 2023-07-09 15:40:54 +01:00
Tim Schumacher 8a9761de20 AK: Let Array::from_span take a readonly Span
We are copying here, so there is no need to require a non-const Span.
2023-07-09 15:40:41 +01:00
Hendiadyoin1 467bc5b093 AK: Add a generic version of log2
This uses one of Sun OS's algorithms, for a comparison to other
algorithms please refer to
https://gist.github.com/Hendiadyoin1/f58346d66637deb9156ef360aa158bf9

This is used on aarch64 builds and for x86 floats and doubles
for performance gains check
https://quick-bench.com/q/_2jTykshP6cUqtgdepFaoQ53YC8
which shows approximately 2x gains

Co-Authored-By: Ben Wiederhake <BenWiederhake.GitHub@gmx.de>
Co-Authored-By: kleines Filmröllchen <filmroellchen@serenityos.org>
Co-Authored-By: Dan Klishch <danilklishch@gmail.com>
2023-07-09 15:39:52 +01:00
Andreas Kling de8e4b1853 LibJS/Bytecode: Cache object own property accesses
The instructions GetById and GetByIdWithThis now remember the last-seen
Shape, and if we see the same object again, we reuse the property offset
from last time without doing a new lookup.

This allows us to use Object::get_direct(), bypassing the entire lookup
machinery and saving lots of time.

~23% speed-up on Kraken/ai-astar.js :^)
2023-07-09 12:54:06 +02:00
Andreas Kling 52cd671163 LibJS: Make Object::internal_get() reveal the used property offset
This function now takes an optional out parameter for callers who would
like to what kind of property we ended up getting.

This will be used to implement inline caching for property lookups.

Also, to prepare for adding more forms of caching, the out parameter
is a struct CacheablePropertyMetadata rather than just an offset. :^)
2023-07-09 12:54:06 +02:00
Lucas CHOLLET babe924da1 LibGfx: Provide a default implementation for ImageDecoder::initialize
In order to ease the removal of this function, let's provide a no-op
default implementation so decoders can stop implementing it one by one.

First step of #19893
2023-07-09 09:16:28 +01:00
David Gow e84def4890 Documentation: Add qt6-multimedia-devel on openSUSE for Ladybird
The documentation for building Ladybird gives a list of packages to
install under openSUSE, but is missing the Qt6 Multimedia development
package, qt6-multimedia-devel.

Include it.
2023-07-09 08:06:13 +01:00
Dominique Liberda d7644d1d86 Meta: Improve build compatibility with non-GNU userspaces
We depend on GNU-specific du switch `--apparent-size`. Busybox has this
implemented, but as `-b` instead.
Another part of the build system uses `cp --preserve=timestamps`. This
can be replaced by `rsync -t`, and rsync is already used through the
file.

Thanks to those changes, Serenity can be built on a Busybox system,
without GNU coreutils.
2023-07-09 06:16:31 +01:00
Dominique Liberda fddbd11baa Meta: Implement proper checks for sudo alternatives
This introduces support for building with doas.
2023-07-09 06:16:31 +01:00
Timothy Flynn af5eaf5edf Base: Add a test page to log KeyboardEvent data
This page prepends a row to a table with the last-received
KeyboardEvent.
2023-07-09 06:32:20 +02:00
Timothy Flynn cd995d113b LibWeb: Implement KeyboardEvent.location closer to the spec 2023-07-09 06:32:20 +02:00
Timothy Flynn 71bf9f1d0d LibWeb: Implement KeyboardEvent.key according to the spec
This implementation only includes key codes marked as required by the
spec, as those are the only keys we have in our kernel.
2023-07-09 06:32:20 +02:00
Timothy Flynn 64022031c4 LibWeb: Implement KeyboardEvent.code according to the spec
This implementation only includes key codes marked as required by the
spec, as those are the only keys we have in our kernel.
2023-07-09 06:32:20 +02:00
Timothy Flynn f319f72d00 Ladybird: Add a few missing Qt-to-Serenity keycode mappings
And add a link to the Qt documentation that maps event keys to their
enumerated names for convenience.
2023-07-09 06:32:20 +02:00
Timothy Flynn 2945e4b8e9 LibWeb: Add spec links for the KeyboardEvent IDL
Mostly for convenience.
2023-07-09 06:32:20 +02:00
Timothy Flynn ddf4f6f44f Ladybird: Include the keypad modifier in key events sent to WebContent 2023-07-09 06:32:20 +02:00
Timothy Flynn f798e43ea8 Kernel: Add a key code modifier to detect the number pad
This is analagous to how Qt exposes whether the number pad was used for
a key press.
2023-07-09 06:32:20 +02:00
Andi Gallo 4c81d39483 LibWeb: Adjust border widths for tables using collapsing borders
When using the collapsing border model, cells on either side of the edge
get half the specified width of the border for their box model.
2023-07-09 06:29:43 +02:00
Aliaksandr Kalenik 8b6450842e LibJS: Use local variables for function declarations when possible
Previously, the usage of local variables was limited for all function
declarations. This change relaxes the restriction and only prohibits
locals for hoistable annexB declarations.
2023-07-09 06:26:10 +02:00
Aliaksandr Kalenik 167495b87b LibJS/Bytecode: Always return false on attempt to delete local variable
Since it is not possible for delete operator to return true when it is
applied to local variable, DeleteVariable can safely always return
false for locals.

This also fixes operators/delete-local-variable.js in test-js.
2023-07-09 06:26:10 +02:00
Ali Mohammad Pur 0c5c75e8a4 LibCore: Slightly rework the Core::Promise API
The previous iteration of this API was somewhat odd and rough in random
places, which degraded usability and made less than perfect sense.
This commit reworks the API to be a little closer to more
conventional promise APIs (a la javascript promises).

Also adds a test to ensure the class even works.
2023-07-08 23:13:00 +01:00
Ali Mohammad Pur 5a0ad6812c AK: Add a CallableAs<R, Args...> concept
This is just the concept version of the IsCallableWithArguments type
trait previously defined in Function.h.
2023-07-08 23:13:00 +01:00
Lucas CHOLLET 35599605c1 LibGfx/BMP: Move some const to the east 2023-07-08 22:56:30 +01:00
Lucas CHOLLET fd765d2031 LibGfx/ICO: Fix an erroneous condition
This is a remnant of the conversion to `ErrorOr` done in 492d5d7c.
2023-07-08 22:56:30 +01:00
MacDue 91e1a77854 SpiceAgent: Pledge cpath
Without this the spice agent can't create files on drag/drop.
2023-07-08 22:55:06 +01:00
Xexxa c0528d4188 Base: Add more emoji
🫃 - U+1FAC3 PREGNANT MAN
🫄 - U+1FAC4 PREGNANT PERSON
🤺 - U+1F93A PERSON FENCING
🤾 - U+1F93E PERSON PLAYING HANDBALL
🤾‍♂️ - U+1F93E U+200D U+2642 MAN PLAYING HANDBALL
🤾‍♀️ - U+1F93E U+200D U+2640 WOMAN PLAYING HANDBALL
🧁 - U+1F9C1 CUPCAKE
🗼 - U+1F5FC TOKYO
🪈 - U+1FA88 FLUTE
2023-07-08 22:51:42 +01:00
Xexxa 74e77c205d Base: Adjust emoji
Align U+1F451 and U+1F450 vertically to better align with other emoji

👐 - U+1F450 OPEN HANDS
👑 - U+1F451 CROWN
2023-07-08 22:51:42 +01:00
Xexxa 6303285b1c Base: Adjust emoji
Make clothes color of U+1F930 match other emoji better

🤰 - U+1F930 PREGNANT WOMAN
2023-07-08 22:51:42 +01:00
sarsaparilla89 9ac4470b9b LibC: Fix max value of short 2023-07-08 15:53:02 -04:00
Xexxa c09bcc2f16 Base: Add more emoji
🦸 - U+1F9B8 SUPERHERO
🦹 - U+1F9B9 SUPERVILLAIN
🧍 - U+1F9CD PERSON STANDING
🧍‍♂️ - U+1F9CD U+200D U+2642 MAN STANDING
🧍‍♀️ - U+1F9CD U+200D U+2640 WOMAN STANDING
🦰 - U+1F9B0 RED HAIR (component)
🦱 - U+1F9B1 CURLY HAIR (component)
🦳 - U+1F9B3 WHITE HAIR (component)
🦲 - U+1F9B2 BALD (component)
🥯 - U+1F96F BAGEL
🚜 - U+1F69C TRACTOR
🪪 - U+1FAAA IDENTIFICATION CARD
2023-07-08 18:48:42 +01:00
Aliaksandr Kalenik c4656a70c1 LibJS: Allow usage of locals if function parameters have default values
Initially, the usage of local variables for parameters had to be
disabled when default values were used because there was a bug that
didn't allow to correctly find the scope to which identifiers used
within the default parameter expression belonged, and hence correctly
identify if a variable can be local. However, this bug was fixed in
2f85faef0f, so now this restriction
is no longer needed.
2023-07-08 15:36:36 +02:00
Ali Mohammad Pur 59e8f713db LibWasm: Implement Element section segment type 4 2023-07-08 15:13:25 +02:00
Ali Mohammad Pur aafef1e92d LibWasm: Make the main module's functions addressable by globals 2023-07-08 15:13:25 +02:00