From f0ba53609539909a9b8e5c324b01f046cb603d90 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Thu, 8 Oct 2020 21:32:22 +0100 Subject: [PATCH] html: Replace InProcessWebView with OutOfProcessWebView --- Userland/html.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Userland/html.cpp b/Userland/html.cpp index a72de4bcde..c451957c3a 100644 --- a/Userland/html.cpp +++ b/Userland/html.cpp @@ -32,7 +32,8 @@ #include #include #include -#include +#include +#include #include int main(int argc, char** argv) @@ -57,12 +58,12 @@ int main(int argc, char** argv) auto html = f->read_all(); auto window = GUI::Window::construct(); - auto& widget = window->set_main_widget(); + window->set_title("HTML"); + auto& widget = window->set_main_widget(); + widget.on_title_change = [&](auto& title) { + window->set_title(String::formatted("{} - HTML", title)); + }; widget.load_html(html, url); - if (!widget.document()->title().is_null()) - window->set_title(String::format("%s - HTML", widget.document()->title().characters())); - else - window->set_title("HTML"); window->show(); auto menubar = GUI::MenuBar::construct();