소스 검색

LibWeb: StackingContext was sorting the wrong list of children

Oops, we're supposed to sort the *parent's* children, not our own.
Andreas Kling 5 년 전
부모
커밋
f7a900367f
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Libraries/LibWeb/Painting/StackingContext.cpp

+ 1 - 1
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);
         });
     }