diff --git a/Libraries/LibWeb/Painting/Command.h b/Libraries/LibWeb/Painting/Command.h index 73b17a2b06d..83dbe7c234b 100644 --- a/Libraries/LibWeb/Painting/Command.h +++ b/Libraries/LibWeb/Painting/Command.h @@ -128,6 +128,9 @@ struct PushStackingContext { { source_paintable_rect.translate_by(offset); transform.origin.translate_by(offset.to_type()); + if (clip_path.has_value()) { + clip_path.value().transform(Gfx::AffineTransform().translate(offset.to_type())); + } } }; diff --git a/Tests/LibWeb/Ref/expected/clip-path-scrolling.html b/Tests/LibWeb/Ref/expected/clip-path-scrolling.html new file mode 100644 index 00000000000..668530be6ad --- /dev/null +++ b/Tests/LibWeb/Ref/expected/clip-path-scrolling.html @@ -0,0 +1,18 @@ + + +
+ diff --git a/Tests/LibWeb/Ref/input/clip-path-scrolling.html b/Tests/LibWeb/Ref/input/clip-path-scrolling.html new file mode 100644 index 00000000000..f9433db5e18 --- /dev/null +++ b/Tests/LibWeb/Ref/input/clip-path-scrolling.html @@ -0,0 +1,20 @@ + + + +
+