diff --git a/Libraries/LibWeb/Layout/LayoutState.cpp b/Libraries/LibWeb/Layout/LayoutState.cpp index 7a0dae675a8..6662b0e7cbd 100644 --- a/Libraries/LibWeb/Layout/LayoutState.cpp +++ b/Libraries/LibWeb/Layout/LayoutState.cpp @@ -124,11 +124,11 @@ static CSSPixelRect measure_scrollable_overflow(Box const& box) // (including zero-area boxes and accounting for transforms as described above), // provided they themselves have overflow: visible (i.e. do not themselves trap the overflow) // and that scrollable overflow is not already clipped (e.g. by the clip property or the contain property). - if (is(box) || child.computed_values().overflow_x() == CSS::Overflow::Visible || child.computed_values().overflow_y() == CSS::Overflow::Visible) { + if (child.computed_values().overflow_x() == CSS::Overflow::Visible || child.computed_values().overflow_y() == CSS::Overflow::Visible) { auto child_scrollable_overflow = measure_scrollable_overflow(child); - if (is(box) || child.computed_values().overflow_x() == CSS::Overflow::Visible) + if (child.computed_values().overflow_x() == CSS::Overflow::Visible) scrollable_overflow_rect.unite_horizontally(child_scrollable_overflow); - if (is(box) || child.computed_values().overflow_y() == CSS::Overflow::Visible) + if (child.computed_values().overflow_y() == CSS::Overflow::Visible) scrollable_overflow_rect.unite_vertically(child_scrollable_overflow); } diff --git a/Tests/LibWeb/Ref/expected/scrollable-overflow-viewport-bug.html b/Tests/LibWeb/Ref/expected/scrollable-overflow-viewport-bug.html new file mode 100644 index 00000000000..04ce6d96c5f --- /dev/null +++ b/Tests/LibWeb/Ref/expected/scrollable-overflow-viewport-bug.html @@ -0,0 +1 @@ + diff --git a/Tests/LibWeb/Ref/input/scrollable-overflow-viewport-bug.html b/Tests/LibWeb/Ref/input/scrollable-overflow-viewport-bug.html new file mode 100644 index 00000000000..01a2ab4a6e2 --- /dev/null +++ b/Tests/LibWeb/Ref/input/scrollable-overflow-viewport-bug.html @@ -0,0 +1,22 @@ + + + + +
+