mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibWeb: Separate layout tree rendering into phases
CSS defines a very specific paint order. This patch starts steering us towards respecting that by introducing the PaintPhase enum with values: - Background - Border - Foreground - Overlay (internal overlays used by inspector) Basically, to get the right visual result, we have to render the page multiple times, going one phase at a time.
This commit is contained in:
@@ -88,7 +88,7 @@ void PageHost::paint(const Gfx::IntRect& content_rect, Gfx::Bitmap& target)
|
||||
|
||||
Web::RenderingContext context(painter, palette(), Gfx::IntPoint());
|
||||
context.set_viewport_rect(content_rect);
|
||||
layout_root->render(context);
|
||||
layout_root->paint_all_phases(context);
|
||||
}
|
||||
|
||||
void PageHost::set_viewport_rect(const Gfx::IntRect& rect)
|
||||
|
||||
Reference in New Issue
Block a user