Everywhere: Replace miscellaneous references to the chrome process

This commit is contained in:
Timothy Flynn 2025-03-15 17:20:05 -04:00 committed by Tim Flynn
parent d94bb99c50
commit 3af63bc5a3
Notes: github-actions[bot] 2025-03-15 23:58:25 +00:00
10 changed files with 36 additions and 32 deletions

View file

@ -148,7 +148,7 @@ If you wish to use clang from homebrew instead:
brew install llvm@19
```
If you also plan to use the Qt chrome on macOS:
If you also plan to use the Qt UI on macOS:
```
brew install qt
```
@ -236,22 +236,22 @@ BUILD_PRESET=Debug ./Meta/ladybird.sh run ladybird
Note that debug symbols are available in both Release and Debug builds.
### The chromes
### The User Interfaces
Ladybird will be built with one of the following browser chromes (graphical frontends), depending on the platform:
* [AppKit](https://developer.apple.com/documentation/appkit?language=objc) - The native chrome on macOS.
* [Qt](https://doc.qt.io/qt-6/) - The chrome used on all other platforms.
* [Android UI](https://developer.android.com/develop/ui) - The native chrome on Android.
Ladybird will be built with one of the following browser frontends, depending on the platform:
* [AppKit](https://developer.apple.com/documentation/appkit?language=objc) - The native UI on macOS.
* [Qt](https://doc.qt.io/qt-6/) - The UI used on all other platforms.
* [Android UI](https://developer.android.com/develop/ui) - The native UI on Android.
The Qt chrome is available on platforms where it is not the default as well (except on Android). To build the
Qt chrome, install the Qt dependencies for your platform, and enable the Qt chrome via CMake:
The Qt UI is available on platforms where it is not the default as well (except on Android). To build the
Qt UI, install the Qt dependencies for your platform, and enable the Qt UI via CMake:
```bash
# From /path/to/ladybird
cmake --preset default -DENABLE_QT=ON
```
To re-disable the Qt chrome, run the above command with `-DENABLE_QT=OFF`.
To re-disable the Qt UI, run the above command with `-DENABLE_QT=OFF`.
### Build error messages you may encounter

View file

@ -7,15 +7,15 @@ be accepted into the mainline repository.
There are two types of ports that can be made to Ladybird:
- Chrome port: We define the "browser chrome" as the UI layer. This includes the browser window, tabs, address bar, etc.
- UI port: We define the "browser frontend" as the UI layer. This includes the browser window, tabs, address bar, etc.
- Platform port: This includes the underlying platform-specific code that interacts with the OS. This includes things like
file I/O, networking, and process management.
### Chrome Ports
### UI Ports
There are currently three supported chrome ports:
There are currently three supported UI ports:
- Qt6: The generic chrome port.
- Qt6: The generic UI port.
- AppKit/Cocoa: The macOS native port, which uses the AppKit framework.
- Headless: A headless port that does not have a UI, used for testing.
@ -38,15 +38,15 @@ There is currently one in progress platform port:
## Porting Steps
### Chrome ports
### UI ports
Chrome ports mostly concern themselves with the UI layer. This means the main Ladybird process, using LibWebView.
UI ports mostly concern themselves with the UI layer. This means the main Ladybird process, using LibWebView.
To create a new Ladybird chrome, you will need to implement a new `WebView::ViewImplementation` subclass.
To create a new Ladybird UI, you will need to implement a new `WebView::ViewImplementation` subclass.
ViewImplementation is the main interface between the UI process and WebContent processes. It is expected that each tab
of the browser will have its own WebContent process. This is all managed by the WebView layer.
Each chrome must also subclass `WebView::Application` to add any chrome-specific command-line flags.
Each UI port must also subclass `WebView::Application` to add any UI-specific command-line flags.
TODO: Explain any more details that are necessary
@ -56,7 +56,7 @@ Platform ports concern themselves with the underlying OS-specific code. In Ladyb
the AK and LibCore libraries.
AK is the standard template library for Ladybird. The first step of a new platform port is a new platform define in
`AK/Platform.h`. This define will be used to conditionally compile platform-specific code.
`AK/Platform.h`. This define will be used to conditionally compile platform-specific code.
In AK, the most likely class to need platform-specific code is `AK::StackInfo`.
LibCore is an abstraction over POSIX. It contains classes to wrap lower level OS functionality into APIs that are

View file

@ -32,16 +32,20 @@ CipherString = DEFAULT@SECLEVEL=1
Options = UnsafeLegacyRenegotiation
```
### “Targets may link only to libraries. CMake is dropping the item” message (when building with the Qt chrome on macOS)
### “Targets may link only to libraries. CMake is dropping the item” message (when building with the Qt UI on macOS)
When building with the Qt chrome on macOS, you may encounter the following message:
When building with the Qt UI on macOS, you may encounter the following message:
> CMake Warning at /opt/homebrew/Cellar/qt/6.7.0_1/lib/cmake/Qt6/FindWrapOpenGL.cmake:48 (target_link_libraries):
> Target "ladybird" requests linking to directory "/usr/X11R6/lib". Targets
> may link only to libraries. CMake is dropping the item.
```
CMake Warning at /opt/homebrew/Cellar/qt/6.7.0_1/lib/cmake/Qt6/FindWrapOpenGL.cmake:48 (target_link_libraries):
Target "ladybird" requests linking to directory "/usr/X11R6/lib". Targets
may link only to libraries. CMake is dropping the item.
```
…followed by 14-line stack trace, the top of which is this:
> Build/vcpkg/scripts/buildsystems/vcpkg.cmake:859 (_find_package)
```
Build/vcpkg/scripts/buildsystems/vcpkg.cmake:859 (_find_package)
```
…and all of it shown in bright yellow, making you think it must be important and something must need to be fixed. But thats not the case. Instead, despite that, youll be able to build successfully with the Qt chrome.
…and all of it shown in bright yellow, making you think it must be important and something must need to be fixed. But thats not the case. Instead, despite that, youll be able to build successfully with the Qt UI.

View file

@ -42,7 +42,7 @@ void Clipboard::initialize(JS::Realm& realm)
// https://w3c.github.io/clipboard-apis/#os-specific-well-known-format
static StringView os_specific_well_known_format(StringView mime_type_string)
{
// NOTE: Here we always takes the Linux case, and defer to the chrome layer to handle OS specific implementations.
// NOTE: Here we always takes the Linux case, and defer to the browser process to handle OS specific implementations.
auto mime_type = MimeSniff::MimeType::parse(mime_type_string);
// 1. Let wellKnownFormat be an empty string.

View file

@ -82,7 +82,7 @@ void HTMLAnchorElement::activation_behavior(Web::DOM::Event const& event)
return;
// AD-HOC: Do not activate the element for clicks with the ctrl/cmd modifier present. This lets
// the chrome open the link in a new tab.
// the browser process open the link in a new tab.
if (is<UIEvents::MouseEvent>(event)) {
auto const& mouse_event = static_cast<UIEvents::MouseEvent const&>(event);
if (mouse_event.platform_ctrl_key())

View file

@ -94,7 +94,7 @@ void Application::initialize(Main::Arguments const& arguments, URL::URL new_tab_
args_parser.add_positional_argument(raw_urls, "URLs to open", "url", Core::ArgsParser::Required::No);
args_parser.add_option(certificates, "Path to a certificate file", "certificate", 'C', "certificate");
args_parser.add_option(new_window, "Force opening in a new window", "new-window", 'n');
args_parser.add_option(force_new_process, "Force creation of new browser/chrome process", "force-new-process");
args_parser.add_option(force_new_process, "Force creation of a new browser process", "force-new-process");
args_parser.add_option(allow_popups, "Disable popup blocking by default", "allow-popups");
args_parser.add_option(disable_scripting, "Disable scripting by default", "disable-scripting");
args_parser.add_option(disable_sql_database, "Disable SQL database", "disable-sql-database");

View file

@ -72,7 +72,7 @@ SourceHighlighterClient::SourceHighlighterClient(String const& source, Syntax::L
: m_document(SourceDocument::create(source))
{
// HACK: Syntax highlighters require a palette, but we don't actually care about the output styling, only the type of token for each span.
// Also, getting a palette from the chrome is nontrivial. So, create a dummy blank one and use that.
// Also, getting a palette from the UI is nontrivial. So, create a dummy blank one and use that.
auto buffer = MUST(Core::AnonymousBuffer::create_with_size(sizeof(Gfx::SystemTheme)));
auto palette_impl = Gfx::PaletteImpl::create_with_anonymous_buffer(buffer);
Gfx::Palette dummy_palette { palette_impl };

View file

@ -1,4 +1,4 @@
declare_args() {
# Build the Ladybird application using the AppKit chrome.
# Build the Ladybird application using the AppKit UI.
enable_appkit = current_os == "mac"
}

View file

@ -1,4 +1,4 @@
declare_args() {
# Build the Ladybird application using the Qt chrome.
# Build the Ladybird application using the Qt UI.
enable_qt = current_os != "mac"
}

View file

@ -30,7 +30,7 @@ void ConnectionFromClient::die()
void ConnectionFromClient::request_file(Web::FileRequest request)
{
// FIXME: Route this to FSAS or Brower chrome as appropriate instead of allowing
// FIXME: Route this to FSAS or browser process as appropriate instead of allowing
// the WebWorker process filesystem access
auto path = request.path();
auto request_id = ++last_id;