diff --git a/Tests/LibWeb/Layout/expected/overflow-x-hidden-with-border-radius.txt b/Tests/LibWeb/Layout/expected/overflow-x-hidden-with-border-radius.txt new file mode 100644 index 0000000000..3924114199 --- /dev/null +++ b/Tests/LibWeb/Layout/expected/overflow-x-hidden-with-border-radius.txt @@ -0,0 +1,6 @@ +Viewport <#document> at (0,0) content-size 800x600 children: not-inline + BlockContainer at (0,0) content-size 800x118 children: not-inline + BlockContainer at (8,8) content-size 784x102 children: not-inline + BlockContainer at (9,9) content-size 100x100 positioned children: not-inline + BlockContainer <(anonymous)> at (8,110) content-size 784x0 children: inline + TextNode <#text> diff --git a/Tests/LibWeb/Layout/input/overflow-x-hidden-with-border-radius.html b/Tests/LibWeb/Layout/input/overflow-x-hidden-with-border-radius.html new file mode 100644 index 0000000000..ac73bdb735 --- /dev/null +++ b/Tests/LibWeb/Layout/input/overflow-x-hidden-with-border-radius.html @@ -0,0 +1,10 @@ +
diff --git a/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp b/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp index 21f5df6708..9e08873765 100644 --- a/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp +++ b/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp @@ -363,7 +363,7 @@ void PaintableBox::apply_clip_overflow_rect(PaintContext& context, PaintPhase ph clip_overflow(); } - if (overflow_y == CSS::Overflow::Hidden || overflow_x == CSS::Overflow::Hidden) { + if (overflow_y == CSS::Overflow::Hidden && overflow_x == CSS::Overflow::Hidden) { auto border_radii_data = normalized_border_radii_data(ShrinkRadiiForBorders::Yes); if (border_radii_data.has_any_radius()) { auto corner_clipper = BorderRadiusCornerClipper::create(context, context.rounded_device_rect(*clip_rect), border_radii_data, CornerClip::Outside, BorderRadiusCornerClipper::UseCachedBitmap::No);