<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>95083</bug_id>
          
          <creation_ts>2012-08-27 06:58:25 -0700</creation_ts>
          <short_desc>Setting &apos;color&apos; CSS property by script doesn&apos;t update values using &apos;currentColor&apos;</short_desc>
          <delta_ts>2023-05-30 13:04:48 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>SVG</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.8</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>227219</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Antoine Quint">ml</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>krit</cc>
    
    <cc>m_dubet</cc>
    
    <cc>ntim</cc>
    
    <cc>pdr</cc>
    
    <cc>schenney</cc>
    
    <cc>thorton</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>705237</commentid>
    <comment_count>0</comment_count>
      <attachid>160711</attachid>
    <who name="Antoine Quint">ml</who>
    <bug_when>2012-08-27 06:58:25 -0700</bug_when>
    <thetext>Created attachment 160711
test case

In the attached testcase, I have a &lt;linearGradient&gt; element and I set its &quot;color&quot; CSS property dynamically in a script ran after the DOMContentLoaded fires. The &lt;stop&gt; elements of the &lt;linearGradient&gt; all have their &quot;stop-color&quot; value set to &quot;currentColor&quot; via a CSS rule, and yet that color doesn&apos;t change when the parent element&apos;s &quot;color&quot; CSS property is updated via script. The testcase works if either of those is true:

1. &quot;color&quot; on &lt;linearGradient&gt; is set statically
2. the &lt;stop&gt; elements have their &quot;stop-color&quot; property set to &quot;currentColor&quot; via the inline &quot;style&quot; attribute instead of a CSS rule.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>705239</commentid>
    <comment_count>1</comment_count>
    <who name="Antoine Quint">ml</who>
    <bug_when>2012-08-27 07:00:50 -0700</bug_when>
    <thetext>rdar://problem/12179192</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1008587</commentid>
    <comment_count>2</comment_count>
    <who name="Dirk Schulze">krit</who>
    <bug_when>2014-05-12 07:27:12 -0700</bug_when>
    <thetext>There was a fix for this issue in Blink lately. pdr, do you know the CL for it still?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1008871</commentid>
    <comment_count>3</comment_count>
    <who name="Philip Rogers">pdr</who>
    <bug_when>2014-05-12 23:30:06 -0700</bug_when>
    <thetext>This may have been fixed with https://src.chromium.org/viewvc/blink?view=rev&amp;revision=164726?

In general, &quot;git log -S currentColor&quot; is your friend :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1958795</commentid>
    <comment_count>4</comment_count>
    <who name="Matthieu Dubet">m_dubet</who>
    <bug_when>2023-05-30 10:00:12 -0700</bug_when>
    <thetext>The attached test case renders correctly (gradient to green) on main.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1958857</commentid>
    <comment_count>5</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2023-05-30 13:04:48 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 227219 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>160711</attachid>
            <date>2012-08-27 06:58:25 -0700</date>
            <delta_ts>2012-08-27 06:58:25 -0700</delta_ts>
            <desc>test case</desc>
            <filename>current-color-rule.svg</filename>
            <type>image/svg+xml</type>
            <size>664</size>
            <attacher name="Antoine Quint">ml</attacher>
            
              <data encoding="base64">PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDx0aXRsZT5TZXR0aW5n
ICJjb2xvciIgZHluYW1pY2FsbHkgb24gJmx0O2xpbmVhckdyYWRpZW50PiB3aXRoICJzdG9wLWNv
bG9yIiBzZXQgdG8gImN1cnJlbnRDb2xvciIgb24gJmx0O3N0b3A+PC90aXRsZT4KICA8c3R5bGU+
CiAgICBzdG9wIHsKICAgICAgc3RvcC1jb2xvcjogY3VycmVudENvbG9yOwogICAgfQogIDwvc3R5
bGU+CiAgPHNjcmlwdCB0eXBlPSJ0ZXh0L2phdmFzY3JpcHQiPgogIDwhW0NEQVRBWwogIAogICAg
d2luZG93LmFkZEV2ZW50TGlzdGVuZXIoJ0RPTUNvbnRlbnRMb2FkZWQnLCBmdW5jdGlvbiAoZXZl
bnQpIHsKICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ2dyYWRpZW50Jykuc3R5bGUuc2V0
UHJvcGVydHkoJ2NvbG9yJywgJ2dyZWVuJyk7CiAgICB9LCBmYWxzZSk7CiAgCiAgXV0+CiAgPC9z
Y3JpcHQ+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkaWVudCI+CiAgICA8c3RvcCBvZmZzZXQ9
IjAiIHN0b3Atb3BhY2l0eT0iMCIgLz4KICAgIDxzdG9wIG9mZnNldD0iMSIgc3RvcC1vcGFjaXR5
PSIxIiAvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0i
MTAwJSIgZmlsbD0idXJsKCNncmFkaWVudCkiIC8+Cjwvc3ZnPg==
</data>

          </attachment>
      

    </bug>

</bugzilla>