Skip to content
Permalink
Browse files
Update transforms on SVG shapes/groups when root element size changed
https://bugs.webkit.org/show_bug.cgi?id=245120
<rdar://99854279>

Reviewed by Simon Fraser.

We need to also update transforms when the size of the RenderSVGRoot has changed, since percentage based transforms are relative to the root.

Tests:
- imported/w3c/web-platform-tests/css/css-transforms/transform-percent-010.html
- imported/w3c/web-platform-tests/css/css-transforms/transform-box/view-box-mutation-001.html
- imported/w3c/web-platform-tests/css/css-transforms/transform-box/view-box-mutation-003.html

* LayoutTests/TestExpectations:
* Source/WebCore/rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::layoutChildren):

Canonical link: https://commits.webkit.org/254538@main
  • Loading branch information
nt1m committed Sep 16, 2022
1 parent 8f45275 commit 32128c3f2e5789599a6bcf2eb91c9f8cba54815c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
@@ -4175,15 +4175,12 @@ webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/scale-tra
webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-background-007.html [ ImageOnlyFailure ]
webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-background-008.html [ ImageOnlyFailure ]
webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-box/fill-box-002.html [ ImageOnlyFailure ]
webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-box/view-box-mutation-001.html [ ImageOnlyFailure ]
webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-box/view-box-mutation-002.html [ ImageOnlyFailure ]
webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-box/view-box-mutation-003.html [ ImageOnlyFailure ]
webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-fixed-bg-002.html [ ImageOnlyFailure ]
webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-fixed-bg-004.html [ ImageOnlyFailure ]
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-percent-010.html [ ImageOnlyFailure ]
webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-root-bg-001.html [ ImageOnlyFailure ]
webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-root-bg-002.html [ ImageOnlyFailure ]
webkit.org/b/230080 imported/w3c/web-platform-tests/css/css-transforms/transform-root-bg-003.html [ ImageOnlyFailure ]
@@ -267,7 +267,7 @@ void SVGRenderSupport::layoutChildren(RenderElement& start, bool selfNeedsLayout
svgText.setNeedsTextMetricsUpdate();
svgText.setNeedsPositioningValuesUpdate();
}

child.setNeedsTransformUpdate();
needsLayout = true;
}
}

0 comments on commit 32128c3

Please sign in to comment.