mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-28 12:18:25 +00:00
We were transforming coordinates for SVG gradients in a pretty convoluted way: an inverse, unscaled transformation matrix was set up in order to work around some (old?) technical limitations. Rework this so the coordinate transformation no longer needs to be inversed. This fixes gradients with "userSpaceOnUse" for its gradientUnits attribute, which might cause coordinates to lie outside of the bounding box of the gradient. Two tests have updated reference screenshots with minor pixel updates; this is probably the result of floating point precision improvements by not inversing the matrix. One test (svg-text-effects) has a bigger change: the gradient stops seem to have moved along the text. This does seem to match other browsers slightly better, so I'm moving forward with this ref update.
10 lines
158 B
HTML
10 lines
158 B
HTML
<style>
|
|
* {
|
|
margin: 0;
|
|
}
|
|
body {
|
|
background-color: white;
|
|
}
|
|
</style>
|
|
<img src="../images/svg-gradient-userSpaceOnUse-ref.png">
|