Bug 269545 - Return initial value for `stop-color` instead of `transparentBlack`
Summary: Return initial value for `stop-color` instead of `transparentBlack`
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2024-02-15 21:42 PST by Ahmad Saleem
Modified: 2024-02-19 13:18 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2024-02-15 21:42:36 PST
Hi Team,

While looking into `stop-color` failures, I noticed that we return `transparentBlack', while I think it would be better to return `Color:Black` since it is initial value as per web-spec:

Web-Spec: https://svgwg.org/svg2-draft/pservers.html#StopColorProperties

Initial: Black

Our current code: https://searchfox.org/wubkat/rev/c40451f6052e2805fb1c6abfb61fa322c67caf5b/Source/WebCore/svg/SVGStopElement.cpp#90

We should change it to `Color:black`.

transparentBlack -> static constexpr auto transparentBlack = SRGBA<uint8_t> { };

While

black -> static constexpr auto black = SRGBA<uint8_t> { 0, 0, 0 };

Which makes more sense and aligned with web-spec.

Thanks!
Comment 1 EWS 2024-02-19 13:17:34 PST
Committed 274997@main (dcd60b82e8d8): <https://commits.webkit.org/274997@main>

Reviewed commits have been landed. Closing PR #24583 and removing active labels.
Comment 2 Radar WebKit Bug Importer 2024-02-19 13:18:14 PST
<rdar://problem/123262508>