Commit graph

2875 commits

Author SHA1 Message Date
Nico Weber 90490d9fb8 Meta: Use extract_path() in extract_tzdb_file()
No behavior change.
2024-01-29 22:03:27 -05:00
Nico Weber ffcd5cf443 Meta: Remove extract_tar_path() function
It's identical to extract_path() after #23000.

No behavior change.
2024-01-29 22:03:27 -05:00
Nico Weber 125d92fe85 Meta: Remove "Extracting using cmake" messages
As requested on #23000.
2024-01-29 22:03:27 -05:00
Nico Weber 17f37cbd8c Meta: Remove some obsolete cmake version checks
We require CMake 3.25 nowadays.

No behavior change.
2024-01-29 20:09:12 -05:00
Nico Weber fd316728a0 Everywhere: Remove references to UserspaceEmulator 2024-01-29 20:20:55 +00:00
kleines Filmröllchen dec066fa5c GMLCompiler: Add common pattern for a user-defined fallible initializer
Many widget classes need to run substantial initialization code after
they have been setup from GML. With this change, an
initialize_fallibles() function is called if available, allowing the
initialization to be invoked from the GML setup automatically. This
means that the GML-generated creation function can now be used directly
for many more cases, and reduces code duplication.
2024-01-29 05:21:48 -07:00
Timothy Flynn 59716f807f Meta: Port recent changes to the GN build
187862ebe0
514af065a5
2024-01-29 07:21:59 +01:00
Timothy Flynn 9b957ead13 LibWebView+WebContent: Do not manually serialize cookie sources over IPC
LibIPC can serialize enumeration automatically (this was not the case
when these IPCs were added).
2024-01-26 20:22:39 +01:00
Timothy Flynn 2bb751eab9 Meta: Port recent changes to the GN build
b12541b286
2024-01-25 21:34:03 +01:00
Timothy Flynn 11d2e6101f Meta: Add AK and LibRIFF to macOS bundles in GN build 2024-01-23 14:07:46 -07:00
Timothy Flynn e7773f0f0a Meta: Port recent changes to the GN build
29396415d5
1aed465efe
2024-01-23 14:07:46 -07:00
stelar7 be8489fb04 LibWeb/IDL/Codegen: Handle BufferSource in union types 2024-01-23 14:07:06 -07:00
stelar7 3e0c0ce7ae LibWeb: Move dictionaries to separate file
Co-Authored-By: Andrew Kaster <akaster@serenityos.org>
2024-01-23 14:07:06 -07:00
stelar7 02a85d8259 LibWeb/IDL/Codegen: Generate cpp_type for enums 2024-01-23 14:07:06 -07:00
stelar7 3f4ed782b4 LibWeb/IDL/Codegen: Fix indentation error due to else block 2024-01-23 14:07:06 -07:00
stelar7 a8ddf6c2a4 LibWeb: Add the CryptoKey interface 2024-01-23 14:07:06 -07:00
Tim Schumacher 5d9fa2b9a9 Meta: Use BXSHARE instead of a hardcoded Bochs directory
This allows using Bochs instances that are installed in non-standard
directories.
2024-01-22 20:18:38 -07:00
Timothy Flynn aa0a6d58b2 Userland: Remove LibCore dependency from libraries that do not use it 2024-01-22 08:48:34 -05:00
Timothy Flynn 5945cdc054 Ladybird+Meta: Extract AK into its own library on Lagom
We currently bundle AK with LibCore on Lagom. This means that to use AK,
all libraries must also depend on LibCore. This will create circular
dependencies when we create LibURL, as LibURL will depend on LibUnicode,
which will depend on LibCore, which will depend on LibURL.
2024-01-22 08:48:34 -05:00
Timothy Flynn 1e7b06aa11 Meta: Add a helper to create a Lagom utility
This helper can automatically link against libraries needed by all
utilities, such as LibCore. This is to make extracting AK into its own
library a bit easier.
2024-01-22 08:48:34 -05:00
Timothy Flynn b81a6cfe1d Meta: Port recent changes to the GN build
d125d16287
60c3a1a77b
4364a28d3d
271c9d1ae9
2024-01-22 08:48:34 -05:00
Dan Klishch b5f1a48a7c AK+Everywhere: Remove JsonValue APIs with implicit default values 2024-01-21 15:47:53 -07:00
Dan Klishch c49819cced AK+GMLCompiler+LibWeb: Remove JsonValue::is_double
This concludes a series of patches which remove the ability to observe
which arithmetic type is used to store number in JsonValue.
2024-01-21 15:47:53 -07:00
Dan Klishch faef802229 AK+GMLCompiler: Remove JsonValue::as_double()
Replace its single (non-test) usage with newly created as_number(),
which does not leak information about internal integer storage type.
2024-01-21 15:47:53 -07:00
Dan Klishch b74df136fe JSSpecCompiler: Always treat trailing MemberAccess as punctuation
Due to the way expression parser is written, we need to resolve the
ambiguity between member access operators and dots used for punctuation
during lexing. The lexer uses a (totally bulletproof) heuristic to do
that: whenever '.' is followed by ' ' or '\n', it is considered a dot
and member access otherwise. While it works fine for prettified test
cases, non-prettified files often lack enter after a trailing dot
character. Since MemberAccess will always be invalid at that position,
explicitly treat trailing dot as a part of punctuation.
2024-01-21 14:57:10 -07:00
Dan Klishch b4a9fde756 JSSpecCompiler: Recurse into the correct subtrees in RecursiveASTVisitor
RecursiveASTVisitor was recursing into the subtrees of an old root if it
was changed in on_entry callback. Fix that by querying root pointer just
after on_entry callback returns. While on it, also use
`AK::TemporaryChange` instead of setting `m_current_subtree_pointer`
manually.

As it turns out, `FunctionCallCanonicalizationPass` was relying on being
able to replace tree on entry, and the bug in RecursiveASTVisitor made
the pass to not fully canonicalize nested function calls.

The changes to GenericASTPass.cpp alone are enough to fix the problem
but it is canonical (for some definition of canonicity) to only change
trees in on_leave. Therefore, the commit also switches
FunctionCallCanonicalizationPass to on_leave callback.

A test for this fix and one from the previous commit is also included.
2024-01-21 14:57:10 -07:00
Dan Klishch 33b36476d9 JSSpecCompiler: Properly parse function calls with zero arguments
We cannot handle them normally since we need text between parenthesis to
be a valid expression. As a workaround, we now push an artificial value
to stack to act as an argument (it'll be later removed during function
call canonicalization).
2024-01-21 14:57:10 -07:00
Dan Klishch 14ee25b8ba JSSpecCompiler: Make -xspec capable of parsing the whole specification
... in theory. In practice, we fail to parse all of the functions.
2024-01-21 14:57:10 -07:00
Dan Klishch 483e195e48 JSSpecCompiler: Store arguments in declaration instead of definition
And create a struct encapsulating argument name in the preparation for
argument types and optional arguments.
2024-01-21 14:57:10 -07:00
Dan Klishch 0806ccaeec JSSpecCompiler: Start converting crashes to error messages
I got fed up with looking at error messages that tell me "VERIFICATION
FAILED: !is_error()". So this commit introduces DiagnosticEngine class
whose purpose is to accumulate and print more user-friendly errors.
2024-01-21 14:57:10 -07:00
Dan Klishch 3aec6952a2 JSSpecCompiler: Make TranslationUnit fields private
For some reason I was afraid to add trivial accessors to classes
in earlier PRs, so we now have dozens of classes with public fields. I'm
not exactly looking forward to refactoring them all at once but I'll
do so gradually.
2024-01-21 14:57:10 -07:00
Sam Atkins e4c7b9817b GMLCompiler: Sort enum_properties alphabetically and remove duplicate 2024-01-21 09:32:10 -05:00
Sam Atkins 3df3a85235 LibGfx+Userland: Move FontWeight enum into its own file
FontDatabase.h with its includes add up to quite a lot of code. In the
next commit, compiled GML files are going to need to access the
FontWeight enum, so let's allow them to do that without pulling in lots
of other things.

Also, change users to include FontWeight.h instead of FontDatabase.h
where appropriate.
2024-01-21 09:32:10 -05:00
Bastiaan van der Plaat ba8704243e LibWeb: Add short type to IDL generator 2024-01-20 08:57:37 +01:00
Nico Weber a0462f495c LibPDF+MacPDF: Clip text, and add a debug option for disabling it 2024-01-20 08:56:03 +01:00
Mr.UNIX f6c32ea45e GMLCompiler: Add enum initializer for background_role 2024-01-19 17:05:53 +01:00
Mr.UNIX 64e79a618b GMLCompiler: Add enum initializer for orientation 2024-01-19 17:05:53 +01:00
Mr.UNIX 0a1a081d8a GMLCompiler: Add OpacitySlider header to class file mappings 2024-01-19 17:05:53 +01:00
kleines Filmröllchen 14a99bb22d Calendar: Use new GML compiler 2024-01-19 10:50:15 +00:00
ronak69 d720fb8845 CMake: Set CMAKE_COLOR_DIAGNOSTICS to ON for colored diagnostics
This patch removes the explicit compile flag that only works for g++
(`-fdiagnostics-color=always`; clang++ needs `-fcolor-diagnostics`) and
uses CMake's built in variable that can control color output.

Now both compilers should output colored diagnostics.
2024-01-18 13:59:35 +01:00
Tim Ledbetter 45181e8eaf Fuzzers: Continue if frame is malformed in GIF fuzzer 2024-01-18 13:59:04 +01:00
Tim Ledbetter 4173a9880f Fuzzers: Don't disable debug logging in GIF fuzzer if GIF_DEBUG is set 2024-01-18 13:59:04 +01:00
Nico Weber b5aef8e404 MacPDF: Add Debug menu items to hook up Clip Images/Paths settings 2024-01-17 08:42:56 +00:00
Nico Weber aab3cd33f6 Meta/run.py: Fix grammar in method names
"Setup" is the noun, "to set up" is the verb.

No behavior change.
2024-01-16 09:55:42 -05:00
Sam Atkins fb644d08ac LibFileSystem+Everywhere: Return ByteString current_working_directory()
That is, return it *from* current_working_directory(), but I didn't have
room. :^)
2024-01-16 08:42:34 +00:00
Nico Weber a7fbb7fd0b MacPDF: Make Debug menu work when sidebar has focus 2024-01-15 23:24:07 -07:00
Nico Weber a4b5b9e82a MacPDF: Unbreak Go to Next/Previous Page after #22768 2024-01-15 23:24:07 -07:00
kleines Filmröllchen d125d16287 LibAudio+LibRIFF: Move general RIFF handling to LibRIFF
This splits the RIFFTypes header/TU into the WAV specific parts, which
move to WavTypes.h, as well as the general RIFF parts which move to the
new LibRIFF.

Sidenote for the spec comments: even though they are linked from a site
that explains the WAV format, the document is the (an) overall RIFF spec
from Microsoft. A better source may be used later; the changes to the
header are as minimal as possible.
2024-01-15 23:23:26 -07:00
Nico Weber 7fcce6b6c4 Meta/run.py: Move arguments_generator() out of class
@staticmethod decorators seem to not work in 3.9. Just move
arguments_generator() to the toplevel.
2024-01-15 23:15:30 -07:00
Nico Weber a659d7a4c2 Meta/run.py: Use if/elif instead of match
Less code, less indentation, and works with Py3.9.

(In return, the checked variable name is repeated in each conditional.)
2024-01-15 23:15:30 -07:00