LibWeb: Apply the paint transformation in SVGGradientElement

In commit 1b82cb43c2 I accidentally
removed the paint transformation altogether. The result was that
zoomed-in SVGs, or SVG elements with a transformation applied could have
their gradient coordinates misplaced significantly.

This was also exposed in the `svg-text-effects` test by way of a slight
visual difference. Add a new test that very clearly exposes the fixed
issue by rotating the gradient coordinates by 45 degrees.
This commit is contained in:
Jelle Raaijmakers 2024-11-15 14:41:15 +01:00 committed by Andreas Kling
parent e21b5cab32
commit e5d71a6c82
Notes: github-actions[bot] 2024-11-15 22:37:58 +00:00
7 changed files with 25 additions and 1 deletions

View file

@ -106,6 +106,7 @@ void SVGPathPaintable::paint(PaintContext& context, PaintPhase phase) const
SVG::SVGPaintContext paint_context {
.viewport = svg_viewport,
.path_bounding_box = computed_path()->bounding_box(),
.paint_transform = paint_transform,
};
auto fill_opacity = graphics_element.fill_opacity().value_or(1);