From 49366951ee1a2e8a7dc91ba07e9ac869fe184cb2 Mon Sep 17 00:00:00 2001 From: MacDue Date: Sun, 22 Oct 2023 16:59:16 +0100 Subject: [PATCH] LibWeb: Fix outer `box-shadows` after 063e66c The shrink should only be applied for inner box-shadows. --- Userland/Libraries/LibWeb/Painting/ShadowPainting.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Userland/Libraries/LibWeb/Painting/ShadowPainting.cpp b/Userland/Libraries/LibWeb/Painting/ShadowPainting.cpp index 5d7fb258ba..2ebcf9fc94 100644 --- a/Userland/Libraries/LibWeb/Painting/ShadowPainting.cpp +++ b/Userland/Libraries/LibWeb/Painting/ShadowPainting.cpp @@ -567,13 +567,12 @@ void paint_box_shadow(PaintContext& context, .device_content_rect = device_content_rect, }; - params.border_radii.shrink(borders_data.top.width, borders_data.right.width, borders_data.bottom.width, borders_data.left.width); - if (box_shadow_data.placement == ShadowPlacement::Inner) { - ScopedCornerRadiusClip corner_clipper { context, device_content_rect, border_radii, CornerClip::Outside }; + params.border_radii.shrink(borders_data.top.width, borders_data.right.width, borders_data.bottom.width, borders_data.left.width); + ScopedCornerRadiusClip corner_clipper { context, device_content_rect, params.border_radii, CornerClip::Outside }; context.painter().paint_inner_box_shadow_params(params); } else { - ScopedCornerRadiusClip corner_clipper { context, device_content_rect, params.border_radii, CornerClip::Inside }; + ScopedCornerRadiusClip corner_clipper { context, device_content_rect, border_radii, CornerClip::Inside }; context.painter().paint_outer_box_shadow_params(params); } }