From 3af63bc5a320674094cadd90814534ebca1c6d82 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Sat, 15 Mar 2025 17:20:05 -0400 Subject: [PATCH] Everywhere: Replace miscellaneous references to the chrome process --- Documentation/BuildInstructionsLadybird.md | 18 +++++++++--------- Documentation/Porting.md | 18 +++++++++--------- Documentation/Troubleshooting.md | 18 +++++++++++------- Libraries/LibWeb/Clipboard/Clipboard.cpp | 2 +- Libraries/LibWeb/HTML/HTMLAnchorElement.cpp | 2 +- Libraries/LibWebView/Application.cpp | 2 +- Libraries/LibWebView/SourceHighlighter.cpp | 2 +- Meta/gn/secondary/Ladybird/enable_appkit.gni | 2 +- Meta/gn/secondary/Ladybird/enable_qt.gni | 2 +- Services/WebWorker/ConnectionFromClient.cpp | 2 +- 10 files changed, 36 insertions(+), 32 deletions(-) diff --git a/Documentation/BuildInstructionsLadybird.md b/Documentation/BuildInstructionsLadybird.md index 5c8a15ec64f..57134c01c14 100644 --- a/Documentation/BuildInstructionsLadybird.md +++ b/Documentation/BuildInstructionsLadybird.md @@ -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 diff --git a/Documentation/Porting.md b/Documentation/Porting.md index 66ac293a204..183d6df1e1e 100644 --- a/Documentation/Porting.md +++ b/Documentation/Porting.md @@ -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 diff --git a/Documentation/Troubleshooting.md b/Documentation/Troubleshooting.md index 8b56b577583..096e718a645 100644 --- a/Documentation/Troubleshooting.md +++ b/Documentation/Troubleshooting.md @@ -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 that’s not the case. Instead, despite that, you’ll 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 that’s not the case. Instead, despite that, you’ll be able to build successfully with the Qt UI. diff --git a/Libraries/LibWeb/Clipboard/Clipboard.cpp b/Libraries/LibWeb/Clipboard/Clipboard.cpp index 03dba42c883..917e66cacab 100644 --- a/Libraries/LibWeb/Clipboard/Clipboard.cpp +++ b/Libraries/LibWeb/Clipboard/Clipboard.cpp @@ -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. diff --git a/Libraries/LibWeb/HTML/HTMLAnchorElement.cpp b/Libraries/LibWeb/HTML/HTMLAnchorElement.cpp index 8eb6ca51b21..e7f981aa243 100644 --- a/Libraries/LibWeb/HTML/HTMLAnchorElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLAnchorElement.cpp @@ -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(event)) { auto const& mouse_event = static_cast(event); if (mouse_event.platform_ctrl_key()) diff --git a/Libraries/LibWebView/Application.cpp b/Libraries/LibWebView/Application.cpp index 1b0508c2aac..94ffe6521ff 100644 --- a/Libraries/LibWebView/Application.cpp +++ b/Libraries/LibWebView/Application.cpp @@ -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"); diff --git a/Libraries/LibWebView/SourceHighlighter.cpp b/Libraries/LibWebView/SourceHighlighter.cpp index 1f24dc7c226..f4c810486eb 100644 --- a/Libraries/LibWebView/SourceHighlighter.cpp +++ b/Libraries/LibWebView/SourceHighlighter.cpp @@ -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 }; diff --git a/Meta/gn/secondary/Ladybird/enable_appkit.gni b/Meta/gn/secondary/Ladybird/enable_appkit.gni index 43ea2986339..8b615c5eb2f 100644 --- a/Meta/gn/secondary/Ladybird/enable_appkit.gni +++ b/Meta/gn/secondary/Ladybird/enable_appkit.gni @@ -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" } diff --git a/Meta/gn/secondary/Ladybird/enable_qt.gni b/Meta/gn/secondary/Ladybird/enable_qt.gni index f88108a8010..b4c5da559e0 100644 --- a/Meta/gn/secondary/Ladybird/enable_qt.gni +++ b/Meta/gn/secondary/Ladybird/enable_qt.gni @@ -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" } diff --git a/Services/WebWorker/ConnectionFromClient.cpp b/Services/WebWorker/ConnectionFromClient.cpp index 3f2d6e09ff2..cc907790d9e 100644 --- a/Services/WebWorker/ConnectionFromClient.cpp +++ b/Services/WebWorker/ConnectionFromClient.cpp @@ -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;