[webkit-changes] [WebKit/WebKit] b3b752: [SVG] animateMotion accumulate doesn't work proper...

Ahmad Saleem noreply at github.com
Fri May 26 10:54:28 PDT 2023


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

  Changed paths:
    A LayoutTests/svg/animations/animateMotion-accumulate-1a-expected.svg
    A LayoutTests/svg/animations/animateMotion-accumulate-1a.svg
    A LayoutTests/svg/animations/animateMotion-accumulate-1b-expected.svg
    A LayoutTests/svg/animations/animateMotion-accumulate-1b.svg
    A LayoutTests/svg/animations/animateMotion-accumulate-1c-expected.svg
    A LayoutTests/svg/animations/animateMotion-accumulate-1c.svg
    A LayoutTests/svg/animations/animateMotion-accumulate-2a-expected.svg
    A LayoutTests/svg/animations/animateMotion-accumulate-2a.svg
    A LayoutTests/svg/animations/animateMotion-accumulate-2b-expected.svg
    A LayoutTests/svg/animations/animateMotion-accumulate-2b.svg
    M Source/WebCore/svg/SVGAnimateMotionElement.cpp

  Log Message:
  -----------
  [SVG] animateMotion accumulate doesn't work properly with rotate: auto / auto-reverse

https://bugs.webkit.org/show_bug.cgi?id=256928
rdar://problem/109489241

Reviewed by Simon Fraser.

This patch aligns WebKit behavior with Gecko / Firefox and Blink / Chromium.

Merge: https://src.chromium.org/viewvc/blink?view=revision&revision=154375

We need not accumulate the angle for animation as we have a method to get normal angle at a given length on the path.
So, only position needs to be accumulated. Also made some changes to simplify the logic for accumulation.

* Source/WebCore/svg/SVGAnimateMotionElement.cpp:
(SVGAnimateMotionElement::buildTransformForProgress): Remove 'angle' accumulation from here
(SVGAnimateMotionElement::calculateAnimatedValue): Move here
* LayoutTests/svg/animations/animateMotion-accumulate-1a.svg: Add Test Case
* LayoutTests/svg/animations/animateMotion-accumulate-1a-expected.svg: Add Test Case Expectation
* LayoutTests/svg/animations/animateMotion-accumulate-1b.svg: Add Test Case
* LayoutTests/svg/animations/animateMotion-accumulate-1b-expected.svg: Add Test Case Expectation
* LayoutTests/svg/animations/animateMotion-accumulate-1c.svg: Add Test Case
* LayoutTests/svg/animations/animateMotion-accumulate-1c-expected.svg: Add Test Case Expectation
* LayoutTests/svg/animations/animateMotion-accumulate-2a.svg: Add Test Case
* LayoutTests/svg/animations/animateMotion-accumulate-2a-expected.svg: Add Test Case Expectation
* LayoutTests/svg/animations/animateMotion-accumulate-2b.svg: Add Test Case
* LayoutTests/svg/animations/animateMotion-accumulate-2b-expected.svg: Add Test Case Expectation

All tests have slight pixel tolerances to accommodate for platform differences.

Canonical link: https://commits.webkit.org/264595@main




More information about the webkit-changes mailing list