1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:48:11 +00:00

LibWeb: StackingContext was sorting the wrong list of children

Oops, we're supposed to sort the *parent's* children, not our own.
This commit is contained in:
Andreas Kling 2020-07-01 18:35:50 +02:00
parent 6f8042d8e5
commit f7a900367f

View file

@ -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);
});
}