mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:57:44 +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:
parent
abe811104f
commit
cfab53903f
22 changed files with 109 additions and 95 deletions
|
@ -38,8 +38,10 @@ LayoutListItemMarker::~LayoutListItemMarker()
|
|||
{
|
||||
}
|
||||
|
||||
void LayoutListItemMarker::render(RenderingContext& context)
|
||||
void LayoutListItemMarker::render(RenderingContext& context, PaintPhase phase)
|
||||
{
|
||||
if (phase != PaintPhase::Foreground)
|
||||
return;
|
||||
Gfx::IntRect bullet_rect { 0, 0, 4, 4 };
|
||||
bullet_rect.center_within(enclosing_int_rect(absolute_rect()));
|
||||
// FIXME: It would be nicer to not have to go via the parent here to get our inherited style.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue