Commit Graph

61868 Commits

Author SHA1 Message Date
Andrew Kaster
d90a9ab70c LibWeb: Add Web::UIEvents::KeyCode and KeyModifier enums, drop Kernel
This was the last Kernel header we had. Move the definitions we need
into a UIEvents header similar to MouseButton.
2024-06-07 09:44:41 +02:00
Andrew Kaster
0c9dced888 Meta: Remove trivially unused Kernel API headers 2024-06-07 09:44:41 +02:00
Simon Wanner
da8ad13510 Documentation: Add some fonts to required packages
Sometimes, especially on WSL, no fonts are installed, which will fail
`VERIFY(m_default_font)` in Ladybird/FontPlugin.

Note that Liberation Sans does not provide fonts for `cursive` and
`fantasy`, which will fall back to the default, sans-serif, font.

To cover all generic font families Microsoft's "Core fonts for the Web"
are available as `ttf-mscorefonts-installer`, `ttf-ms-fonts`, etc.
2024-06-07 09:42:50 +02:00
Andrew Kaster
f98e28912a LibCore: Only include BeepInstruction in System.cpp on Serenity
It remains to be seen whether we actually need this on serenity either..
2024-06-06 12:51:14 -06:00
Andrew Kaster
82b73b2eee CMake: Move ca_certificate_download include up with other downloads 2024-06-06 12:51:14 -06:00
Andrew Kaster
6f387577c5 CMake+Base: Remove LiberationMono and rules copying it to build
This was only used by the pdf and MacPDF applications.
2024-06-06 12:51:14 -06:00
Andrew Kaster
41176a4f4e CMake: Remove Superbuild-specific install rule guard 2024-06-06 12:51:14 -06:00
Andrew Kaster
f55f64755d CMake: Remove ENABLE_LAGOM_LIBWEB and ENABLE_LAGOM_LADYBIRD options 2024-06-06 12:51:14 -06:00
Andrew Kaster
2770b7eecd LibCore: Null-check struct addrinfo to avoid freeaddrinfo(NULL)
On some C libraries, like NetBSD and musl-libc, this under-specified
edge case results in a crash rather than silently ignoring the null
pointer.
2024-06-06 12:48:58 -06:00
Andrew Kaster
b5a60c0f9f Meta: Link librt to LibCoreMinimal on NetBSD
We were already linking librt to LibCore for shm_open and friends.
Now that we build the code that uses POSIX shm into LibCoreMinimal, we
need to link librt into that as well.
2024-06-06 12:48:58 -06:00
Andrew Kaster
405ce6e5f5 LibCore: Be more BSD-friendly in Core::Environment
FreeBSD and NetBSD don't have secure_getenv(3), same as macOS.
FreeBSD 13 and lower also don't allow setting environ pointers to null.

Co-Authored-By: Robert Clausecker <fuz@FreeBSD.org>
2024-06-06 12:48:58 -06:00
Andrew Kaster
89092e98a4 LibJS: Pass -1 as fd when using MAP_ANONYMOUS with mmap
NetBSD and FreeBSD get upset when we don't set the fd to an invalid
value when using a non-shared mapping.

Reported-By: Thomas Klausner <wiz@gatalith.at>
2024-06-06 12:48:58 -06:00
easrng
43b8f82e94 LibGfx: Ignore nonexistent font directories 2024-06-06 10:42:55 -06:00
easrng
f058939f1b LibCore: Get font directories from XDG_DATA_DIRS 2024-06-06 10:42:55 -06:00
Andrew Kaster
4f406b0d1d Documentation: Update RunningTests to refer to CMakePresets 2024-06-06 10:09:46 -06:00
Andrew Kaster
1d502dfd7c Documentation: Update IDE docs to reference CMakePresets.json 2024-06-06 10:09:46 -06:00
Hexeption
6a1a62d9b6 CMake: Added VCPKG_ROOT env to presets 2024-06-06 10:09:11 -06:00
Andrew Kaster
b9fb075419 Documentation: Add two new FAQ entries for independence and Windows 2024-06-06 17:44:37 +02:00
Andrew Kaster
aef6ece9e6 Meta: Remove shred utility 2024-06-06 09:43:51 -06:00
Timothy Flynn
d61770c457 LibCore: Remove now-unused singleton process utilities 2024-06-06 11:27:03 -04:00
Timothy Flynn
8362c073f3 Everywhere: Remove LibSQL, SQLServer, and the sql REPL :^)
It is now entirely unused and replaced by sqlite3.
2024-06-06 11:27:03 -04:00
Timothy Flynn
30e745ffa7 LibWebView: Replace usage of LibSQL with sqlite3
This makes WebView::Database wrap around sqlite3 instead of LibSQL. The
effect on outside callers is pretty minimal. The main consequences are:

1. We must ensure the Cookie table exists before preparing any SQL
   statements involving that table.
2. We can use an INSERT OR REPLACE statement instead of separate INSERT
   and UPDATE statements.
2024-06-06 11:27:03 -04:00
Timothy Flynn
65ddd0553b Meta+LibWebView: Install and link sqlite3 with vcpkg
We will use sqlite3 as a replacement for LibSQL. Using a tried-and-true
database will allow us to avoid maintaining our an incomplete, non-ACID,
and less performant implementation. It also means we do not have to
launch and manage the singleton SQLServer process.
2024-06-06 11:27:03 -04:00
Timothy Flynn
b36ab480bf Meta+Toolchain+CI: Add a script to bootstrap vcpkg
And hook it into ladybird.sh for convenience. The script will set up
PATH and other environment variables automatically.

On CI, vcpkg is theoretically already installed on Linux machines, but
not with the right environment variables, and not on macOS. So this also
makes CI use this script to bootstrap vcpkg.
2024-06-06 11:27:03 -04:00
Timothy Flynn
be9fe23835 Meta: Ignore only Build directories
We should still allow Build* files, e.g. BuildCMake.sh.
2024-06-06 11:27:03 -04:00
Timothy Flynn
cd581e9502 Meta: Do not pass an empty --resources flag to headless-browser
The ${resource_base_dir} no longer exists in this context. Thus LibWeb
tests were no longer actually running.
2024-06-06 13:55:10 +02:00
Timothy Flynn
d1ec32e28f LibProtocol: Exit fatally if the connection to RequestServer disappears
The default implementation of die() causes the client process to simply
exit cleanly. This prevents any tests from recognizing that something
went wrong, as the process exits with a code of 0. With this patch, we
still just exit when the connection dies, but with a fatal signal. In
the future, we will want to launch a new RequestServer process and
re-establish client connections.
2024-06-06 13:55:10 +02:00
Tim Ledbetter
fdd2f9ebbd UI/Qt: Spoof user agent across all tabs 2024-06-06 10:07:57 +02:00
Tim Ledbetter
99555f19f4 UI/Qt: Set debug menu checkbox options across all tabs
The "Enable Scripting", "Block Pop-ups" and "Enable Same-Origin Policy"
options are now set for every tab when toggled. They are also applied
to new tabs when they are created.
2024-06-06 10:07:57 +02:00
Enver Balalic
862fc91b2c LibWeb: Implement HTMLImageElement::decode with a few FIXMEs
Implements enough of HTMLImageElement::decode for it to not break
websites and actually load an image :)
2024-06-06 08:20:02 +02:00
Andrew Kaster
7b67fa706f DOM: Check for navigable destruction in declarative refresh timer
If the Document's navigable has been destroyed since we started this
timer, or it's no longer the active document of its navigable, we
shouldn't navigate to it.
2024-06-06 08:13:34 +02:00
Nathan E. Egge
b040e5c12b LibTimeZone: Remove AK_OS_SERENITY ifdef
Remove special case for SerenityOS as fallback will still work.
2024-06-05 22:23:15 -04:00
Nathan E. Egge
d83ab035ee LibTimeZone: Read /etc/timezone for current TZ
Fallback to reading /etc/timezone by calling system_time_zone() when
unable determine time zone from /etc/localtime.
This works on systems where /etc/localtime is a file and not a symlink.

Fixes #65
2024-06-05 22:23:15 -04:00
Daniel Bertalan
376b956214 Tests: Stop invoking UB in AK::NeverDestroyed's tests
Instead of attempting a stack use-after-free by reading an out-of-scope
object's data member, let's keep a flag that checks if the destructor
had been called in the outer scope.

Fixes #64
2024-06-05 17:19:14 -06:00
Timothy Flynn
8641e78cdc Meta: Copy resources to the app bundle during create_ladybird_bundle()
For some reason, moving the UI-specific CMake to its own files prevents
resource files from being copied to the Resource directory in the macOS
application. I'm not sure what the difference here is, but doing this
step during create_ladybird_bundle() works.
2024-06-05 14:40:02 -06:00
Tim Ledbetter
c79041344d LibWeb: Ensure anchor node is not null when extending selection
Previously, clicking while holding shift without having previously made
any text selection would cause a crash.
2024-06-05 13:57:01 -04:00
Andrew Kaster
354b0062fa CMake: Simplify WebContent CMakeLists to always create a static lib 2024-06-05 13:56:46 -04:00
Andrew Kaster
47d6a263d8 CMake: Move ladybird target creation to UI-specific CMakeLists 2024-06-05 13:56:46 -04:00
xnacly
f0aa378dab Documentation: Remove links to outdated guides 2024-06-05 13:05:30 -04:00
Davide Cavalca
9af91eb622 Meta: ENABLE_NETWORK_DOWNLOADS for ca_certificates and public_suffix 2024-06-05 13:03:31 -04:00
Andrew Kaster
f234429392 Documentation: Update Build instructions for new and removed features
Removed options, the fact that the CMakePresests.json exists, etc.
2024-06-05 12:23:54 -04:00
Andrew Kaster
90af26e309 Meta+CMake: Remove unused CMake functions and features
Goodbye, serenity_components and Jakt.
2024-06-05 12:23:54 -04:00
Andrew Kaster
ec6072e7cd Meta: Uncouple ladybird.sh run from a specific CMake configuration 2024-06-05 12:21:59 -04:00
Nathan E. Egge
e62f0a8da3 Meta: Remove dependency on sudo, doas or pls 2024-06-05 12:04:11 -04:00
Tim Ledbetter
f721230456 LibWeb: Extend text selection when left clicking and holding shift 2024-06-05 11:51:41 -04:00
Andreas Kling
f42c18bc4c LibGfx: Make Painter::target() return a Bitmap&
Painter always has a target bitmap, so let's return a reference.
2024-06-05 15:37:05 +02:00
Andreas Kling
a1a59ec3ab LibGfx: Remove unused Painter::draw_text() overloads 2024-06-05 15:37:05 +02:00
Andreas Kling
2f23912a55 LibGfx: Remove unused cruft from Painter.h 2024-06-05 15:37:05 +02:00
Andreas Kling
fe4cc32380 Everywhere: Include <LibGfx/Painter.h> in fewer places
Touching Painter.h now rebuilds ~40 files instead of ~300.
2024-06-05 15:37:05 +02:00
Andreas Kling
0e47e5e265 LibGfx: Move Gfx::Painter::LineStyle => Gfx::LineStyle 2024-06-05 15:37:05 +02:00