Title: [286942] trunk
- Revision
- 286942
- Author
- mrobin...@webkit.org
- Date
- 2021-12-13 02:29:36 -0800 (Mon, 13 Dec 2021)
Log Message
`transform-origin` on SVG elements does not take into account the transform reference box origin
https://bugs.webkit.org/show_bug.cgi?id=234078
Reviewed by Rob Buis.
Source/WebCore:
No new tests. This is covered by existing WPT tests.
* svg/SVGGraphicsElement.cpp:
(WebCore::SVGGraphicsElement::animatedLocalTransform const): Add the reference box origin
to the calculated reference box offset when calculating the transform origin for SVG.
LayoutTests:
* TestExpectations: Mark tests as passing.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (286941 => 286942)
--- trunk/LayoutTests/ChangeLog 2021-12-13 09:24:54 UTC (rev 286941)
+++ trunk/LayoutTests/ChangeLog 2021-12-13 10:29:36 UTC (rev 286942)
@@ -1,3 +1,12 @@
+2021-12-13 Martin Robinson <mrobin...@webkit.org>
+
+ `transform-origin` on SVG elements does not take into account the transform reference box origin
+ https://bugs.webkit.org/show_bug.cgi?id=234078
+
+ Reviewed by Rob Buis.
+
+ * TestExpectations: Mark tests as passing.
+
2021-12-12 Alan Bujtas <za...@apple.com>
[LFC][IFC] Add partial unicode-bidi support on inline level boxes
Modified: trunk/LayoutTests/TestExpectations (286941 => 286942)
--- trunk/LayoutTests/TestExpectations 2021-12-13 09:24:54 UTC (rev 286941)
+++ trunk/LayoutTests/TestExpectations 2021-12-13 10:29:36 UTC (rev 286942)
@@ -3989,34 +3989,6 @@
webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-fixed-bg-005.html [ ImageOnlyFailure ]
webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-fixed-bg-006.html [ ImageOnlyFailure ]
webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-fixed-bg-007.html [ ImageOnlyFailure ]
-webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-origin/svg-origin-relative-length-016.html [ ImageOnlyFailure ]
-webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-origin/svg-origin-relative-length-020.html [ ImageOnlyFailure ]
-webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-origin/svg-origin-relative-length-021.html [ ImageOnlyFailure ]
-webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-origin/svg-origin-relative-length-022.html [ ImageOnlyFailure ]
-webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-origin/svg-origin-relative-length-023.html [ ImageOnlyFailure ]
-webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-origin/svg-origin-relative-length-024.html [ ImageOnlyFailure ]
-webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-origin/svg-origin-relative-length-025.html [ ImageOnlyFailure ]
-webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-origin/svg-origin-relative-length-026.html [ ImageOnlyFailure ]
-webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-origin/svg-origin-relative-length-027.html [ ImageOnlyFailure ]
-webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-origin/svg-origin-relative-length-028.html [ ImageOnlyFailure ]
-webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-origin/svg-origin-relative-length-029.html [ ImageOnlyFailure ]
-webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-origin/svg-origin-relative-length-030.html [ ImageOnlyFailure ]
-webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-origin/svg-origin-relative-length-031.html [ ImageOnlyFailure ]
-webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-origin/svg-origin-relative-length-032.html [ ImageOnlyFailure ]
-webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-origin/svg-origin-relative-length-033.html [ ImageOnlyFailure ]
-webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-origin/svg-origin-relative-length-034.html [ ImageOnlyFailure ]
-webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-origin/svg-origin-relative-length-035.html [ ImageOnlyFailure ]
-webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-origin/svg-origin-relative-length-036.html [ ImageOnlyFailure ]
-webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-origin/svg-origin-relative-length-037.html [ ImageOnlyFailure ]
-webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-origin/svg-origin-relative-length-038.html [ ImageOnlyFailure ]
-webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-origin/svg-origin-relative-length-039.html [ ImageOnlyFailure ]
-webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-origin/svg-origin-relative-length-040.html [ ImageOnlyFailure ]
-webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-origin/svg-origin-relative-length-041.html [ ImageOnlyFailure ]
-webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-origin/svg-origin-relative-length-042.html [ ImageOnlyFailure ]
-webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-origin/svg-origin-relative-length-043.html [ ImageOnlyFailure ]
-webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-origin/svg-origin-relative-length-044.html [ ImageOnlyFailure ]
-webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-origin/svg-origin-relative-length-045.html [ ImageOnlyFailure ]
-webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-origin/svg-origin-relative-length-046.html [ ImageOnlyFailure ]
webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-percent-008.html [ ImageOnlyFailure ]
webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-percent-010.html [ ImageOnlyFailure ]
webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-root-bg-001.html [ ImageOnlyFailure ]
Modified: trunk/Source/WebCore/ChangeLog (286941 => 286942)
--- trunk/Source/WebCore/ChangeLog 2021-12-13 09:24:54 UTC (rev 286941)
+++ trunk/Source/WebCore/ChangeLog 2021-12-13 10:29:36 UTC (rev 286942)
@@ -1,3 +1,16 @@
+2021-12-13 Martin Robinson <mrobin...@webkit.org>
+
+ `transform-origin` on SVG elements does not take into account the transform reference box origin
+ https://bugs.webkit.org/show_bug.cgi?id=234078
+
+ Reviewed by Rob Buis.
+
+ No new tests. This is covered by existing WPT tests.
+
+ * svg/SVGGraphicsElement.cpp:
+ (WebCore::SVGGraphicsElement::animatedLocalTransform const): Add the reference box origin
+ to the calculated reference box offset when calculating the transform origin for SVG.
+
2021-12-13 Youenn Fablet <you...@apple.com>
Implement step 17 of main fetch algorithm
Modified: trunk/Source/WebCore/svg/SVGGraphicsElement.cpp (286941 => 286942)
--- trunk/Source/WebCore/svg/SVGGraphicsElement.cpp 2021-12-13 09:24:54 UTC (rev 286941)
+++ trunk/Source/WebCore/svg/SVGGraphicsElement.cpp 2021-12-13 10:29:36 UTC (rev 286942)
@@ -101,7 +101,7 @@
// If we didn't have the CSS "transform" property set, we must account for the "transform" attribute.
if (!hasSpecifiedTransform && style) {
auto boundingBox = SVGRenderSupport::transformReferenceBox(*renderer(), *this, *style);
- auto t = floatPointForLengthPoint(style->transformOriginXY(), boundingBox.size());
+ auto t = floatPointForLengthPoint(style->transformOriginXY(), boundingBox.size()) + boundingBox.location();
matrix.translate(t);
matrix *= transform().concatenate();
matrix.translate(-t.x(), -t.y());
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes