1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 22:28:12 +00:00

LibWeb: Port the WebContent service to Core::AnonymousBuffer for themes

This commit is contained in:
Andreas Kling 2021-01-16 17:22:35 +01:00
parent 04f95f9160
commit d846808122
4 changed files with 7 additions and 12 deletions

View file

@ -73,13 +73,8 @@ OwnPtr<Messages::WebContentServer::GreetResponse> ClientConnection::handle(const
void ClientConnection::handle(const Messages::WebContentServer::UpdateSystemTheme& message)
{
auto shared_buffer = SharedBuffer::create_from_shbuf_id(message.shbuf_id());
if (!shared_buffer) {
dbgln("WebContentServer::UpdateSystemTheme: SharedBuffer already gone! Ignoring :^)");
return;
}
Gfx::set_system_theme(*shared_buffer);
auto impl = Gfx::PaletteImpl::create_with_shared_buffer(*shared_buffer);
Gfx::set_system_theme(message.theme_buffer());
auto impl = Gfx::PaletteImpl::create_with_anonymous_buffer(message.theme_buffer());
m_page_host->set_palette_impl(*impl);
}