Bug 256956

Summary: Fix animation of stop-color on <stop>
Product: WebKit Reporter: Ahmad Saleem <ahmad.saleem792>
Component: SVGAssignee: Rob Buis <rbuis>
Status: NEW ---    
Severity: Normal CC: karlcow, sabouhallawa, webkit-bug-importer, zimmermann
Priority: P2 Keywords: BrowserCompat, InRadar, WPTImpact
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   

Description Ahmad Saleem 2023-05-18 02:35:06 PDT
Hi Team,

While going through Blink's commit, I came across another failing WPT test case:

Blink Commit: https://chromium.googlesource.com/chromium/src.git/+/176379b6e15a3a0ae8b65bb493691ffd00ed3767

WPT link: https://wpt.fyi/results/svg/animations/animate-stop-currentcolor.html?label=master&label=experimental&aligned&q=animate-stop-currentcolor.html

WPT Test link: http://wpt.live/svg/animations/animate-stop-currentcolor.html

It might be duplicate of bug 95083 (especially [2] bullet point).

Just wanted to raise so we can track but if it is duplicate, we can mark this as well. Why I am not doing it straight away because the test case in other bug is working same as Chrome Canary 115 and Safari 16.4.1.

Thanks!
Comment 1 Radar WebKit Bug Importer 2023-05-25 02:36:16 PDT
<rdar://problem/109823555>
Comment 2 Ahmad Saleem 2023-07-05 09:10:25 PDT
Similar looking function (SVGStopElement::stopColorIncludingOpacity()):

https://searchfox.org/wubkat/source/Source/WebCore/svg/SVGStopElement.cpp#87

if (!renderer())
        return Color::transparentBlack;

    auto& style = renderer()->style();
    auto& svgStyle = style.svgStyle();
    auto stopColor = style.colorResolvingCurrentColor(svgStyle.stopColor());

    return stopColor.colorWithAlphaMultipliedBy(svgStyle.stopOpacity());
Comment 3 Rob Buis 2023-10-16 05:53:04 PDT
Pull request: https://github.com/WebKit/WebKit/pull/19112