mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:08:10 +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:
parent
2451a447f5
commit
26a7ea0e0f
14 changed files with 1313 additions and 795 deletions
|
@ -6,21 +6,35 @@
|
|||
|
||||
#include "BrowserWindow.h"
|
||||
#include "Settings.h"
|
||||
#include "SimpleWebView.h"
|
||||
#include "Utilities.h"
|
||||
#include "WebContentView.h"
|
||||
#include <AK/LexicalPath.h>
|
||||
#include <LibCore/ArgsParser.h>
|
||||
#include <LibCore/EventLoop.h>
|
||||
#include <LibCore/File.h>
|
||||
#include <LibCore/Timer.h>
|
||||
#include <LibGfx/Font/FontDatabase.h>
|
||||
#include <LibMain/Main.h>
|
||||
#include <QApplication>
|
||||
#include <QTimer>
|
||||
#include <QWidget>
|
||||
|
||||
extern void initialize_web_engine();
|
||||
Browser::Settings* s_settings;
|
||||
extern String s_serenity_resource_root;
|
||||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
QApplication app(arguments.argc, arguments.argv);
|
||||
platform_init();
|
||||
|
||||
initialize_web_engine();
|
||||
// NOTE: We only instantiate this to ensure that Gfx::FontDatabase has its default queries initialized.
|
||||
Gfx::FontDatabase::set_default_font_query("Katica 10 400 0");
|
||||
Gfx::FontDatabase::set_fixed_width_font_query("Csilla 10 400 0");
|
||||
|
||||
// NOTE: This is only used for the Core::Socket inside the IPC connections.
|
||||
// FIXME: Refactor things so we can get rid of this somehow.
|
||||
Core::EventLoop event_loop;
|
||||
|
||||
QApplication app(arguments.argc, arguments.argv);
|
||||
|
||||
String url;
|
||||
Core::ArgsParser args_parser;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue