<?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>21631</bug_id>
          
          <creation_ts>2013-04-08 21:03:28 +0000</creation_ts>
          <short_desc>Clarify the mess in &quot;commit the scratch bitmap&quot; regarding which task source is being used for the tasks</short_desc>
          <delta_ts>2013-07-15 23:09:34 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Dyck">jmdyck</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ian</cc>
    
    <cc>mike</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>85738</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2013-04-08 21:03:28 +0000</bug_when>
    <thetext>In 4.8.11.2 &quot;The 2D rendering context&quot;,
in the algorithm for &quot;commit the scratch bitmap&quot;,
step 8 says:
    Queue a task from the canvas updating task source of the output bitmap&apos;s
    canvas element&apos;s event loop to perform the following substeps:

First, I think
    the &lt;a ...&gt;output bitmap&lt;/a&gt;
should be
    &lt;var&gt;output bitmap&lt;/var&gt;
i.e., a reference to the variable established in step 7.


Second, the &apos;access chain&apos; in this step appears to be:
    the output bitmap
       v
    a canvas element
       v
    an event loop
       v
    canvas updating task source
and some of the links in this chain are questionable...

(a) &quot;the output bitmap&apos;s canvas element&quot;

    It isn&apos;t clear from the definition of &apos;output bitmap&apos; that this is
    meaningful.  Section 4.8.11.2.1 does say:
        The output bitmap of a rendering context, when it has one,
        is always just an alias to a canvas element&apos;s bitmap.
    but that&apos;s non-normative, and appears later than the step in question.

    It would be helpful, where the spec says:
       A CanvasRenderingContext2D object ... can be bound to an output bitmap.
    to append something like:
       (the bitmap of a canvas element)


(b) &quot;[a] canvas element&apos;s event loop&quot;

    It&apos;s not clear what this means. It might mean:
        the event loop of the browsing context of the document
        that contains the canvas element
    but I couldn&apos;t find any prose to justify going directly from an element
    to an event loop.


(c) &quot;the canvas updating task source of [an] event loop&quot;

    It&apos;s not clear what this means either. I believe it&apos;s the only point
    in the spec that refers to a task source as being &quot;of an event loop&quot;.
    (The only other place I could find of a task source being &quot;of&quot; anything
    is in 7.1.4.2&apos;s &quot;spin the event loop&quot;, which refers to the task source
    of a task, which makes sense.)

    The step makes somewhat more sense if you replace the &quot;of&quot; with &quot;to&quot;,
    leading to a slightly different parsing:
        Queue a task
            from &apos;the canvas updating task source&apos;
            to the output bitmap&apos;s canvas element&apos;s event loop
            to perform the following substeps:
    i.e.:
        Queue a task to run the following substeps, where
        the task source of the task is the &apos;canvas updating task source&apos;,
        and the &quot;relevant event loop&quot; (referred to in the definition of
        &quot;queue a task&quot;) is the output bitmap&apos;s canvas element&apos;s event loop.

    But that makes me wonder why this is (I think) the only &quot;queue a task&quot;
    that specifies the relevant event loop. Is there a general rule for
    determining the relevant event loop that works for all task-queuings
    other than this one? If so, it should probably be stated close to the
    definition for &quot;queue a task&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85912</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-04-10 23:00:54 +0000</bug_when>
    <thetext>Fixed the first part.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88489</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-05-30 23:48:29 +0000</bug_when>
    <thetext>Fixed the second part.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88490</commentid>
    <comment_count>3</comment_count>
    <who name="">contributor</who>
    <bug_when>2013-05-30 23:48:59 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r7875.
Check-in comment: Fix the terminology for how canvases are committed. 
http://html5.org/tools/web-apps-tracker?from=7874&amp;to=7875</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88491</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2013-05-31 01:02:31 +0000</bug_when>
    <thetext>You inserted a step to define &lt;var&gt;canvas&lt;/var&gt;, but then don&apos;t reference it.
Presumably,
    Queue a task associated with &lt;code&gt;canvas&lt;/code&gt; element&apos;s Document ...
should be
    Queue a task associated with &lt;var&gt;canvas&lt;/var&gt;&apos; Document ...

Other than that, looks good to me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88868</commentid>
    <comment_count>5</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-06-06 21:32:07 +0000</bug_when>
    <thetext>Woops, good catch. Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88869</commentid>
    <comment_count>6</comment_count>
    <who name="">contributor</who>
    <bug_when>2013-06-06 21:34:07 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r7928.
Check-in comment: Fix some typos or copypasta.
http://html5.org/tools/web-apps-tracker?from=7927&amp;to=7928</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>