<?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>139414</bug_id>
          
          <creation_ts>2014-12-08 14:51:38 -0800</creation_ts>
          <short_desc>Small rounding error in SVG color transformation</short_desc>
          <delta_ts>2014-12-08 14:52:56 -0800</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>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <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="Said Abou-Hallawa">sabouhallawa</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>webkit-bug-importer</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1053529</commentid>
    <comment_count>0</comment_count>
      <attachid>242848</attachid>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2014-12-08 14:51:38 -0800</bug_when>
    <thetext>Created attachment 242848
Test case

Open the attached test case and compare it with the expected file.

Result: With naked eyes, the two will look very similar. But if a comparison tool is used, the result will be they are different.
Expected: The test case and the expected file should exactly the same.

The test case has the following filter effect:
    &lt;feColorMatrix type=&quot;matrix&quot; values=&quot;0 1 0 0 0   0 0 1 0 0   1 0 0 0 0   0 0 0 0.5 0&quot; ...&gt;
This filter effect is applied to the following target element:
    &lt;rect x=&quot;0&quot; y=&quot;0&quot; width=&quot;100&quot; height=&quot;100&quot; fill=&quot;#123456&quot; filter=&quot;url(#f1)&quot;/&gt;
The resulting color should be equal to: r=0x34, g=0x56, b=0x12 and alpha=0.5

The expected file has only the following element:
    &lt;rect x=&quot;10&quot; y=&quot;10&quot; width=&quot;80&quot; height=&quot;80&quot; fill=&quot;#345612&quot; fill-opacity=&quot;0.5&quot;/&gt;

With closer look at the test case, one can see a difference of 1/256 in every color component when it is compared with the expected file.

NOTE: We may end up not fixing this bug. But we need to investigate to understand where the rounding happens. And based on this investigation we will decided if it is worthy fixing or not.
NOTE: The attached test case is imported from Mozilla SVG test suite.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1053530</commentid>
    <comment_count>1</comment_count>
      <attachid>242849</attachid>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2014-12-08 14:52:05 -0800</bug_when>
    <thetext>Created attachment 242849
Expected file</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1053531</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2014-12-08 14:52:56 -0800</bug_when>
    <thetext>&lt;rdar://problem/19182146&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>242848</attachid>
            <date>2014-12-08 14:51:38 -0800</date>
            <delta_ts>2014-12-08 14:51:38 -0800</delta_ts>
            <desc>Test case</desc>
            <filename>feColorMatrix-1.svg</filename>
            <type>image/svg+xml</type>
            <size>448</size>
            <attacher name="Said Abou-Hallawa">sabouhallawa</attacher>
            
              <data encoding="base64">PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgoKPGZpbHRlciBpZD0iZjEi
IGZpbHRlclVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgcHJpbWl0aXZlVW5pdHM9Im9iamVjdEJv
dW5kaW5nQm94IiAKICAgICAgICAgeD0iMCUiIHk9IjAlIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIx
MDAlIj4KICA8ZmVDb2xvck1hdHJpeCB0eXBlPSJtYXRyaXgiIHZhbHVlcz0iMCAxIDAgMCAwICAg
MCAwIDEgMCAwICAgMSAwIDAgMCAwICAgMCAwIDAgMC41IDAiCiAgIHg9IjEwJSIgeT0iMTAlIiB3
aWR0aD0iODAlIiBoZWlnaHQ9IjgwJSIgc3R5bGU9ImNvbG9yLWludGVycG9sYXRpb24tZmlsdGVy
czpzUkdCIi8+CjwvZmlsdGVyPgo8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwIiBoZWlnaHQ9
IjEwMCIgZmlsbD0iIzEyMzQ1NiIgZmlsdGVyPSJ1cmwoI2YxKSIvPgoKPC9zdmc+Cg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>242849</attachid>
            <date>2014-12-08 14:52:05 -0800</date>
            <delta_ts>2014-12-08 14:52:05 -0800</delta_ts>
            <desc>Expected file</desc>
            <filename>feColorMatrix-1-expected.svg</filename>
            <type>image/svg+xml</type>
            <size>129</size>
            <attacher name="Said Abou-Hallawa">sabouhallawa</attacher>
            
              <data encoding="base64">PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgoKPHJlY3QgeD0iMTAiIHk9
IjEwIiB3aWR0aD0iODAiIGhlaWdodD0iODAiIGZpbGw9IiMzNDU2MTIiIGZpbGwtb3BhY2l0eT0i
MC41Ii8+Cgo8L3N2Zz4K
</data>

          </attachment>
      

    </bug>

</bugzilla>