Commit graph

971 commits

Author SHA1 Message Date
Aliaksandr Kalenik
3627329bed Everywhere: Use Skia painter by default
Skia painter is visibly faster than LibGfx painter and has more complete
CSS transforms support. With this change:
- On Linux, it will try to use Vulkan-backend with fallback to
  CPU-backend
- On macOS it will try to use Metal-backend with fallback to
  CPU-backend
- headless-browser always runs with CPU-backend in layout mode
2024-07-21 10:36:17 +02:00
Andrew Kaster
0384b484bd Ladybird: Set Mach port server namespace to ladybird.org 2024-07-20 23:03:45 +02:00
Andrew Kaster
faa6022ced Ladybird: Switch macOS plist information to use ladybird.org 2024-07-20 23:03:45 +02:00
Andrew Kaster
349a3ceec5 Ladybird/AppKit: Remove system header workarounds for global names 2024-07-18 09:43:38 +01:00
Andrew Kaster
5ace53c96f Ladybird/Qt: Prefix AK::Duration with AK Namespace 2024-07-18 09:43:38 +01:00
Daniel Bertalan
c62240aa80 Everywhere: Warn on function definitions without prototypes
If no header includes the prototype of a function, then it cannot be
used from outside the translation unit it was defined in. In that case,
it should be marked as `static`, in order to avoid possible ODR
problems, unnecessary exported symbols, and allow the compiler to better
optimize those.

If this warning triggers in a function defined in a header, `inline`
needs to be added, otherwise if the header is included in more than one
TU, it will fail to link with a duplicate definition error.

The reason this diff got so big is that Lagom-only code wasn't built
with this flag even in Serenity times.
2024-07-17 21:51:29 +02:00
circl
be147ae122 WebContent: Load {allow,block}lists from Ladybird's config directory 2024-07-17 09:57:46 -06:00
circl
b61b1374f0 UI: Copy the default config to the user's config directory
Currently only used on the Qt chrome.
2024-07-17 09:57:46 -06:00
circl
5da1dae67e UI/Qt: Use the IniFormat for QSettings
This means that the settings will receive their own directory on all
platforms
2024-07-17 09:57:46 -06:00
circl
a443f50807 Base: Move config files out of home/anon and into default-config 2024-07-17 09:57:46 -06:00
Aliaksandr Kalenik
3ddacaa705 Ladybird+LibWeb+WebContent: Always use Skia CPU backend in tests mode
Enforce the use of the CPU backend in test mode to ensure that ref-tests
produce consistent results across different computers, as this
consistency cannot be achieved with the GPU backend.
2024-07-17 17:58:53 +03:00
circl
73e0dc1eec UI/Qt: Update icon to the new logo 2024-07-15 09:04:46 -06:00
Jamie Mansfield
7abf47f4bf Ladybird/Qt: Only update navigation buttons for current tab
This resolves a bug where if you opened a link in a new tab and quickly
went back to the original, the navigation buttons would update for the
new page shortly after.
2024-07-13 16:44:42 +03:00
Andrew Kaster
33746b7998 Android: Strip .gz suffix from ladybird-assets.tar
This is required to launch the app for me with Android Studio Koala.
2024-07-11 09:17:21 -06:00
Andrew Kaster
045bc3ffd6 Android: Pass new Lagom Tool install options to BuildLagomTools.sh 2024-07-11 09:17:21 -06:00
Sebastian Zaha
7604d15b99 UI/AppKit: Port --force-new-process option from Qt chrome 2024-07-10 11:03:47 -06:00
Sebastian Zaha
946ccfc108 UI/AppKit: Port --allow-popups option from Qt chrome
WebDriver requires this option to be present in order to run the WPT
tests.
2024-07-10 11:03:47 -06:00
Tim Ledbetter
11039085d0 UI/Qt: Pass WebContentOptions to TaskManagerWindow constructor
Previously, the browser would crash when opening a task manager window
with the `--enable-qt-networking` flag set because we were passing the
default WebContentOptions to the underlying WebContentView.
2024-07-10 16:29:27 +02:00
Tim Ledbetter
28b95e8ed0 WebContent+WebWorker: Use custom certificate paths with Qt networking
This change adds a `--certificate` option to both WebContent and
WebWorker, which allows one or more custom root certificate paths to be
specified. Certificates are then loaded from these paths when Qt
networking is used.

This allows WPT tests that require a https connection to be run locally
with Qt networking.
2024-07-10 16:29:27 +02:00
Andrew Kaster
5d8784318d LibWeb: Initialize HTML::EventLoop with its type 2024-07-10 07:04:53 +02:00
Jamie Mansfield
98e1ae49f5 Ladybird/AppKit: Add actions to set navigator compatibility mode 2024-07-09 14:44:38 -04:00
Jamie Mansfield
21c5373456 Base: Support dark mode in version page 2024-07-09 11:21:07 +02:00
Jamie Mansfield
fe551d3eff Base: Update to new project logo
This removes the existing 16x16 and 32x32 app icons with 48x48 and
128x128 versions, as the new logo is not well suited to such small
resolutions.
2024-07-09 11:21:07 +02:00
Tim Ledbetter
4ed46adeee UI/Qt: Set a minimum size policy for the navigation control toolbar
This prevents the user being able to shrink the window to the point
that the location bar and other controls are no longer visible.
2024-07-09 08:14:43 +02:00
Alex Studer
e6432041b2 Android: Pass touch events through as mouse events
This is probably not the best way of handling touch events, but at least
it allows the user to actually interact with the page!
2024-07-07 09:45:54 -06:00
Alex Studer
feb7c0d950 Android: Change container from SwipeRefreshLayout to FrameLayout
We were not doing anything with the SwipeRefreshLayout, and it
interfered with touch events. We may want to bring this back at some
point? But probably only after we handle Android scrolling correctly.
2024-07-07 09:45:54 -06:00
Alex Studer
86d27d180b Android: Add ladybird folder to copied resource assets
This fixes the about scheme pages (about:version etc.) and directory
listings.
2024-07-07 09:42:47 -06:00
Olekoop
76a4f841b5 Android: Download vcpkg when building Lagom tools 2024-07-07 03:43:32 -06:00
Olekoop
71e1f724f6 Android: Use ALooper_pollOnce instead of ALooper_pollAll
ALooper_pollAll is deprecated and it will be removed in NDK r27
2024-07-07 03:43:32 -06:00
Olekoop
4f05365c4e Android: Detach file descriptor from ParcelFileDescriptor
This fixes a warning in logcat "A resource failed to call close."
2024-07-07 03:43:32 -06:00
Ali Mohammad Pur
e0465b8939 Revert "LibTLS+Everywhere: Switch to using WolfSSL"
This reverts commit 8bb610b97a.
Linking wolfSSL seems to cause more legal trouble than it's worth due to
it being GPLv2, so let's undo this for now.
2024-07-06 15:15:34 -06:00
Tim Ledbetter
8867146327 WebWorker: Allow the WebWorker process to optionally use Qt networking
This change adds a `--use-lagom-networking` flag to the WebWorker
process. Qt networking is used if this flag isn't passed. The flag is
passed the UI launches the WebWorker process unless the Qt chrome is
being run with the `--enable-qt-networking` flag.
2024-07-06 14:50:26 -06:00
Tim Ledbetter
ff2123a949 WebDriver: Add option to use Qt networking
Using Qt networking when running web platform tests improves
performance significantly. The time to run the subset of tests we run
on CI drops from 21.9 seconds to 8.2 seconds on my machine.
2024-07-06 14:50:26 -06:00
Ali Mohammad Pur
8bb610b97a LibTLS+Everywhere: Switch to using WolfSSL
This commit replaces all TLS connection code with wolfssl.
The certificate parsing code has to remain for now, as wolfssl does not
seem to have any exposed API for that.
2024-07-06 22:15:19 +02:00
simonkrauter
82915e1914 Ladybird/Qt: Apply selected color scheme for new tabs
Previously, new tabs always had the `auto` color scheme, regardless of
what the user has selected before.
Replace the 3 individual slots with a `set_preferred_color_scheme`
method.
2024-07-06 20:32:33 +01:00
Alex Studer
4d97b29866 Android: Create a WebView::Application object to placate LibWebView
LibWebView uses the Application object in WebContentClient.cpp, so we
need one to exist. It doesn't really do anything, since we never add
processes to it, but it just has to exist.
2024-07-05 14:27:25 -06:00
Alex Studer
e02efed2e5 Android: Update signature of Gfx::Bitmap::create_wrapper
This adjusts the Android code to match the changes made in commit
6a96920dbc.
2024-07-05 14:27:25 -06:00
Alex Studer
9d192ed52e WebContent: Mark include directories as BUILD_INTERFACE
We can't have these as INSTALL_INTERFACE because they're located in the
source directory.
2024-07-05 14:27:25 -06:00
Alex Studer
cdd91f4b48 Ladybird+LibCore+Meta: Update font paths and names for Android
We also disable fontconfig, because it doesn't have support for Android.
2024-07-05 14:27:25 -06:00
Alex Studer
9a9ba4d207 Android: Create ImageDecoderClient for ImageCodecPlugin
This adjusts for changes to the constructor of ImageCodecPlugin.
2024-07-05 14:27:25 -06:00
Alex Studer
ebc92dee93 Android: Provide viewport_size instead of viewport_rect
This updates the Android WebViewImplementationNative to match changes
made in commit 5285e22f2a.

We remove the async_set_viewport_rect call because the parent
ViewImplementation::handle_resize call does that for us.
2024-07-05 14:27:25 -06:00
Alex Studer
85a92fb4d7 Android: Update C++ standard flag
The current version of the Android NDK uses Clang 17, which uses the
name c++2b instead of c++23.

This is the same flag we use in Meta/gn/build/BUILD.gn for macOS.
2024-07-05 14:27:25 -06:00
Alex Studer
d1788a7a02 Android: Update various file paths in CMake
It looks like some things have moved around since the last time the
Android build worked. So, update the incorrect paths to point to where
they should.
2024-07-05 14:27:25 -06:00
Alex Studer
1d0de0b450 Android: Integrate vcpkg with Gradle build
This ensures that vcpkg downloads and builds all dependencies for
Android. We add it as a CMAKE_TOOLCHAIN_FILE that then chainloads the
Android NDK's toolchain file, as per the vcpkg documentation.
2024-07-05 14:27:25 -06:00
Jamie Mansfield
197f57f5d2 Ladybird/Qt: Add actions to set navigator compatibility mode 2024-07-05 07:14:03 +02:00
Jamie Mansfield
e34254298a Ladybird/Qt: Add setting for sending DNT header 2024-07-04 16:42:34 +02:00
Aliaksandr Kalenik
830b287c46 Everywhere: Remove GPU painter and AccelGfx
GPU painter that uses AccelGfx is slower and way less complete compared
to both default Gfx::Painter and Skia painter. It does not make much
sense to keep it, considering Skia painter already uses Metal backend on
macOS by default and there is an option to enable GPU-accelerated
backend on linux.
2024-07-04 14:47:02 +02:00
circl
ceb9c3b797 LibWeb+UI: Add tooltip overriding and use it for <video> tags
This call is used to inform the chrome that it should display a tooltip
now and avoid any hovering timers. This is used by <video> tags to
display the volume percentage when it is changed.
2024-07-04 14:15:51 +02:00
circl
0f7623dd83 LibWeb+UI/Qt: Display 'title' tooltips only when the mouse stops moving
Now instead of sending the position in which the user entered the
tooltip area, send just the text, and let the chrome figure out how to
display it.

In the case of Qt, wait for 600 milliseconds of no mouse movement, then
display it under the mouse cursor.
2024-07-04 14:15:51 +02:00
Timothy Flynn
bdb24f950e Revert "Ladybird: Load about:blank when opening a new tab"
This reverts commit 722a669b22.
2024-07-04 11:55:45 +02:00