mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:48:12 +00:00
LibWeb: Paint an element's foreground before painting its children
The current implementation is missing the emphasized text of the following rule in the painting order spec: 7. Otherwise: *first for the element*, then for all its in-flow, non-positioned, block-level descendants in tree order... This ensures the foreground is painted for the current element before descending into its children.
This commit is contained in:
parent
ecdb6a11b7
commit
227ccfc61a
1 changed files with 1 additions and 0 deletions
|
@ -85,6 +85,7 @@ void StackingContext::paint(PaintContext& context)
|
|||
// Draw the non-positioned floats (step 5)
|
||||
paint_descendants(context, m_box, StackingContextPaintPhase::Floats);
|
||||
// Draw inline content, replaced content, etc. (steps 6, 7)
|
||||
m_box.paint(context, PaintPhase::Foreground);
|
||||
paint_descendants(context, m_box, StackingContextPaintPhase::Foreground);
|
||||
// Draw other positioned descendants (steps 8, 9)
|
||||
for (auto* child : m_children) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue