Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Resolve percentage in
use
against the instance's viewport element
https://bugs.webkit.org/show_bug.cgi?id=256702 rdar://problem/109565397 Reviewed by Simon Fraser. This patch aligns WebKit with Blink / Chromium and Gecko / Firefox. Merge: https://chromium.googlesource.com/chromium/src/+/b34ff6fe2d5842a63e2c66f68f050f0cf9163010 In RenderSVGTransformableContainer::calculateLocalTransform, 'x' and 'y' were resolved against the original (corresponding) element. For a `use` nested within a `symbol`, this would mean that when were going to look up the viewport element, we would return the outer `symbol` element and thus fail to get a viewport. Use the instance element to setup the SVGLengthContext instead. * Source/WebCore/rendering/svg/LegacyRenderSVGTransformableContainer.cpp: (LegacyRenderSVGTransformableContainer::calculateLocalTransform): Use 'element' rather than 'useElement' * LayoutTests/svg/custom/use-nested-symbol-viewport.html: Add Test Case * LayoutTests/svg/custom/use-nested-symbol-viewport-expected.html: Add Test Case Expectation Canonical link: https://commits.webkit.org/264596@main
- Loading branch information