<?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>17563</bug_id>
          
          <creation_ts>2012-06-21 01:56:53 +0000</creation_ts>
          <short_desc>Forbid use of canvas for decoration</short_desc>
          <delta_ts>2012-09-28 18:08:25 +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>HTML Canvas 2D Context</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Stefan Götz">res-html</reporter>
          <assigned_to name="rcabanie">cabanier</assigned_to>
          <cc>cabanier</cc>
    
    <cc>glenn</cc>
    
    <cc>ian</cc>
    
    <cc>jens</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>silviapfeiffer1</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>69305</commentid>
    <comment_count>0</comment_count>
    <who name="Stefan Götz">res-html</who>
    <bug_when>2012-06-21 01:56:53 +0000</bug_when>
    <thetext>(coming from http://forums.whatwg.org/bb3/viewtopic.php?f=3&amp;t=5016)

The spec for the canvas element states:
&quot;The canvas element provides scripts with a resolution-dependent bitmap canvas, which can be used for rendering graphs, game graphics, or other visual images on the fly.&quot;

One could interpret that &quot;other visual images&quot; implies *decorative* images, too.

I suggest to explicitly mention that the canvas element should/must not be used for pure decorative images. 

Maybe similar to the section &quot;A purely decorative image that doesn&apos;t add any information&quot;, which states for the img element:
&quot;If an image is decorative but isn&apos;t especially page-specific — for example an image that forms part of a site-wide design scheme — the image should be specified in the site&apos;s CSS, not in the markup of the document.&quot;

Random examples for what could be considered as decorative use of canvas (if used as background animation in webpages *not about* canvas (or the animation) itself):
· http://timothypoon.com/blog/demos/canvas-particle-parallax/
· http://radikalfx.com/files/anibg/
· http://www.go2script.com/items/style/14/25/dark_blue
· http://hernan.amiune.com/labs/particle-system/hello-world.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69308</commentid>
    <comment_count>1</comment_count>
    <who name="Glenn Adams">glenn</who>
    <bug_when>2012-06-21 05:32:34 +0000</bug_when>
    <thetext>purely decorative use of canvas is a legitimate use case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69371</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2012-06-25 05:04:22 +0000</bug_when>
    <thetext>The spec should be clearer about whether canvas-for-decoration is OK or not, I think.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69372</commentid>
    <comment_count>3</comment_count>
    <who name="Glenn Adams">glenn</who>
    <bug_when>2012-06-25 05:10:17 +0000</bug_when>
    <thetext>if the spec doesn&apos;t prohibit it, then it&apos;s permitted</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69378</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2012-06-25 06:57:09 +0000</bug_when>
    <thetext>It&apos;s usually the other way around, actually. Please leave the bug open.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69381</commentid>
    <comment_count>5</comment_count>
    <who name="Glenn Adams">glenn</who>
    <bug_when>2012-06-25 14:39:53 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; It&apos;s usually the other way around, actually. Please leave the bug open.

Really? You think specs constrain their applicability of use by default? You and I must be reading different specs then. Any spec that arbitrarily constraints its applicability of use is not going to be very useful for the open web platform (or much else for that matter).

The fundamental purpose of canvas is to allow authoring an image using procedural means (JS), instead of declarative means (via raster or vector graphics). As such, its applicability of use should be close if not equivalent to that of an image element. Are you arguing otherwise?

Since you ask to leave this open, I will defer further resolution to the editor.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70531</commentid>
    <comment_count>6</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-07-18 16:00:01 +0000</bug_when>
    <thetext>This bug was cloned to create bug 18031 as part of operation convergence.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72074</commentid>
    <comment_count>7</comment_count>
    <who name="Silvia Pfeiffer">silviapfeiffer1</who>
    <bug_when>2012-08-11 05:58:33 +0000</bug_when>
    <thetext>Moved to canvas component.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72080</commentid>
    <comment_count>8</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-08-11 21:19:44 +0000</bug_when>
    <thetext>Silvia, did you mean to assign this to me? (If so, please move it to the WHATWG product&apos;s HTML component.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72083</commentid>
    <comment_count>9</comment_count>
    <who name="Silvia Pfeiffer">silviapfeiffer1</who>
    <bug_when>2012-08-12 00:06:08 +0000</bug_when>
    <thetext>No I didn&apos;t mean to, sorry. But you&apos;re still the default assignee for HTML Canvas 2D - need to change this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72171</commentid>
    <comment_count>10</comment_count>
    <who name="rcabanie">cabanier</who>
    <bug_when>2012-08-14 22:59:00 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; The spec should be clearer about whether canvas-for-decoration is OK or not, I
&gt; think.

I assume that you&apos;re referring to the section &quot;A purely decorative image that doesn&apos;t add any information but is still specific to the surrounding content&quot; in http://www.w3.org/TR/2008/WD-html5-20080610/embedded0.html.

That particular part of the spec describes what the &apos;alt&apos; attribute should contain. This does not prohibit using an image for purely decorative means. (Also, notice the &apos;in general&apos; which does not prohibit decorative images).

&gt; &quot;The canvas element provides scripts with a resolution-dependent bitmap canvas,
&gt; which can be used for rendering graphs, game graphics, or other visual images
&gt; on the fly.&quot;
This description is talking about the content of the canvas. It&apos;s not saying how you can use that content (be it as a normal image or a decorative one as described in the image spec )</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72625</commentid>
    <comment_count>11</comment_count>
    <who name="rcabanie">cabanier</who>
    <bug_when>2012-08-23 19:57:16 +0000</bug_when>
    <thetext>EDITOR&apos;S RESPONSE: 
This is an Editor&apos;s Response to your comment. If
you are satisfied with this response, please change the state of
this bug to CLOSED. If you have additional information and would
like the Editor to reconsider, please reopen this bug. If you would
like to escalate the issue to the full HTML Working Group, please
add the TrackerRequest keyword to this bug, and suggest title and
text for the Tracker Issue; or you may create a Tracker Issue
yourself, if you are able to do so. For more details, see this
document:
       http://dev.w3.org/html5/decision-policy/decision-policy.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74767</commentid>
    <comment_count>12</comment_count>
    <who name="Silvia Pfeiffer">silviapfeiffer1</who>
    <bug_when>2012-09-28 09:47:23 +0000</bug_when>
    <thetext>Would you mind if we applied the WHATWG fix for this, as it is simple:

https://github.com/w3c/html/commit/923c9ad84e7eb6d0b4a04cde1465055d9007b437</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74823</commentid>
    <comment_count>13</comment_count>
    <who name="rcabanie">cabanier</who>
    <bug_when>2012-09-28 18:08:25 +0000</bug_when>
    <thetext>(In reply to comment #12)
&gt; Would you mind if we applied the WHATWG fix for this, as it is simple:
&gt; 
&gt; https://github.com/w3c/html/commit/923c9ad84e7eb6d0b4a04cde1465055d9007b437

That change was already integrated on Sept 18.
I&apos;m unsure if it&apos;s related to this bug.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>