Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Commits on May 26, 2023

  1. [SVG] animateMotion accumulate doesn't work properly with rotate: aut…

    …o / 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
    Ahmad-S792 authored and Ahmad Saleem committed May 26, 2023
    Configuration menu
    Copy the full SHA
    b3b7524 View commit details
    Browse the repository at this point in the history