[webkit-changes] [WebKit/WebKit] 590f8f: Resolve percentage in `use` against the instance's...

Ahmad Saleem noreply at github.com
Fri May 26 11:04:03 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 590f8fce92dfea7e21fc936798cacf2c5f18a323
      https://github.com/WebKit/WebKit/commit/590f8fce92dfea7e21fc936798cacf2c5f18a323
  Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
  Date:   2023-05-26 (Fri, 26 May 2023)

  Changed paths:
    A LayoutTests/svg/custom/use-nested-symbol-viewport-expected.html
    A LayoutTests/svg/custom/use-nested-symbol-viewport.html
    M Source/WebCore/rendering/svg/LegacyRenderSVGTransformableContainer.cpp

  Log Message:
  -----------
  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




More information about the webkit-changes mailing list