Hi Team, While going through Blink's commit, I come across following commit and while testing, noticed that we are still failing three out of four tests compared to Chrome Canary 110 and Firefox Nightly 109. Blink Commit - https://chromium.googlesource.com/chromium/blink/+/219dff463987f53c22f5f96f35a794246a13538d Failing Test Case - https://jsfiddle.net/hpdbe0mr/show Just wanted to raise bug for someone to tackle it. I couldn't find 1-1 Webkit GitHub code so I might not be able to fix it. Thanks!
Ahmad, that one is easy. SVGLinearGradientElement.h contains the default values as strings for WebKit, x2 is 100%, the rest is unset, aka 0. Ref<SVGAnimatedLength> m_x1 { SVGAnimatedLength::create(this, SVGLengthMode::Width) }; Ref<SVGAnimatedLength> m_y1 { SVGAnimatedLength::create(this, SVGLengthMode::Height) }; Ref<SVGAnimatedLength> m_x2 { SVGAnimatedLength::create(this, SVGLengthMode::Width, "100%"_s) }; Ref<SVGAnimatedLength> m_y2 { SVGAnimatedLength::create(this, SVGLengthMode::Height) };
(In reply to Nikolas Zimmermann from comment #1) > Ahmad, that one is easy. SVGLinearGradientElement.h contains the default > values as strings for WebKit, x2 is 100%, the rest is unset, aka 0. > > Ref<SVGAnimatedLength> m_x1 { SVGAnimatedLength::create(this, > SVGLengthMode::Width) }; > Ref<SVGAnimatedLength> m_y1 { SVGAnimatedLength::create(this, > SVGLengthMode::Height) }; > Ref<SVGAnimatedLength> m_x2 { SVGAnimatedLength::create(this, > SVGLengthMode::Width, "100%"_s) }; > Ref<SVGAnimatedLength> m_y2 { SVGAnimatedLength::create(this, > SVGLengthMode::Height) }; Should I give it a try or you want to take it?
(In reply to Ahmad Saleem from comment #2) > Should I give it a try or you want to take it? Give it a shot -- you might want to check if there's WPT test coverage for the default values, if so your patch will be a progression for WebKit on that front.
https://github.com/WebKit/WebKit/pull/6731
Committed 257032@main (7a2abd482abc): <https://commits.webkit.org/257032@main> Reviewed commits have been landed. Closing PR #6731 and removing active labels.
<rdar://problem/102680120>
The specs link is: https://www.w3.org/TR/SVG2/pservers.html#LinearGradients