mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:57:35 +00:00
LibWeb: Add OutOfProcessWebView::load_html()
This commit is contained in:
parent
216ccaf805
commit
e40135fefd
7 changed files with 25 additions and 0 deletions
|
@ -52,6 +52,12 @@ void OutOfProcessWebView::load(const URL& url)
|
|||
client().post_message(Messages::WebContentServer::LoadURL(url));
|
||||
}
|
||||
|
||||
void OutOfProcessWebView::load_html(const StringView& html, const URL& url)
|
||||
{
|
||||
m_url = url;
|
||||
client().post_message(Messages::WebContentServer::LoadHTML(html, url));
|
||||
}
|
||||
|
||||
void OutOfProcessWebView::paint_event(GUI::PaintEvent& event)
|
||||
{
|
||||
GUI::ScrollableWidget::paint_event(event);
|
||||
|
|
|
@ -46,6 +46,8 @@ public:
|
|||
URL url() const { return m_url; }
|
||||
void load(const URL&);
|
||||
|
||||
void load_html(const StringView&, const URL&);
|
||||
|
||||
void notify_server_did_layout(Badge<WebContentClient>, const Gfx::IntSize& content_size);
|
||||
void notify_server_did_paint(Badge<WebContentClient>, i32 shbuf_id);
|
||||
void notify_server_did_invalidate_content_rect(Badge<WebContentClient>, const Gfx::IntRect&);
|
||||
|
|
|
@ -62,6 +62,11 @@ void Page::load(const LoadRequest& request)
|
|||
main_frame().loader().load(request, FrameLoader::Type::Navigation);
|
||||
}
|
||||
|
||||
void Page::load_html(const StringView& html, const URL& url)
|
||||
{
|
||||
main_frame().loader().load_html(html, url);
|
||||
}
|
||||
|
||||
Gfx::Palette Page::palette() const
|
||||
{
|
||||
return m_client.palette();
|
||||
|
|
|
@ -62,6 +62,8 @@ public:
|
|||
void load(const URL&);
|
||||
void load(const LoadRequest&);
|
||||
|
||||
void load_html(const StringView&, const URL&);
|
||||
|
||||
bool handle_mouseup(const Gfx::IntPoint&, unsigned button, unsigned modifiers);
|
||||
bool handle_mousedown(const Gfx::IntPoint&, unsigned button, unsigned modifiers);
|
||||
bool handle_mousemove(const Gfx::IntPoint&, unsigned buttons, unsigned modifiers);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue