From f7a900367f802796d94742c5bbb272aa07b4450e Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 1 Jul 2020 18:35:50 +0200 Subject: [PATCH] LibWeb: StackingContext was sorting the wrong list of children Oops, we're supposed to sort the *parent's* children, not our own. --- Libraries/LibWeb/Painting/StackingContext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibWeb/Painting/StackingContext.cpp b/Libraries/LibWeb/Painting/StackingContext.cpp index fffc584947..01e98c3ce3 100644 --- a/Libraries/LibWeb/Painting/StackingContext.cpp +++ b/Libraries/LibWeb/Painting/StackingContext.cpp @@ -41,7 +41,7 @@ StackingContext::StackingContext(LayoutBox& box, StackingContext* parent) m_parent->m_children.append(this); // FIXME: Don't sort on every append.. - quick_sort(m_children, [](auto& a, auto& b) { + quick_sort(m_parent->m_children, [](auto& a, auto& b) { return a->m_box.style().z_index().value_or(0) < b->m_box.style().z_index().value_or(0); }); }