1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 07:55:07 +00:00

WebContent: Notify client when web content selection changes

The WebContentView widgets reacts to this by requesting a repaint.
This commit is contained in:
Andreas Kling 2020-07-04 20:57:57 +02:00
parent 8476e3933b
commit a4b5350aff
7 changed files with 27 additions and 0 deletions

View file

@ -87,6 +87,16 @@ void WebContentView::notify_server_did_paint(Badge<WebContentClient>, i32 shbuf_
void WebContentView::notify_server_did_invalidate_content_rect(Badge<WebContentClient>, const Gfx::IntRect& content_rect)
{
dbg() << "server did invalidate content_rect: " << content_rect << ", current shbuf_id=" << m_bitmap->shbuf_id();
request_repaint();
}
void WebContentView::notify_server_did_change_selection(Badge<WebContentClient>)
{
request_repaint();
}
void WebContentView::request_repaint()
{
client().post_message(Messages::WebContentServer::Paint(m_bitmap->rect(), m_bitmap->shbuf_id()));
}