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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>10169</bug_id>
          
          <creation_ts>2010-07-14 20:55:20 +0000</creation_ts>
          <short_desc>The discontinuity at shadowBlur = 8 here is weird.  We have no interop on exact shadow algorithms right now anyway, so maybe it could be fixed in the spec?  Clearly authors aren&apos;t depending on pixel-perfect canvas shadows.  Maybe it should just be the num</short_desc>
          <delta_ts>2010-10-05 12:58:54 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>pre-LC1 HTML Canvas 2D Context (editor: Ian Hickson)</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#shadows</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ayg</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>36866</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2010-07-14 20:55:20 +0000</bug_when>
    <thetext>Section: http://www.whatwg.org/specs/web-apps/current-work/complete.html#shadows

Comment:
The discontinuity at shadowBlur = 8 here is weird.  We have no interop on
exact shadow algorithms right now anyway, so maybe it could be fixed in the
spec?  Clearly authors aren&apos;t depending on pixel-perfect canvas shadows. 
Maybe it should just be the number of standard deviations, since that&apos;s what
SVG does?

Posted from: 68.175.61.233</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36867</commentid>
    <comment_count>1</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2010-07-14 21:01:17 +0000</bug_when>
    <thetext>Document showing lack of interop:

data:text/html,&lt;!doctype html&gt;
&lt;canvas height=&quot;300&quot; width=&quot;300&quot;&gt;&lt;/canvas&gt;
&lt;script&gt;
window.addEventListener(&apos;load&apos;, function () {
context = document.getElementsByTagName(&quot;canvas&quot;)[0].getContext(&quot;2d&quot;);
context.shadowBlur = 50;
context.shadowColor = &apos;black&apos;;
context.fillRect(100, 100, 100, 100); }, false);
&lt;/script&gt;

This looks distinctly different in fairly recent WebKit, Gecko, and Presto (Chrome dev, Firefox 4b1, Opera 10.60).  From reading the specs, not knowing anything about Gaussian blurs, I&apos;d think it should look the same as:

&lt;!DOCTYPE svg PUBLIC &quot;-//W3C//DTD SVG 1.1//EN&quot;
&quot;http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd&quot;&gt;
&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;defs&gt;
&lt;filter id=&quot;Gaussian_Blur&quot;&gt;&lt;feGaussianBlur in=&quot;SourceGraphic&quot; stdDeviation=&quot;5&quot;/&gt;&lt;/filter&gt;
&lt;/defs&gt;
&lt;rect x=&quot;100&quot; y=&quot;100&quot; width=&quot;100&quot; height=&quot;100&quot; style=&quot;fill:black;filter:url(#Gaussian_Blur)&quot;/&gt;
&lt;/svg&gt;

which Chrome and Opera render identically to one another, but very different to how they render the canvas.  So it should be safe to change the algorithm here substantially.  Although probably not to the point of matching SVG, on second thought, since that&apos;s very different from what anyone does now for canvas (by an order of magnitude in this case).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36870</commentid>
    <comment_count>2</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2010-07-14 21:14:53 +0000</bug_when>
    <thetext>Er, my canvas example was wrong.  This should display identically to the SVG I gave:

data:text/html,&lt;!doctype html&gt;
&lt;style&gt;* { margin: 0 }&lt;/style&gt;
&lt;canvas height=&quot;300&quot; width=&quot;300&quot;&gt;&lt;/canvas&gt;
&lt;script&gt;
window.addEventListener(&apos;load&apos;, function () {
context = document.getElementsByTagName(&quot;canvas&quot;)[0].getContext(&quot;2d&quot;);
context.shadowBlur = 12.5;
context.shadowOffsetX = 400;
context.shadowOffsetY = 400;
context.shadowColor = &apos;black&apos;;
context.fillRect(-300, -300, 100, 100);
}, false);
&lt;/script&gt;

It does in Opera, but Chrome isn&apos;t quite right.  Either way, they all disagree on the canvas rendering, no interop.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36882</commentid>
    <comment_count>3</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2010-07-14 23:59:13 +0000</bug_when>
    <thetext>Safari 5, IE9PP2, and Opera 10.60 all agree on the canvas rendering on Windows 7, actually, per spec.  But Firefox+Chrome is a much bigger market share than that (since IE&lt;9 is out of the picture), so it&apos;s still not dependable in practice.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36903</commentid>
    <comment_count>4</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2010-07-15 09:57:36 +0000</bug_when>
    <thetext>Hixie recommended that I bring this up with browser vendors instead of him, so I&apos;ll do that.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>