Commit graph

990 commits

Author SHA1 Message Date
Timothy Flynn
7106a7bd58 LibWebView+UI: Allow debugging any helper process
This removes the --debug-web-content flag, and replaces it with a
--debug-process=<process-name> flag. For example:

    ladybird --debug-process=WebContent
    ladybird --debug-process=RequestServer

This allows attaching gdb to any helper process.
2024-08-01 15:40:49 +02:00
Timothy Flynn
5f8d852dae LibWebView+UI: Migrate Ladybird's command line flags to LibWebView
Currently, if we want to add a new e.g. WebContent command line option,
we have to add it to all of Qt, AppKit, and headless-browser. (Or worse,
we only add it to one of these, and we have feature disparity).

To prevent this, this moves command line flags to WebView::Application.
The flags are assigned to ChromeOptions and WebContentOptions structs.
Each chrome can still add its platform-specific options; for example,
the Qt chrome has a flag to enable Qt networking.

There should be no behavior change here, other than that AppKit will now
support command line flags that were previously only supported by Qt.
2024-08-01 11:38:42 +02:00
Andrew Kaster
07d387af96 Meta: Create a common Swift settings flow 2024-07-30 18:38:02 -06:00
Andrew Kaster
7f8103da7a CMake: Move GenerateSwiftHeader.cmake to Meta/CMake 2024-07-30 18:38:02 -06:00
Andrew Kaster
cb7402bc69 Ladybird: Reformat AppKit UI Swift files 2024-07-30 18:38:02 -06:00
Bastiaan van der Plaat
b445b907a1 Ladybird: Update macOS app iconset 2024-07-30 12:38:44 +02:00
Sam Atkins
06484d0663 UI/Qt: Manually paint the tab-bar background where the "add" button was
The TabBar itself does not stretch the entire width of the TabWidget,
because it leaves space for the width of the new-tab button. So, we
manually tell Qt to paint the TabBar's background into the gap.

Fixes #768.
2024-07-29 12:02:02 +02:00
Sam Atkins
e17362ab79 UI/Qt: Make TabWidget responsible for new-tab button positioning
Makes use of the fact that QTabWidget automatically reserves space
for "corner widgets", and gives us the ability to override their
location with a custom style.

Also, determine the height of the new-tab button using the height of the
tab bar, instead of a hard-coded 32px which was too tall on MacOS.
2024-07-29 12:02:02 +02:00
Tim Ledbetter
2d95cc01dc UI/Qt: Don't save size and location of popup windows on exit 2024-07-28 00:54:50 +01:00
Tim Schumacher
cf6929fef3 Meta: Guard everything that installs headers with an option 2024-07-25 13:25:09 -06:00
Jamie Mansfield
132ab775d8 Ladybird/Qt: Add setting for preferred languages 2024-07-25 11:38:59 +01:00
Tim Ledbetter
a4b289ebac UI/Qt: Don't crash when launching Inspector with Qt networking enabled 2024-07-23 14:48:56 -04:00
Timothy Flynn
d58a8b5146 LibWebView+UI: Raise the chrome process open file limit
The default limit (at least on Linux) causes us to run out of file
descriptors at around 15 tabs. Increase this limit to 8k. This is a
rather arbitrary number, but matches the limit set by Chrome.
2024-07-23 09:04:42 +02:00
Jamie Mansfield
01ff3d4286 Ladybird/Qt: Add missing filters for TVG icons
Ladybird now uses the correct theme colours when hovering over icons.
2024-07-22 12:59:36 -04:00
Andrew Kaster
989b4ac127 CMake: Ensure that dependency targets are built before AppKit UI files 2024-07-22 09:31:22 -06:00
Olekoop
6b88e43b3b LibAudio: Implement PlaybackStream for Android using Oboe
https://github.com/google/oboe

There are many ways to implement audio for Android, however this is
the recommended way to do it.
2024-07-21 16:09:36 -06:00
lmutter
abddd0ac1b UI/Qt: Move New Tab button in tab bar 2024-07-21 16:04:12 -06:00
circl
3adfdd3257 UI: Rename s_serenity_resource_root to s_ladybird_resource_root 2024-07-21 15:59:25 -06:00
Andrew Kaster
68ce5f8290 Ladybird/AppKit: Port TaskManager window to Swift
This is just a direct port of the Objective-C++ code to Swift 6.
A future patch should probably update it to actually use SwiftUI.
2024-07-21 15:55:47 -06:00
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