LibWeb: Add OutOfProcessWebView::load_empty_document()

This is cheating a little bit as we don't set the document to a nullptr
as in InProcessWebView, but the observable outcome is the same. :^)
This commit is contained in:
Linus Groh 2020-10-08 21:58:00 +01:00 committed by Andreas Kling
parent b797de3adf
commit 95a6019ff0
Notes: sideshowbarker 2024-07-19 01:57:53 +09:00
2 changed files with 7 additions and 0 deletions

View File

@ -60,6 +60,12 @@ void OutOfProcessWebView::load_html(const StringView& html, const URL& url)
client().post_message(Messages::WebContentServer::LoadHTML(html, url));
}
void OutOfProcessWebView::load_empty_document()
{
m_url = {};
client().post_message(Messages::WebContentServer::LoadHTML("", {}));
}
void OutOfProcessWebView::paint_event(GUI::PaintEvent& event)
{
GUI::ScrollableWidget::paint_event(event);

View File

@ -47,6 +47,7 @@ public:
void load(const URL&);
void load_html(const StringView&, const URL&);
void load_empty_document();
void notify_server_did_layout(Badge<WebContentClient>, const Gfx::IntSize& content_size);
void notify_server_did_paint(Badge<WebContentClient>, i32 shbuf_id);