Bug 237252

Summary: [svg] fill-opacity should be clamped to the [0,1] range
Product: WebKit Reporter: Antoine Quint <graouts>
Component: SVGAssignee: Antoine Quint <graouts>
Status: RESOLVED FIXED    
Severity: Normal CC: changseok, darin, dino, esprehn+autocc, ews-watchlist, glenn, kondapallykalyan, pdr, sabouhallawa, webkit-bug-importer, zimmermann
Priority: P2 Keywords: InRadar, WebExposed, WPTImpact
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch ews-feeder: commit-queue-

Description Antoine Quint 2022-02-27 08:59:46 PST
[svg] fill-opacity should be clamped to the [0,1] range
Comment 1 Antoine Quint 2022-02-27 09:00:17 PST
Created attachment 453342 [details]
Patch
Comment 2 EWS 2022-02-27 12:33:20 PST
Committed r290568 (247846@main): <https://commits.webkit.org/247846@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 453342 [details].
Comment 3 Radar WebKit Bug Importer 2022-02-27 12:34:20 PST
<rdar://problem/89531516>
Comment 4 Darin Adler 2022-02-27 12:35:49 PST
Comment on attachment 453342 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=453342&action=review

> Source/WebCore/rendering/style/SVGRenderStyle.h:285
> +    auto clampedOpacity = clampTo<float>(opacity, 0.f, 1.f);

Should have been able to use std::clamp instead of clampTo<float> here. But I suppose either is OK.