1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 08:17:34 +00:00

LibWeb+WebContent: Make document background and Viewport transparent

This means iframes are transparent by default (as in firefox/chrome).

Painting the outermost canvas background is moved to the PageHost.
This commit is contained in:
Sigmund Lahn 2023-04-24 22:38:50 +02:00 committed by Andreas Kling
parent 5e7c838160
commit f2f14ad9bd
5 changed files with 9 additions and 9 deletions

View file

@ -116,9 +116,10 @@ void PageHost::paint(Web::DevicePixelRect const& content_rect, Gfx::Bitmap& targ
if (auto* document = page().top_level_browsing_context().active_document())
document->update_layout();
painter.fill_rect(bitmap_rect, palette().base());
auto* layout_root = this->layout_root();
if (!layout_root) {
painter.fill_rect(bitmap_rect, palette().base());
return;
}