Summary: | Setting 'color' CSS property by script doesn't update values using 'currentColor' | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Antoine Quint <ml> | ||||
Component: | SVG | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED DUPLICATE | ||||||
Severity: | Normal | CC: | krit, m_dubet, ntim, pdr, schenney, thorton, zimmermann | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Mac | ||||||
OS: | OS X 10.8 | ||||||
Attachments: |
|
There was a fix for this issue in Blink lately. pdr, do you know the CL for it still? This may have been fixed with https://src.chromium.org/viewvc/blink?view=rev&revision=164726? In general, "git log -S currentColor" is your friend :) The attached test case renders correctly (gradient to green) on main. *** This bug has been marked as a duplicate of bug 227219 *** |
Created attachment 160711 [details] test case In the attached testcase, I have a <linearGradient> element and I set its "color" CSS property dynamically in a script ran after the DOMContentLoaded fires. The <stop> elements of the <linearGradient> all have their "stop-color" value set to "currentColor" via a CSS rule, and yet that color doesn't change when the parent element's "color" CSS property is updated via script. The testcase works if either of those is true: 1. "color" on <linearGradient> is set statically 2. the <stop> elements have their "stop-color" property set to "currentColor" via the inline "style" attribute instead of a CSS rule.