浏览代码

LibWeb: Clip overflow in descendant boxes for non-visible CSS overflow

We were only clipping for hidden, when we should be clipping for hidden,
clip, scroll and auto. Basically everything but visible. :^)
Andreas Kling 2 年之前
父节点
当前提交
b7d2f6fa88
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Userland/Libraries/LibWeb/Painting/PaintableBox.cpp

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

@@ -327,7 +327,7 @@ Optional<CSSPixelRect> PaintableBox::calculate_overflow_clipped_rect() const
         auto overflow_x = computed_values().overflow_x();
         auto overflow_x = computed_values().overflow_x();
         auto overflow_y = computed_values().overflow_y();
         auto overflow_y = computed_values().overflow_y();
 
 
-        if (overflow_x == CSS::Overflow::Hidden && overflow_y == CSS::Overflow::Hidden) {
+        if (overflow_x != CSS::Overflow::Visible && overflow_y != CSS::Overflow::Visible) {
             if (m_clip_rect.has_value()) {
             if (m_clip_rect.has_value()) {
                 m_clip_rect->intersect(absolute_padding_box_rect());
                 m_clip_rect->intersect(absolute_padding_box_rect());
             } else {
             } else {