WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
248212
[SVG] default for x1, y1 and y2 is 0% for LinearGradient
https://bugs.webkit.org/show_bug.cgi?id=248212
Summary
[SVG] default for x1, y1 and y2 is 0% for LinearGradient
Ahmad Saleem
Reported
2022-11-22 03:35:14 PST
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!
Attachments
Add attachment
proposed patch, testcase, etc.
Nikolas Zimmermann
Comment 1
2022-11-22 03:51:06 PST
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) };
Ahmad Saleem
Comment 2
2022-11-22 03:51:55 PST
(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?
Nikolas Zimmermann
Comment 3
2022-11-22 05:04:05 PST
(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.
Ahmad Saleem
Comment 4
2022-11-22 05:22:47 PST
https://github.com/WebKit/WebKit/pull/6731
EWS
Comment 5
2022-11-26 04:01:38 PST
Committed
257032@main
(7a2abd482abc): <
https://commits.webkit.org/257032@main
> Reviewed commits have been landed. Closing PR #6731 and removing active labels.
Radar WebKit Bug Importer
Comment 6
2022-11-26 04:02:16 PST
<
rdar://problem/102680120
>
Said Abou-Hallawa
Comment 7
2022-12-14 13:22:30 PST
The specs link is:
https://www.w3.org/TR/SVG2/pservers.html#LinearGradients
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug