mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:48:11 +00:00
LibWeb: Don't send OOPWV repaint requests for views without backing
This fixes an assertion in TextEditor when changing the system theme, since that would trigger a repaint request for the HTML preview widget which may not have backing unless it's actually been used to perform HTML (or Markdown) preview yet.
This commit is contained in:
parent
950c999d3a
commit
bf1ed34236
1 changed files with 4 additions and 0 deletions
|
@ -214,6 +214,10 @@ void OutOfProcessWebView::did_scroll()
|
||||||
|
|
||||||
void OutOfProcessWebView::request_repaint()
|
void OutOfProcessWebView::request_repaint()
|
||||||
{
|
{
|
||||||
|
// If this widget was instantiated but not yet added to a window,
|
||||||
|
// it won't have a back bitmap yet, so we can just skip repaint requests.
|
||||||
|
if (!m_back_bitmap)
|
||||||
|
return;
|
||||||
client().post_message(Messages::WebContentServer::Paint(m_back_bitmap->rect().translated(horizontal_scrollbar().value(), vertical_scrollbar().value()), m_back_bitmap->shbuf_id()));
|
client().post_message(Messages::WebContentServer::Paint(m_back_bitmap->rect().translated(horizontal_scrollbar().value(), vertical_scrollbar().value()), m_back_bitmap->shbuf_id()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue