[webkit-changes] [WebKit/WebKit] 2efdea: Negative SVGTransform scale values should be corre...
Ahmad Saleem
noreply at github.com
Wed Jan 10 21:17:07 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2efdea0ba354c2758bfa2a8c6a262e411fc6c4f8
https://github.com/WebKit/WebKit/commit/2efdea0ba354c2758bfa2a8c6a262e411fc6c4f8
Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
Date: 2024-01-10 (Wed, 10 Jan 2024)
Changed paths:
A LayoutTests/svg/transforms/negative-scale-value-expected.txt
A LayoutTests/svg/transforms/negative-scale-value.html
M Source/WebCore/svg/SVGTransformValue.h
Log Message:
-----------
Negative SVGTransform scale values should be correctly stringified
https://bugs.webkit.org/show_bug.cgi?id=264752
rdar://problem/118656892
Reviewed by Said Abou-Hallawa.
This patch is to align WebKit with Blink / Chromium and partially with Gecko / Firefox.
Merge: https://chromium.googlesource.com/chromium/blink/+/8a7252a2602bd8067c83d48c8fd525ef322708c2
Before this patch, SVGTransformValue::appendScale used AffineTransform::{x,y}Scale},
which computed transform scale values by computing norm of projected unit vectors.
However, that would always return positive values, even if negative scale values were specified.
This patch changes the implementation to use `a` and `d` values instead. This is valid,
as the scale matrix is guaranteed to be in the below simple form when the transform has
type `SVG_TRANSFORM_SCALE`.
|xscale 0 0|
| 0 yscale 0|
* Source/WebCore/svg/SVGTransformValue.h:
(appendScale):
* LayoutTests/svg/transforms/negative-scale-value.html: Add Test Case
* LayoutTests/svg/transforms/negative-scale-value-expected.txt: Add Test Case Expectation
Canonical link: https://commits.webkit.org/272885@main
More information about the webkit-changes
mailing list