summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2021-05-11 09:40:47 -0400
committerAndreas Kling <kling@serenityos.org>2021-05-11 18:03:21 +0200
commit227ccfc61a543764bea5dcacdc4f27aa3a5b9c98 (patch)
treec96ff0350f2fda935946fb20a6ed91e08a7a5315 /Userland/Libraries
parentecdb6a11b7462e8d3401489f77fc73a0b9173809 (diff)
downloadserenity-227ccfc61a543764bea5dcacdc4f27aa3a5b9c98.zip
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.
Diffstat (limited to 'Userland/Libraries')
-rw-r--r--Userland/Libraries/LibWeb/Painting/StackingContext.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/Painting/StackingContext.cpp b/Userland/Libraries/LibWeb/Painting/StackingContext.cpp
index bbd9e8ae76..7be1bfd14e 100644
--- a/Userland/Libraries/LibWeb/Painting/StackingContext.cpp
+++ b/Userland/Libraries/LibWeb/Painting/StackingContext.cpp
@@ -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) {