[webkit-reviews] review granted: [Bug 232189] Fix issue for transform-origin in SVG : [Attachment 442401] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 25 13:02:45 PDT 2021


Simon Fraser (smfr) <simon.fraser at apple.com> has granted Nikos Mouchtaris
<nmouchtaris at apple.com>'s request for review:
Bug 232189: Fix issue for transform-origin in SVG
https://bugs.webkit.org/show_bug.cgi?id=232189

Attachment 442401: Patch

https://bugs.webkit.org/attachment.cgi?id=442401&action=review




--- Comment #6 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
Comment on attachment 442401
  --> https://bugs.webkit.org/attachment.cgi?id=442401
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=442401&action=review

r+ but the test needs fixing.

> Source/WebCore/ChangeLog:3
> +	   Fix issue for transform-origin in SVG

This should be more specific, like "transform-origin attribute ignored when
using transform attribute in SVG"

> Source/WebCore/ChangeLog:8
> +	   Add stopgap for C to use transform-origin in
SVGGraphicsElement::animatedLocalTransform.

Need to revise this.

> Source/WebCore/ChangeLog:9
> +	   Better fix making transform a presentation attribute coming later.

You could link to the bugzilla bug.

> Source/WebCore/svg/SVGGraphicsElement.cpp:107
> +	   matrix.translate(-t.x(), -t.y());

Does translate(-t) work?

>
LayoutTests/imported/w3c/web-platform-tests/svg/styling/render/transform-origin
-not-explicit-style.svg:11
> +    <rect x="0" y="0" width="40" height="10" style="fill:cyan"
transform="scale(2, 3)" transform-origin="30px 10px"/>

I think in the attribute you specify the transform-origin without units. Use
fill="green" other than cyan fill.

>
LayoutTests/platform/glib/imported/w3c/web-platform-tests/svg/styling/render/tr
ansform-origin-not-explicit-style-expected.txt:1
> +layer at (0,0) size 800x600

These .txt files should not exist. The problem is that webkit testing doesn't
find transform-origin-not-explicit-style-ref.svg as the ref (it would have to
be named transform-origin-not-explicit-style-expected.svg); see
webkit.org/b/203784


More information about the webkit-reviews mailing list