Bug 279243
| Summary: | fillSTyle="currentColor" is only respected for styles set as the canvas attribute | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Kaiido <tristan.fraipont> |
| Component: | Canvas | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | karlcow, sabouhallawa, simon.fraser, webkit-bug-importer |
| Priority: | P2 | Keywords: | BrowserCompat, InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Mac (Apple Silicon) | ||
| OS: | macOS 15 | ||
Kaiido
https://jsfiddle.net/pu8gdz9s/
The `fillStyle` or `strokeStyle` of a 2D context of a canvas attached to the DOM should get the computed `color` of its HTMLCanvasElement when set to `"currentColor"`.
This works (and is tested) only when the CSS `color` value is set through an HTML `style="color:...` attribute on the `<canvas>` directly. Inheritance or setting through style-sheet doesn't work as it should.
Firefox has it correct, Chrome has the same bug: https://issues.chromium.org/issues/364924730
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/135925969>