From c9d55e3b80ebd97ce62d7c637f27e353e6a175fa Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 21 Jun 2020 22:04:26 +0200 Subject: [PATCH] Userland: Use Web::PageView::load_html() in the "html" utility --- Userland/html.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/Userland/html.cpp b/Userland/html.cpp index 27d90cd2b7a..0bc91ff5a4a 100644 --- a/Userland/html.cpp +++ b/Userland/html.cpp @@ -32,15 +32,7 @@ #include #include #include -#include -#include -#include #include -#include -#include -#include -#include -#include #include int main(int argc, char** argv) @@ -60,12 +52,11 @@ int main(int argc, char** argv) return 1; } - String html = String::copy(f->read_all()); - auto document = Web::parse_html_document(html); + auto html = f->read_all(); auto window = GUI::Window::construct(); auto& widget = window->set_main_widget(); - widget.set_document(document); + widget.load_html(html, URL()); if (!widget.document()->title().is_null()) window->set_title(String::format("%s - HTML", widget.document()->title().characters())); else