Bug 191939
Summary: | *-opacity computed values should clamp between 0 and 1 | ||
---|---|---|---|
Product: | WebKit | Reporter: | Eric Willigers <ericwilligers> |
Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED CONFIGURATION CHANGED | ||
Severity: | Normal | CC: | ahmad.saleem792, ap, dino, jonlee, rniwa, sabouhallawa, simon.fraser, webkit-bug-importer, zalan |
Priority: | P2 | Keywords: | BrowserCompat, InRadar |
Version: | Safari 12 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=265967 |
Eric Willigers
When the specified value is outside the range [0,1], Blink and Safari are currently not clamping the computed value of fill-opacity, flood-opacity, stop-opacity, stroke-opacity.
Edge and Firefox (and spec) are clamping the computed value to [0,1]
https://svgwg.org/svg2-draft/painting.html#FillOpacity
https://svgwg.org/svg2-draft/painting.html#StrokeOpacity
https://drafts.fxtf.org/filter-effects/#FloodOpacityProperty
Computed value: the specified value converted to a number, clamped to the range [0,1]
https://svgwg.org/svg2-draft/single-page.html#pservers-StopOpacityProperty
Any values outside the range 0.0 (fully transparent) to 1.0 (fully opaque) must be clamped to this range.
Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=908058
All browsers are clamping the computed value of opacity and shape-image-threshold.
http://jsfiddle.net/ericwilligers/zmgy8735/
(Blink and Safari and Firefox have different behavior when animating: https://github.com/w3c/csswg-drafts/issues/3340 )
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Eric Willigers
Blink (like Edge and Firefox) now clamps the computed value of *-opacity
https://wpt.fyi/results/svg/painting/parsing/stroke-opacity-computed.svg
Radar WebKit Bug Importer
<rdar://problem/47449828>
Ahmad Saleem
Based on attached "JSFiddle" in Comment 01, Safari 15.5 only differs on shape-image-threshold from other browsers (Chrome Canary 105 and Firefox Nightly 103). For all other tests, it is now consistent with other browsers.
I think separate bug can be raised for "shape-image-threshold" issue but I will leave it up to others to decide. Thanks!
Ahmad Saleem
Blink Commit - https://chromium.googlesource.com/chromium/src.git/+/7357da2a70de65bf267e8da97dc31e5e96baee20
Ahmad Saleem
closing this and raising new for 'shape-image-threshold'. Look into 'See Also'.