1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:27:46 +00:00

Ladybird: Render web content in a separate process :^)

This patch brings over the WebContent process over from SerenityOS
to Ladybird, along with a new WebContentView widget that renders
web content in a separate process.

There's a lot of jank and FIXME material here, notably I had to re-add
manually pumped Core::EventLoop instances on both sides, in order to get
the IPC protocol running. This introduces a lot of latency and we should
work towards replacing those loops with improved abstractions.

The WebContent process is built separately here (not part of Lagom) and
we provide our own main.cpp for it. Like everything, this can be better
architected, it's just a starting point. :^)
This commit is contained in:
Andreas Kling 2022-10-05 15:23:41 +02:00 committed by Andrew Kaster
parent 2451a447f5
commit 26a7ea0e0f
14 changed files with 1313 additions and 795 deletions

View file

@ -50,32 +50,26 @@ find_package(Qt6 REQUIRED COMPONENTS Core Widgets Network)
set(SOURCES
BrowserWindow.cpp
ConsoleClient.cpp
ConsoleGlobalObject.cpp
CookieJar.cpp
EventLoopPluginQt.cpp
FontPluginQt.cpp
ImageCodecPluginLadybird.cpp
ModelTranslator.cpp
PageClientLadybird.cpp
RequestManagerQt.cpp
main.cpp
WebContentView.cpp
History.cpp
ModelTranslator.cpp
Settings.cpp
SettingsDialog.cpp
SimpleWebView.cpp
Tab.cpp
TimerQt.cpp
Utilities.cpp
WebSocketClientManagerLadybird.cpp
WebSocketLadybird.cpp
main.cpp
)
qt_add_executable(ladybird ${SOURCES}
MANUAL_FINALIZATION
)
#target_link_libraries(ladybird PRIVATE Qt::Widgets Qt::Network LibWeb LibGUI LibWeb LibWebView LibGL LibSoftGPU LibMain)
target_link_libraries(ladybird PRIVATE Qt::Widgets Qt::Network LibWeb LibWebSocket LibGUI LibWebView LibGL LibSoftGPU LibMain)
target_include_directories(ladybird PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
target_include_directories(ladybird PRIVATE ${SERENITY_SOURCE_DIR}/Userland/Services/)
set_target_properties(ladybird PROPERTIES
MACOSX_BUNDLE_GUI_IDENTIFIER org.serenityos.ladybird
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
@ -104,3 +98,5 @@ qt_finalize_executable(ladybird)
if(NOT CMAKE_SKIP_INSTALL_RULES)
include(cmake/InstallRules.cmake)
endif()
add_subdirectory(WebContent)