Commit graph

2594 commits

Author SHA1 Message Date
Timothy Flynn bf59e06d2a Ladybird+LibWebView: Extract common JS console functionality to a helper
This creates WebView::ConsoleClient to handle functionality that will be
common to the JS consoles of all Ladybird chromes. This will let each
chrome focus on just the UI.

Note that this includes the `console.group` functionality that only the
Serenity chrome previously had. This was a FIXME in the Qt chrome, and
it is implemented such that all chromes will receive this functionality
for free.
2023-08-30 09:24:59 +02:00
Timothy Flynn 1e1c3e5a34 LibWebView: Create a method to syntax-highlight page source with HTML
This tokenizes a page's source to produce HTML with syntax highlighting.
The first implementation here is rather simple; we do not yet implement
code folding, line numbers, etc.

The goal is for this to be used as the View Source implementation for
all Ladybird chromes.
2023-08-29 08:11:11 -04:00
Sebastian Zaha 967cb86c5b Meta: Port recent build changes to gn build
This ports the following commits:

848ec538c6
703c2bb06e
27dd2a40ad
daefe744ba
9812031a02
4c0816b002
8bb275f2ea
3f122b7335
2023-08-29 09:37:52 +02:00
Timothy Flynn 5d7e73adfe Meta: Add and document convenient method to build non-Qt Ladybird chrome
This lets us switch between the AppKit and Qt chromes more easily.
2023-08-27 19:02:36 -04:00
Luke Wilde af2886449a LibWeb: Implement PerformanceObserver 2023-08-27 23:27:44 +02:00
Timothy Flynn 3f122b7335 LibWebView: Allow using native/user style sheets on Lagom
Move the methods to set the native/user style sheets to the base
ViewImplementation class. We must also generate the native style sheet
explicitly for now, as LibWebView on Lagom isn't able to include the
main LibWebView CMakeLists.txt file yet.
2023-08-26 15:32:36 -04:00
Timothy Flynn 70a87795e4 LibWeb: Remove the Tests subfolder
These were used only by test-web, which was removed in commit 81aa60163.
2023-08-25 05:39:58 +02:00
Andrew Kaster d1aea87889 LibWeb: Add NavigateEvent, the main event of the Navigation API
This event is the star of the show, and the main way that web content
can react to either programmatic or user-initiated navigation.

All of the fun algorithms will have to come later though.
2023-08-24 11:03:57 -06:00
Andrew Kaster 3dd3b2019d LibWeb: Add NavigationTransition, a transient property of Navigation
This property is useful for web content to determine whether an ongoing
navigation has settled or not.
2023-08-24 11:03:57 -06:00
Andrew Kaster 4989375191 LibWeb: Add NavigationDestination, used for NavigateEvents
This class will be used in the algorithms for the navigate event firing
algorithms to populate the destination field of the NavigateEvent.
2023-08-24 11:03:57 -06:00
Andrew Kaster 0c2f758067 LibWeb: Implement the start of the Navigation API
This API is how JavaScript can manipulate the new Navigable concepts
directly. We are still missing most of the interesting algorithms on
Navigation that do the actual navigation steps, and call into the
currently WIP navigable AOs.
2023-08-24 11:03:57 -06:00
Andrew Kaster 51c2835044 LibWeb: Add NavigationCurrentEntryChangeEvent, fired when navigating
This event will be fired by Navigation when changing the current
NavigationHistoryEntry.
2023-08-24 11:03:57 -06:00
Andrew Kaster 3c1d4eab24 LibWeb: Add NavigationHistoryEntry, a wrapper around SessionHistoryEntry 2023-08-24 11:03:57 -06:00
Andrew Kaster cf0ffc12cc BindingsGenerator: Handle nullable enum properties
Add some checks to the statement wrapping code to make sure we properly
handle the expected pattern of returning ``Optional<Enum>`` from
nullable enum properties.
2023-08-24 11:03:57 -06:00
Sam Atkins eab44f982a Meta: Use embed_as_string_view() for stringify_gml() 2023-08-24 07:42:12 +01:00
Sam Atkins abba6f7b54 LibWeb: Use embed_as_string_view() for style sheet source generation 2023-08-24 07:42:12 +01:00
Sam Atkins af4642c826 Meta: Make embed_as_string_view.py usable by CMake builds :^) 2023-08-24 07:42:12 +01:00
Bastiaan van der Plaat c88f14902b LibWeb: Add DOMQuad and text tests 2023-08-23 12:11:21 +01:00
Bastiaan van der Plaat 43825acc79 Meta+BindingsGenerator: Add postfix to member_value_name to make unique 2023-08-23 12:11:21 +01:00
Tim Schumacher dbc25f18ec LibCompress: Let BrotliDecompressionStream take a MaybeOwned 2023-08-23 12:03:37 +01:00
Tim Schumacher 8a853278d0 LibCompress: Port ZlibDecompressor to AK::Stream 2023-08-23 12:03:37 +01:00
Timothy Flynn eb8f7b303c LibLocale+LibJS: Make relative time format APIs infallible
These APIs only perform small allocations, and are only used by LibJS.
Callers which could only have failed from these APIs are also made to
be infallible here.
2023-08-23 05:29:21 +02:00
Timothy Flynn 7536648498 LibLocale+LibJS+ClockSettings: Make date time format APIs infallible
These APIs only perform small allocations, and are only used by LibJS
and the time zone settings widget. Callers which could only have failed
from these APIs are also made to be infallible here.
2023-08-23 05:29:21 +02:00
Timothy Flynn 0914e86691 LibLocale+LibJS: Make number format APIs infallible
These APIs only perform small allocations, and are only used by LibJS.
Callers which could only have failed from these APIs are also made to
be infallible here.
2023-08-23 05:29:21 +02:00
Timothy Flynn cd526813e6 LibLocale+LibJS: Make locale data APIs infallible
These APIs only perform small allocations, and are only used by LibJS.
Callers which could only have failed from these APIs are also made to
be infallible here.
2023-08-23 05:29:21 +02:00
Timothy Flynn 2a8f558911 CI: Add a step to ensure the AppKit chrome can compile
The main build step builds the Qt chrome, because ENABLE_QT=ON is the
default. This adds a step to ensure we can build the AppKit chrome as
well.
2023-08-22 21:36:19 -04:00
Timothy Flynn 5722d0025b Ladybird: Implement an AppKit chrome for macOS :^)
This adds an alternative Ladybird chrome for macOS using the AppKit
framework. Just about everything needed for normal web browsing has
been implemented. This includes:

* Tabbed, scrollable navigation
* History navigation (back, forward, reload)
* Keyboard / mouse events
* Favicons
* Context menus
* Cookies
* Dialogs (alert, confirm, prompt)
* WebDriver support

This does not include debugging tools like the JavaScript console and
inspector, nor theme support.

The Qt chrome is still used by default. To use the AppKit chrome, set
the ENABLE_QT CMake option to OFF.
2023-08-22 21:36:19 -04:00
Andreas Kling 788c2c5a8d LibWeb: Stop using fallible JSON API in code generators 2023-08-22 13:08:24 +02:00
Andreas Kling 20ea82bacc LibWeb: Make (snake/title/camel) casification functions infallible 2023-08-22 13:08:24 +02:00
Andreas Kling 0b83717ea2 AK: Make SourceGenerator::fork() infallible 2023-08-22 13:08:24 +02:00
Andreas Kling 244516142a AK: Remove fallible SourceGenerator::try_append()
And fall back to the infallible append().
2023-08-22 13:08:24 +02:00
Andreas Kling a1d694ccdc AK: Remove fallible SourceGenerator::try_appendln()
And fall back to the infallible appendln().
2023-08-22 13:08:24 +02:00
Andreas Kling 8b936b5912 AK: Make SourceGenerator::set() infallible 2023-08-22 13:08:24 +02:00
Andreas Kling 3d5728ef57 LibWeb/BindingsGenerator: Remove some TRY() spam in generated bindings 2023-08-22 13:08:24 +02:00
Sam Atkins 5b125811f1 LibWeb: Add support for pseudo-class functions that take an ident param
This is prep work for `:dir()`, though other pseudo-classes may well use
it in the future too.
2023-08-21 13:51:56 +02:00
Ali Mohammad Pur 3c176bafee LibWasm: Implement a few SIMD instructions 2023-08-21 13:39:32 +03:30
Ali Mohammad Pur 5f013e5374 Meta: Generate bigint values for v128 constants in Wasm tests 2023-08-21 13:39:32 +03:30
Ali Mohammad Pur 2462064fcd LibWasm+LibWeb: Parse and validate all Wasm SIMD instructions 2023-08-21 13:39:32 +03:30
Sam Atkins 0d021a63c7 LibUnicode: Generate data for bidirectional character types
This will let us examine code points to determine the rtl/ltr direction
of a piece of text.
2023-08-20 16:21:35 -04:00
Shannon Booth daefe744ba LibWeb: Implement RadioNodeList
This interface is used in the interface for HTMLFormControlsCollection
as a live view over its matching elements.

Currently the "value" attribute for this interface is left
unimplemented.
2023-08-20 11:04:03 +02:00
Andrew Kaster 041d5bff91 Meta: Port changes to gn build
This commit includes gn changes for the following commits:
625aac2367
8451c4d91c
8fcf42f684
9ba4c33940
1d6c2cb287
8e5b2907f6
d68433653a
2023-08-19 21:05:06 -06:00
Andrew Kaster 863fad0e32 Meta: Add ccache compiler launcher to gn build 2023-08-19 21:05:06 -06:00
Andrew Kaster 0acd87954b Meta: Add Serenity Kernel to gn build 2023-08-19 21:05:06 -06:00
Andrew Kaster f4e37c8ad4 Meta: Add serenity toolchain to gn build 2023-08-19 21:05:06 -06:00
Andrew Kaster f8e1544f41 StateMachineGenerator: Pass output file as an argument
This allows us to avoid shell redirection to create output files, and
will help with the GN build.
2023-08-19 21:05:06 -06:00
Andrew Kaster 871485cc0d Meta: Port fe672989a9 to gn build 2023-08-19 21:05:06 -06:00
Sebastian Zaha a0fb1478bf Meta: Add options for lldb and gdb output to gn
This makes it possible to specify (instead of is_debug) a more
specialized is_debug_lldb or is_debug_gdb, so that clang outputs the
proper symbols. (For lldb this fixes issues with formatting by
setting -fstandalone-debug)
2023-08-19 20:09:26 -06:00
Sebastian Zaha 1b395a3df9 Meta: Port GCC compile option from cmake to gn
The clang build is very noisy without
-Wno-implicit-const-int-float-conversion
2023-08-19 20:09:26 -06:00
Sebastian Zaha b4df4d66dc Meta: Port recent build changes to gn build
This ports the following commits:

f76c614a84
ddbe6bd7b4
2eaa528a0e
1b40bf9783
9f6ceff7cf
52d6df5ee5
9e22f01eba
bf4e2f3e9c
da2cd73bcf
2023-08-19 20:09:26 -06:00
Andrew Kaster 99499a6fae Ladybird+Meta: Add ctest to run WPT in the Integration configuration
By running ctest -C Integration -R WPT, you can run WPT. Adding just
-C Integration will run all other tests *and* the WPT test.

Also add support for ./Meta/serenity.sh test lagom WPT to serenity.sh
2023-08-19 23:50:29 +02:00
Andrew Kaster 8e605fb0f9 Meta+LibWeb: Make WPT run script runnable anywhere, remove apt installs
We should be documenting required pacakges elsewhere and installing them
in the setup step of CI.

This also fixes a problem where the run script would fail if you already
had a cloned wpt directory.
2023-08-19 23:50:29 +02:00
Sam Atkins 2038cb3c81 LibWeb: Make CSS math function parsing infallible 2023-08-19 17:34:22 +02:00
Sam Atkins 28c2836c24 LibWeb: Make external StyleValue-parsing methods infallible 2023-08-19 17:34:22 +02:00
Daniel Bertalan 075ce53d14 AK: Fix Clang 18 -Wdeprecated-literal-operator warning
The proper syntax for defining user-defined literals does not require a
space between the `operator""` token and the operator name:

> error: identifier 'sv' preceded by whitespace in a literal operator
>        declaration is deprecated
2023-08-19 11:07:12 +02:00
kleines Filmröllchen 096cecb95e Everywhere: Add RISC-V 64 target to the build system
This is a minimal set of changes to allow `serenity.sh build riscv64` to
successfully generate the build environment and start building. This
includes some, but not all, assembly stubs that will be needed later on;
they are currently empty.
2023-08-18 08:37:43 -06:00
Daniel Bertalan 182bb97479 CMake: Always build LibC with -ftls-model=initial-exec
LibC is always guaranteed to be loaded at program start, so its
thread-local variables live in the static TLS block. This permits us to
use the more optimal initial-exec TLS access model.
2023-08-18 16:20:13 +02:00
Cameron Youell 8fcf42f684 LibPublicSuffix: Add Library and Generators 2023-08-17 15:30:23 +01:00
Nicolas Ramz 0986533c11 Meta+Tests: Add a fuzzer and a test for the ILBM decoder 2023-08-15 18:36:11 +01:00
Nicolas Ramz fda5590313 LibGfx/ILBM: Add an IFF-ILBM decoder :)
IFF was a generic container fileformat that was popular on the Amiga
since it was the only file format supported by Deluxe Paint.

ILBM is an image format popular in the late eighties/nineties
that uses the IFF container.

This is a very first version of the decoder that only supports
(byterun) compressed files with bpp <= 8.

Only the minimal chunks are decoded: CMAP, BODY, BMHD.

I am planning to add support for the following variants:

- EHB (32 colours + lighter 32 colours)
- HAM6 / HAM8 (special mode that allowed to display the whole Amiga
4096 colours / 262 144 colours palette)
- TrueColor (24bit)

Things that could be fun to do:

- Still images could be animated using color cycle information
2023-08-15 18:36:11 +01:00
Bastiaan van der Plaat eafdb06d87 LibWeb: Add directory entries page when visiting a local directory 2023-08-15 10:41:54 +01:00
Andreas Kling 58e482a06d LibGUI: Remove Layout::try_add_spacer()
And fall back to the infallible add_spacer().

Work towards #20557.
2023-08-14 14:57:54 +02:00
Andrew Kaster ea0e07ec8f Meta: Include RPATH rules at top level to share them with Ladybird
When using Ladybird/ as CMake source directory, the RPATH rules were
left at the default, which is almost never correct.
2023-08-13 23:31:00 -06:00
Andreas Kling 72c9f56c66 LibJS: Make Heap::allocate<T>() infallible
Stop worrying about tiny OOMs. Work towards #20449.

While going through these, I also changed the function signature in many
places where returning ThrowCompletionOr<T> is no longer necessary.
2023-08-13 15:38:42 +02:00
Daniel Bertalan 1e737e763e CI: Force UBSan errors to be fatal for Serenity tests
The test runner script sets the `halt_on_error=1` `UBSAN_OPTIONS` flag
already, this just makes it a compile-time decision. This should
alleviate some of the slowness of running on-target tests without
hardware acceleration.
2023-08-13 05:14:07 +02:00
Daniel Bertalan 44365074fe CMake: Add UNDEFINED_BEHAVIOR_IS_FATAL configure option
This is mainly intended for use on CI, as UBSan instrumentation results
in a serious load and execution time penalty there. See the previous
commit for more details.

With this enabled, the size of LibWeb, built for x86-64 with Clang 17 as
of 0b91d36a is reduced as follows:

      FILE SIZE        VM SIZE
   --------------  --------------
     +18% +2.99Mi  [ = ]       0    .debug_info
     +14%  +758Ki  [ = ]       0    .debug_addr
    +2.6% +7.92Ki  [ = ]       0    .debug_abbrev
    +129% +2.66Ki  [ = ]       0    [Unmapped]
    -0.2%    -208  -0.2%    -208    .plt
    -0.2%    -312  -0.2%    -312    .rela.plt
    -0.1%    -336  -0.1%    -336    .dynsym
    -0.0%    -647  -0.0%    -513    [8 Others]
    -0.1% -1.14Ki  -0.1% -1.14Ki    .dynstr
   -20.1% -53.5Ki -20.1% -53.5Ki    .eh_frame_hdr
    -7.2% -56.8Ki  [ = ]       0    .debug_str_offsets
    -7.1%  -156Ki  [ = ]       0    .debug_str
   -15.0%  -160Ki  [ = ]       0    .symtab
   -63.6%  -245Ki -63.6%  -245Ki    .relr.dyn
   -25.4%  -357Ki -25.4%  -357Ki    .eh_frame
   -27.7% -1.09Mi  [ = ]       0    .strtab
   -59.3% -10.0Mi  [ = ]       0    .debug_rnglists
   -41.3% -11.0Mi  [ = ]       0    .debug_line
   -70.0% -12.0Mi -70.0% -12.0Mi    .rodata
   -65.2% -15.1Mi -65.2% -15.1Mi    .data
   -53.0% -15.7Mi -53.0% -15.7Mi    .text
   -41.7% -62.1Mi -57.7% -43.4Mi    TOTAL
2023-08-13 05:14:07 +02:00
Andrew Kaster a0a1411ec9 CMake: Set CMAKE_RUNTIME_OUTPUT_DIRECTORY based on CMAKE_INSTALL_BINDIR
Instead of hardcoding bin/, we should use the INSTALL_BINDIR directly
to reflect the intent of the way we're doing the settings.

This should have the benefit of fixing the build when a distro sets the
GNUInstallDirs variables to exciting values, like on NixOS.
2023-08-12 18:21:38 -06:00
kleines Filmröllchen aa741a1544 GMLCompiler: Allow using GML in any kind of Userland program
This is accomplished by detecting the Userland subdirectory from the GML
file's own path. Thereby, any Userland program, e.g. applet,
application, or even service, can use GML and the include paths of the
generated files will be correct.
2023-08-12 12:29:19 -06:00
kleines Filmröllchen 285119bc1a GMLCompiler: Force main class name to be resolved from global namespace
Calculator would otherwise trip over this, since there's a class with
the same name within the namespace.
2023-08-12 12:29:19 -06:00
kleines Filmröllchen 842a5adfdc GMLCompiler: Add a variety of special cases
Headers, enum properties, and associated default includes.
2023-08-12 12:29:19 -06:00
kleines Filmröllchen a24d9f5e22 GMLCompiler: Handle bitmap properties 2023-08-12 12:29:19 -06:00
kleines Filmröllchen 04a4f6a2e8 GMLCompiler: Allow generating enum constants from strings
As with other special cases, this depends on the property name.

The UIDimension code is kept separate since it can handle both integers
and strings, and the string names for special dimensions don't match
with the enum names.
2023-08-12 12:29:19 -06:00
kleines Filmröllchen cc6b9d5873 GMLCompiler: Escape compiled strings
We don't want a newline to cause havoc.
2023-08-12 12:29:19 -06:00
kleines Filmröllchen 33bd078052 GMLCompiler: Handle spacer pseudo-objects 2023-08-12 12:29:19 -06:00
kleines Filmröllchen 625aac2367 LibAudio: Add a FLAC encoder
This encoder can handle all integer formats and sample rates, though
only two channels well. It uses fixed LPC and performs a
close-to-optimal parameter search on the LPC order and residual Rice
parameter, leading to decent compression already.
2023-08-12 12:25:26 -06:00
Valtteri Koskivuori 077a8058c3 LibIMAP+Mail: Implement RFC2047 message header encoding
This enables us to display email subject fields with non-ASCII
characters in Mail :^)
2023-08-12 11:45:52 -06:00
Valtteri Koskivuori 8451c4d91c LibIMAP: Add useful dbgln_if() printouts to IMAP::Parser
I couldn't run the parser in a debugger like I normally would, so I
added printouts to understand where the parser is failing.
More could be added, but these are enough to get a good idea of what
the parser is doing. It's very spammy, though, so enable it by flicking
the IMAP_PARSER_DEBUG switch :^)
2023-08-12 11:45:52 -06:00
Daniel Bertalan 11896868d6 CMake: Clean up AArch64 compiler flags
Two non-functional changes:
- Remove pointless `-latomic` flag. It was specified via
  `add_compile_options`, which only affects compilation and not linking,
  so the library was never actually linked into the kernel. In fact, we
  do not even build `libatomic` for our toolchain.
- Do not disable `-Wnonnull`. The warning-causing code was fixed at some
  point.

This commit also removes `-mstrict-align` from the userland. Our target
AArch64 hardware natively supports unaligned accesses without a
significant performance penalty. Allowing the compiler to insert
unaligned accesses into aligned-as-written code allows for some
performance optimizations in fact. We keep this option turned on in the
kernel to preserve correctness for MMIO, as that might be sensitive to
alignment.
2023-08-12 19:39:00 +02:00
kleines Filmröllchen e304ba492f Meta: Fix ENABLE_LAGOM_LIBWEB CMake configuration 2023-08-12 11:29:43 -06:00
Sam Atkins b684bab5f1 LibWeb: Make :host() take a <compound-selector>
This matches the spec:
https://drafts.csswg.org/css-scoping-1/#selectordef-host
2023-08-12 16:26:32 +02:00
Sam Atkins f76c614a84 LibWeb: Generate PseudoClass metadata
The usual to/from-string functions, and metadata about whether the
pseudo-class is a a function or not, and what type of parameter it
takes.
2023-08-12 16:26:32 +02:00
Jonah 0b2da4f8c6 LibWeb: Add the default user agent MathML stylesheet
We now apply MathML's default user agent style sheet along with other
default styles. This sheet is not mixed in with the other styles in
CSS/Default.css because it is a namespaced stylesheet and so has to
be its own sheet.
2023-08-12 07:59:23 +01:00
Jonah cce50b1841 LibWeb: Add MathML Namespace to IDL Generator
This will make the codegen produce code for MathML IDL that doesn't
fail to compile in confusing ways.
2023-08-12 07:59:23 +01:00
Aliaksandr Kalenik 0abe2a5023 Meta: Remove usage of bytecode_interpreter_if_exists() in js_repl
There is no need to check if bytecode interpreter exists after we
switched away from AST interpreter.
2023-08-12 08:46:35 +02:00
Daniel Bertalan c0cf6e3744 CMake: Set -fvisibility-inlines-hidden on ELF platforms
The C++ semantics of `inline` dictate that such functions might be
defined in multiple translation units. As with all other functions, they
must have the same address in all TUs. Because of this, the compiler
emits `inline` functions as weak symbols, which the dynamic linker can
then resolve to the same address everywhere.

This rule is responsible for a significant overhead at startup, as such
lookups happen by name. Namely, 86'000 of the 114'000 by-name symbol
lookups when loading LibWeb can be attributed to this. Most of these
are only ever defined in a single object, making this even more
pointless.

As nothing in our code relies on either ELF symbol interposition rules
or function address equality, we can use the -fvisibility-inlines-hidden
escape hatch, which causes this rule to be disregarded. As the symbols
are now hidden, no load-time symbol lookup is needed. This flag is used
without issues in other large C++ codebases like Chromium and LLVM.

Some relevant light reading, suggested by Nico:
- https://ridiculousfish.com/blog/posts/i-didnt-order-that-so-why-is-it-on-my-bill-episode-1.html
- https://www.cs.dartmouth.edu/~sergey/cs258/ABI/UlrichDrepper-How-To-Write-Shared-Libraries.pdf
- https://blog.llvm.org/2018/11/30-faster-windows-builds-with-clang-cl_14.html
- https://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Dialect-Options.html#index-fvisibility-inlines-hidden
2023-08-12 05:14:20 +02:00
kleines Filmröllchen d1645efde9 Meta+Userland: Allow generating C++ initializer code from GML
This does the exact same thing as the runtime initializer,
except it is faster and can catch some errors much earlier.

The code generator includes these important features:
- Automatic include generation where necessary
- Special-casing for TabWidget and ScrollableContainerWidget
- No use of DeprecatedString where possible
2023-08-11 21:33:48 +02:00
kleines Filmröllchen 1e67435ff5 Meta: Rename compile_gml to stringify_gml
This is what this function really does, it doesn't compile anything.
2023-08-11 21:33:48 +02:00
Andrew Kaster 941a9846a3 Meta: Assume files already extracted for ENABLE_NETWORK_DOWNLOADS=OFF
This allows external meta build systems to extract a cached archive into
our Cache directory without having to also copy the .tar.gz file.
2023-08-10 20:10:05 -06:00
Andrew Kaster 68953f798b CMake: Add option to disable network downloads altogether
This is useful for fully offline builds, and some distribution platforms
2023-08-10 20:10:05 -06:00
Andrew Kaster b046940679 CMake: Download Commonmark and Wasm spec tests using download_file()
This makes sure we have no bare file(DOWNLOAD) calls in the build
2023-08-10 20:10:05 -06:00
Andrew Kaster 92214b59ab CMake: Make sure to install generated sources and header files
We weren't installing a lot of generated sources for the top level Lagom
build or for LibWeb, making it impossible to use LibWeb from a
find_package. ...And also Kernel/API/KeyCode.h, which is included by
no less than 8 different files in Userland/Libraries. We also weren't
installing any Ladybird header files.
2023-08-10 20:10:05 -06:00
Andrew Kaster 1d78e07f6b Meta: Promote SERENITY_CACHE_DIR to a real option
We've had it as a secret option for long enough, let's make it more
visible.
2023-08-10 20:10:05 -06:00
Andreas Kling 97ebfd9f0f LibJS: Make Value::to_string_without_side_effects() infallible
Work towards #20449.
2023-08-09 17:09:16 +02:00
Andreas Kling 1a27c525d5 LibJS: Make PrimitiveString::create() infallible
Work towards #20449.
2023-08-09 17:09:16 +02:00
Andreas Kling 2eaa528a0e LibJS: Rip out the AST interpreter :^)
This has been superseded by the bytecode VM, which is both faster
and more capable.
2023-08-08 13:07:13 +02:00
Andreas Kling 3bb06cc719 Fuzzers: Use the LibJS bytecode VM 2023-08-08 13:07:13 +02:00
Andreas Kling 196e04d1c7 CI: Stop running test-js with the AST interpreter 2023-08-08 13:07:13 +02:00
Andreas Kling 18c54d8d40 LibJS: Make Cell::initialize() return void
Stop worrying about tiny OOMs.

Work towards #20405
2023-08-08 07:39:11 +02:00
Lucas CHOLLET 3f35ffb648 Userland: Prefer _string over _short_string
As `_string` can't fail anymore (since 3434412), there are no real
benefits to use the short variant in most cases.
2023-08-08 07:37:21 +02:00
Andrew Kaster 391beef707 Ladybird: Move Qt-specific classes and functions to a Qt subdirectory
This will help a lot with developing chromes for different UI frameworks
where we can see which helper classes and processes are really using Qt
vs just using it to get at helper data.

As a bonus, remove Qt dependency from WebDriver.
2023-08-07 14:58:04 -06:00
Liav A ccaa423372 Utilities: Add basic Package manager skeleton utility 2023-08-07 13:24:25 -06:00
Zaggy1024 50c73d02f0 LibAudio: Add a test for creating and destructing a PlaybackStream
This will ensure that we don't leak any memory while playing back
audio.

There is an expectation value in the test that is only set to true when
PulseAudio is present for the moment. When any new implementation is
added for other libraries/platforms, we should hopefully get a CI
failure due to unexpected success in creating the `PlaybackStream`.

To ensure that we clean up our PulseAudio connection whenever audio
output is not needed, add `PulseAudioContext::weak_instance()` to allow
us to check whether an instance exists without creating one.
2023-08-07 10:40:34 -06:00
Zaggy1024 925afcd4b0 Meta: Install libpulse on Azure to build PlaybackStreamPulseAudio on CI 2023-08-07 10:40:34 -06:00
Andreas Kling 34344120f2 AK: Make "foo"_string infallible
Stop worrying about tiny OOMs.

Work towards #20405.
2023-08-07 16:03:27 +02:00
Andreas Kling 9f6ceff7cf LibWeb: Implement basic version of CSSOM View's VisualViewport
We got some errors while loading https://twinings.co.uk/ about this
interface missing, and it looked fairly simple so I sketched it out.
Note that I did leave some FIXMEs where it's not clear exactly which
metrics we should be returning.
2023-08-06 16:29:24 +02:00
Andreas Kling ec24d7555a LibWeb: Add a simple internals objects only available during testing
This object is available as `window.internals` (or just `internals`) and
is only accessible while running in "test mode".

This first version only has one API: gc(), which triggers a garbage
collection immediately.

In the future, we can add more APIs here to help us test parts of the
engine that are hard or impossible to reach via public web APIs.
2023-08-06 15:26:34 +02:00
Andreas Kling fc44d09221 CI: Pull test262 runner from SerenityOS/libjs-test262 2023-08-06 08:56:23 +02:00
Andrew Kaster 3a82f2d7ec Meta: Port 059857d26f to gn build 2023-08-04 20:02:28 -06:00
Sebastian Zaha 100714b8ac Meta: Pretty-print strings in gdb as a single object, not by character
This changes the string pretty-printer to show strings as
"full" as opposed to {"f", "u", "l", "l", "\0"}.
2023-08-05 02:16:55 +03:30
Sebastian Zaha e13b89dd20 Meta: Implement support for the new String in the gdb formatter
The pretty-print gdb helpers were not updated since the
DeprecatedString change. This commit introduces a new printer for String
and renames the old one to DeprecatedString.
2023-08-05 02:16:55 +03:30
Andrew Kaster ef03e73844 Meta: Port ad440f9e9a to gn build 2023-08-04 14:20:00 -06:00
Andrew Kaster 616e61ee23 Meta: Port bc4d4f0f95 to gn build 2023-08-04 14:20:00 -06:00
Andrew Kaster 777fb44bb0 Meta: Port 78e1defbfe to gn build 2023-08-04 14:20:00 -06:00
Zaggy1024 bc4d4f0f95 LibAudio: Create a playback class with a PulseAudio implementation
This adds an abstract `Audio::PlaybackStream` class to allow cross-
platform audio playback to be done in an opaque manner by applications
in both Serenity and Lagom.

Currently, the only supported audio API is PulseAudio, but a Serenity
implementation should be added shortly as well.
2023-08-04 13:49:36 -06:00
Zaggy1024 fe672989a9 LibCore: Add a class for thread-safe promises
Since the existing Promise class is designed with deferred tasks on the
main thread only, we need a new class that will ensure we can handle
promises that are resolved/rejected off the main thread.

This new class ensures that the callbacks are only called on the same
thread that the promise is fulfilled from. If the callbacks are not set
before the thread tries to fulfill the promise, it will spin until they
are so that they will run on that thread.
2023-08-04 13:49:36 -06:00
Andrew Kaster de1726caee BindingsGenerator: Only truncate generated files if they have changed
Rework the write_if_changed logic to properly truncate the output file.
The original logic would not truncate the file, leading to extra junk
at the end of files if the IDL files shrunk between builds.
2023-08-04 10:06:41 -06:00
Karol Kosek d94a0623d0 Meta: Truncate generated IDL source files
3dd3120a8a changed open mode from Write to
ReadWrite, which stopped truncating files.

This could be noticed by building a slightly older branch, as compiling
it gave compile errors.
2023-08-04 15:59:16 +02:00
Karol Kosek d1f98108a9 Meta: Add ImageFormats/JPEGWriter.cpp to gn build 2023-08-04 11:05:55 +02:00
Sebastian Zaha a89e95f57c Meta: Port GCC compile option from cmake to gn
The GCC build is extremely noisy without -Wno-literal-suffix. (Tested on
 GCC12)
2023-08-03 09:52:54 -06:00
Andrew Kaster 7d7c419ce6 Ladybird: Add WebSocket server for use by Lagom networking
Hide its use behind the same flag as RequestServer in WebContent.
2023-08-03 09:55:20 +02:00
Andrew Kaster a1e5a6ac40 Ladybird: Remove Qt dependency from RequestServer
This requires two parts: Core::System::current_executable_path(), and
passing the serenity-resource-root as an argument to the process.
2023-08-03 09:55:20 +02:00
Andrew Kaster 88ccaae11e Ladybird: Rename classes ending with Ladybird
Now that all the classes for Ladybird are in the Ladybird namespace, we
don't need them named as Ladybird::FooBarLadybird. For the Qt-specific
classes, we can tack on a Qt at the end for clarity, but FontPlugin and
ImageCodecPlugin no longer have anything to do with Qt.
2023-08-03 09:55:20 +02:00
Andrew Kaster b5bfe732d7 Ladybird: Add RequestServer process to optionally replace Qt Networking
LibTLS still can't access many parts of the web, so let's hide this
behind a flag (with all the plumbing that entails).

Hopefully this can encourage folks to improve LibTLS's algorithm support
:^).
2023-08-02 05:44:43 +02:00
Andrew Kaster 5062ba347b Ladybird+LibWebView: Move Lagom code to Ladybird, Qt code to Utilities
Re-organize our helper files here a bit, to make a clearer distinction
between Qt-specific helpers and generic non-serenity helpers.

A future commit will move Lagom specific code from LibSQL to ladybird
as well, so that we can see about future generic apis for spawning
helper procesess.
2023-08-02 05:44:43 +02:00
Andrew Kaster 3be71a81bb Ladybird: Don't link SQLServer against Qt when it doesn't need it 2023-08-02 05:44:43 +02:00
Andrew Kaster 1903e7ff53 Meta: Port b3f82f724d to gn build 2023-08-01 19:41:18 -06:00
Andrew Kaster b6d60980bb Ladybird: Rename FontPluginQt -> Ladybird as it is unrelated to Qt now
The Qt relationship was removed in de31a8a4, so let's acknowledge that
and make it clearer to potential non-Qt ports that this file is usable
by them :^).
2023-08-01 05:06:40 +02:00
Nico Weber ecef13338e Meta: Only write first output file to depfile
There's no advantage to writing more than one file, and it lets the
depfile work with older versions of ninja.
2023-07-31 14:55:03 -06:00
Andrew Kaster 804188ac0c Meta: Port 1d59a62944 to gn build 2023-07-31 12:02:17 -06:00
Andreas Kling cb8664e2e1 LibWeb/BindingsGenerator: Fix the build
I'm not sure why this didn't break on CI, but none of my machines were
able to build without this change.
2023-07-31 07:39:49 +02:00
Andrew Kaster 3dd3120a8a Meta+BindingsGenerator: Only invoke BindingsGenerator once per IDL file
This reduces the number of tasks to schedule, and the complexity of the
build system integrations for the BindingsGenerator. As a bonus, we move
the "only write if changed" feature into the generator to reduce the
build system load on generated files for this generator.
2023-07-30 17:50:44 -06:00
Andrew Kaster cc3e179b23 Meta: Port 60e35f2a97 to gn build 2023-07-30 16:52:03 -06:00
Andrew Kaster fac389f648 Meta: Port 1837e94ba4 to gn build 2023-07-30 16:51:33 -06:00
Lucas CHOLLET 005184e4a4 Meta: Use is instead of == to compare types
This fixes the multiple "E721 do not compare types" failures that
appeared during CI runs.
2023-07-29 23:23:25 +01:00
Andreas Kling 13d5d47b56 LibWeb: Implement the CSS all property
This sets all longhand values to one of initial, inherit, unset or
revert. Note that revert is not supported yet, but will be soon.
2023-07-29 19:16:08 +02:00
Timothy Flynn bbd80d2e4d LibLocale: Replace some slow CLDR vector lookups with a hash map
The LocaleData generator currently stores vectors of unique instances of
CLDR data (e.g. languages, currencies, etc.). For each CLDR file that we
parse, we linearly search through those vectors to decide if the current
field being parsed is unique. Given the size of the CLDR, this adds up
to quite a bit of time.

Augment these vectors with a hash map to store the index of each unique
instance in those vectors. This allows for quickly checking if a field
is unique, and to later look up those indices.

We do not apply this technique to every bit of CLDR data here. For
example, CLDR::character_orders contains only 2 entries. In that case,
it is quicker to search the vector than it is to hash a string key.

This reduces the runtime of GenerateLocaleData from to 2.03s to 1.09s.
2023-07-28 21:05:52 +02:00
Timothy Flynn e86769c068 LibLocale: Preprocess unique CLDR date fields
Similar to languages and currencies, extract the loop to collect the
unique set of date fields to a preprocessing function. This alone does
not yield any performance improvement, but combined with an upcoming
patch will make the parse_locale_date_fields() a bit faster.
2023-07-28 21:05:52 +02:00
Timothy Flynn c9b39c0c39 LibLocale: Decide to skip parsing CLDR calendars a little earlier
We currently parse each CLDR calendar, then decide based on its primary
key whether we want to skip it. Instead, we can decide to skip it based
on its file name.

This reduces the runtime of GenerateLocaleData from 2.03s to 1.97s.
2023-07-28 21:05:52 +02:00
Timothy Flynn 63035f029a LibLocale: Cache parsed CLDR files that must be read more than once
The LocaleData generator has to read a few of the CLDR files more than
once, to e.g. prepare some data up front (for reasons why, see commits
c86f7a6 and 0b69e9f). This takes non-neglible time, especially for large
JSON files such as currencies.json. So in these cases, cache the parsed
JSON in a map.

This reduces the runtime of GenerateLocaleData from 2.32s to 2.03s.
2023-07-28 21:05:52 +02:00
Timothy Flynn b91af3c6a0 LibUnicode: Remove a few generator tracking fields that are now unused
These were used to generate specialized tables. Now that those tables
have been migrated to general 2-stage lookup tables, these fields are
all unused.
2023-07-28 05:28:50 +02:00
Timothy Flynn 456211932f LibUnicode: Perform code point case conversion lookups in constant time
Similar to commit 0652cc4, we now generate 2-stage lookup tables for
case conversion information. Only about 1500 code points are actually
cased. This means that case information is rather highly compressible,
as the blocks we break the code points into will generally all have no
casing information at all.

In total, this change:

    * Does not change the size of libunicode.so (which is nice because,
      generally, the 2-stage lookup tables are expected to trade a bit
      of size for performance).

    * Reduces the runtime of the new benchmark test case added here from
      1.383s to 1.127s (about an 18.5% improvement).
2023-07-28 05:28:50 +02:00
Timothy Flynn 0ee133af90 LibUnicode: Separate code point case information into its own structure
There is no functional change here. This information will compose the
upcoming multistage casing tables in an upcoming patch. Extract it to
its own struct to prepare for that.
2023-07-28 05:28:50 +02:00
Timothy Flynn a332a8ad19 LibUnicode: Prepare Unicode data generator for multistage casing tables
There is no functional change here. This just adjusts the changes made
in commit 0652cc4 to be a bit more generic for code point casing tables.
We currently only generate property tables, which boil down to a vector
of booleans. Casing tables will be a struct of varying types, so this
generalizes some of the generator to prepare for that ahead of time, to
make the upcoming casing patch smaller / easier to grok.
2023-07-28 05:28:50 +02:00
Timothy Flynn 3fae92eea2 LibUnicode: Search code point properties sequentially at compile time
When generating code point property tables, we currently binary search
the code point range lists for each property to decide if a code point
has that property. However, we are both iterating over the code points
and through the sorted properties in order. This means we do not need
to search code point ranges that are below the current code point at
all. We can even remove the code point ranges that fall below the
current code point, as we will not see a code point in those ranges
again.

On my machine, this reduces the run time of GenerateUnicodeData from
3.4 seconds to 1.2 seconds.
2023-07-28 05:28:50 +02:00
Andrew Kaster 2e0e393889 Meta: Port recent build changes to gn build
This ports the following commits:

e8a63eeb0e
bec07d4af7
0e12503586
2023-07-27 12:08:22 -06:00
Nico Weber dcb2f3aa89 Meta/gn: Don't use "abspath" for IDL inputs
The idl file lists are used for two things:

1. As inputs for `generate_window_or_worker_interfaces`
2. In a loop in `generate_idl_bindings` and the loop variable
   is passed to `rebase_path`

Both these cases can handle a normal fully-qualified GN path,
so there's no need for the "abspath".

No behavior change.
2023-07-27 10:02:01 -06:00
Nico Weber 406b68a612 Meta: Port 77d7f715e3 to gn 2023-07-27 10:02:01 -06:00
Zaggy1024 66c9696687 LibGfx: Add initial ISO BMFF parsing and a utility to print file info
Currently, the `isobmff` utility will only print the media file type
info from the FileTypeBox (major brand and compatible brands), as well
as the names and sizes of top-level boxes.
2023-07-27 12:02:37 +01:00
Timothy Flynn 47595b9ef0 CI: Set TESTS_ONLY mode for unit tests on Lagom
This disables running benchmark test cases on Lagom in CI. When we run
unit tests on-board Serenity, run-tests sets this environment variable.
We do not use that utility to run unit tests on Lagom, so we've been
running benchmark tests unnecessarily.
2023-07-26 16:09:29 -06:00
Sam Atkins bf1d680a75 FuzzPDF: Initialize document so page count is accurate
Without calling `initialize()`, the page count is 0, so the loop never
ran and we never actually tested any of the code in `get_page()`.
2023-07-26 06:22:34 -04:00
Andrew Kaster 5028223c37 Meta+Utilities: Make pre-commit checks significantly less verbose
When markdown-check is built, it outputs hundreds of lines of "ignoring
this and that link because reasons". This is extremely not helpful when
trying to figure out exactly which check failed on your commit. Also
remove the timing numbers from lint-ci.sh These are just noise and also
don't help to figure out which pre-commit check failed. Ideally the
output on fail should be "[OK]: Check A" for all the passing checks and
"[FAIL] Check N" with the required context for the failed check.
2023-07-26 06:21:39 -04:00
Timothy Flynn 0652cc48c0 LibUnicode: Perform code point property lookups in constant time
We currently produce a single table for all categories of code point
properties (GeneralCategory, Script, etc.). Each row contains a field
indicating the range of code points to which that property applies. At
runtime, we then do a binary search through that table to decide if a
code point has a property.

This changes our approach to generate a 2-stage lookup table for each of
those categories. There is an in-depth explanation of these tables above
the new `create_code_point_tables` method. The end effect is that code
point property lookup is reduced from a binary search to constant-time
array lookups.

In total, this change:

    * Increases the size of libunicode.so from 2.7 MB to 2.9 MB.

    * Reduces the runtime of the new benchmark test case added here from
      3.576s to 1.020s (a 3.5x speedup).

    * In a profile of resizing a TextEditor window with a 3MB file open,
      the runtime of checking if a code point has a word break property
      reduces from ~81% to ~56%.
2023-07-26 08:36:20 +02:00
Timothy Flynn 8f1d73abde LibUnicode: Use the public CodePointRange in the code generator
The next commit will need a type from LibUnicode/CharacterTypes.h. To
avoid conflicts between that header's CodePointRange and the one that is
defined in the code generator, just use the public definition.
2023-07-26 08:36:20 +02:00
Timothy Flynn cb128dcf75 LibUnicode: Move the CodePointRangeComparator struct to a public header
Move it out of the generated code so that it may be used by the code
generator itself.
2023-07-26 08:36:20 +02:00
Timothy Flynn c950f88611 LibUnicode: Stop generating Block property data
We started generating this data in commit 0505e03, but it was unused.
It's still not used, so let's remove it, rather than bloating the size
of libunicode.so with unused data. If we need it in the future, it's
trivial to add back.

Note we *have* always used the block name data from that commit, and
that is still present here.
2023-07-26 08:36:20 +02:00
Andreas Kling 96d5a1edb0 test-js: Run with the JavaScript bytecode VM by default
The AST interpreter is still available behind a new `--ast` flag.

We switch to testing with bytecode in the big run-tests battery on
SerenityOS. Lagom CI continues running both AST and BC.
2023-07-25 20:00:46 +02:00
Dan Klishch f25745ed27 Meta: Test LibXML on Lagom 2023-07-23 16:09:12 +02:00
Shannon Booth 732ef1e7e9 Meta: Enable test-js bytecode tests 2023-07-23 07:36:13 +02:00
Sebastian Zaha 7696738140 Meta: Port recent LibWeb and LibJS changes to gn build
This ports the following commits:
a8587fe54e
9d7215c636
2023-07-20 06:48:13 +01:00
Timothy Flynn 9d7215c636 LibJS+LibWeb: Move IteratorOperations.h AOs to Iterator.h
Rather than splitting the Iterator type and its AOs into two files,
let's combine them into one file to match every other JS runtime object
that we have.
2023-07-19 14:11:43 +01:00
Timothy Flynn 5703833116 LibJS+LibWeb: Refactor GetIterator to use GetIteratorFromMethod
This is an editorial change in the ECMA-262 spec. See:
https://github.com/tc39/ecma262/commit/956e5af

This splits the GetIterator AO into two AOs, to remove some recursion
and to (soon) remove optional parameters.
2023-07-19 06:56:51 +02:00
MacDue b5658d75f5 Fuzzers: Add a DDS fuzzer 2023-07-19 06:52:06 +02:00
MacDue 581236b24a Fuzzers: Add a TinyVG fuzzer 2023-07-19 06:52:06 +02:00
Lucas CHOLLET 4291288a31 LibGfx: Remove ImageDecoderPlugin::initialize()
No plugin is currently overriding the default implementation, which is a
no-op. So we can safely delete it.
2023-07-18 14:34:35 +01:00
Cameron Youell ae845835d6 Meta: Dont finish lines with only one character in lint-ports.py 2023-07-18 00:17:34 +02:00
Andrew Kaster 5c2c412318 Meta: Bind WritableStreamDefaultController to JS
This was missed in 868cd95069.
2023-07-17 00:00:49 +01:00
Andrew Kaster 6ffed4d62a Meta: Port LibWeb/Streams changes to gn build
This ports the following commits:

c9941ba95b
f86c3ab148
12ff48047f
f1d69d789b
0091a60448
2023-07-17 00:00:49 +01:00
Andrew Kaster 57ad638dcc Meta: Port 618c0402 to gn build 2023-07-17 00:00:49 +01:00
Ali Mohammad Pur a720feba2f Meta: Pass -- to sudo instead of '$SHELL -c' in build scripts
fddbd11baa made it so the command executed
read `sh -c -- '"script" args*'`, the -- in this command is redundant as
the script name never starts with a dash and can never be interpreted as
an option or a flag.
The actually meaningful placement for -- here is after `$SUDO`, to make
sure `$SUDO` does not incorrectly treat `-c` as an option to itself, and
`$SHELL` cannot be interpreted as an option/flag in the extremely
unlikely event that it starts with a dash.
2023-07-16 16:28:18 +01:00
Sebastian Zaha 3cbfd6382c Meta: Port 16b487c270 to gn build 2023-07-16 09:27:12 -06:00
Daniel Bertalan e64a8751d1 LibJS: Do not use the $ special character in file names
The dollar sign is a special character in POSIX shells and in the Ninja
build file format. If the file name contains a `$`, something goes wrong
in the escaping/unescaping of this symbol, and CMake/GCC/Clang generate
invalid dependency files where not all instances of `$` are escaped
properly. Because of this, Ninja fails to rebuild `$262Object.cpp` if
the headers included by it have changed.

Stale `$262Object.cpp.o` files have been the cause of mysterious crashes
multiple times which only go away after doing a clean build. Let's
prevent these from happening again by removing the `$` from the
filename.
2023-07-15 11:09:22 -04:00
Kenneth Myhra 90fdd598c2 LibWeb: Make sure we do not generate duplicate variable names 2023-07-15 11:59:39 +02:00
Sam Atkins 618c0402a7 LibWeb: Generate parsing code for CSS math functions 2023-07-15 10:23:33 +02:00
networkException 103913305b README+Meta: Update the screenshot :^)
Recreating the previous screenshot in a current build of the system will
show many, usually subtle, changes in comparison.

This patch adds a new screenshot of the SerenityOS desktop with
Terminal, File Manager, System Monitor and Ladybird visible.
2023-07-14 23:40:58 +02:00
Andrew Kaster d185217599 Meta: Add gn linter
This just calls ``gn format`` on any .gn or .gni files, but it matches
the pattern of the other linters.
2023-07-13 14:07:25 -06:00
Andrew Kaster a21a08cc9d Meta: Format LibWeb gn files
This was missed when merging the initial set. Linter should be next :^)
2023-07-13 14:07:25 -06:00
Andrew Kaster 9061ea4e90 Meta: Add a macOS bundle to gn build for ladybird
This allows opening the ladybird.app app bundle on macOS, using Xcode
tools like Instruments on the applications in the app bundle, and even
installing the app bundle into /Applications :^)
2023-07-13 14:07:25 -06:00
Andrew Kaster 18a4e882dc Meta: Setup rpath/install_name for macOS libraries and binaries in gn 2023-07-13 14:07:25 -06:00
Andrew Kaster 8475ccc232 Meta: Port c0f985ffcf to gn build 2023-07-13 14:07:25 -06:00
Andrew Kaster 2f16aa45b7 Meta: Port dd073b2711 to gn build 2023-07-13 14:07:25 -06:00
Ali Mohammad Pur efa55673cd Meta/CodeGenerators+LibWeb: Add support for 'easing-function' CSS values
This commit makes it possible to let properties accept easing functions
as values, which will be used in a later commit to implement
animation-timing-function.
2023-07-13 05:10:41 +02:00
Ali Mohammad Pur dd073b2711 Meta/CodeGenerators+LibWeb: Implement parsing CSS easing functions
This only implements the parser bits, no functionality is implemented,
and no properties are parsed because of this.
2023-07-13 05:10:41 +02:00
Sebastian Zaha c006a1ef41 Meta: Update gn build files with latest changes
Ports the recent CMakeFiles.txt changes and fixes the gn build.
2023-07-12 08:31:43 +01:00
Nico Weber c3f78d9561 pdf: Add function to render a page of a PDF to a bitmap
Use like so:

    Build/lagom/bin/pdf --render foo.png --page=50 path/to.pdf
2023-07-12 07:54:28 +01:00
Valtteri Koskivuori 2c6b156803 Userland: Teach the file utility about zip files
It now shows a short description with a file and directory counts, and
the total content size uncompressed.
2023-07-11 17:48:57 +01:00
Tim Schumacher 89b0a61067 Ports: Remove support for auth_types other than sha256 2023-07-10 13:08:27 +02: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
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