Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information