浏览代码

LibWeb: Restore clipping of positioned descendants

63c727a was meant to stop clipping absolutely positioned descendants,
but used `is_positioned()` rather than `is_absolutely_positioned()`,
which meant it disabled clipping in many more cases that it should
have.
MacDue 2 年之前
父节点
当前提交
c3841e1667
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Userland/Libraries/LibWeb/Painting/StackingContext.cpp

+ 1 - 1
Userland/Libraries/LibWeb/Painting/StackingContext.cpp

@@ -135,7 +135,7 @@ void StackingContext::paint_internal(PaintContext& context) const
 
 
     auto paint_child = [&](auto* child) {
     auto paint_child = [&](auto* child) {
         auto parent = child->m_box.parent();
         auto parent = child->m_box.parent();
-        auto should_clip_overflow = child->m_box.is_positioned() ? Paintable::ShouldClipOverflow::No : Paintable::ShouldClipOverflow::Yes;
+        auto should_clip_overflow = child->m_box.is_absolutely_positioned() ? Paintable::ShouldClipOverflow::No : Paintable::ShouldClipOverflow::Yes;
         auto* paintable = parent ? parent->paintable() : nullptr;
         auto* paintable = parent ? parent->paintable() : nullptr;
         if (paintable)
         if (paintable)
             paintable->before_children_paint(context, PaintPhase::Foreground, should_clip_overflow);
             paintable->before_children_paint(context, PaintPhase::Foreground, should_clip_overflow);