<?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>117095</bug_id>
          
          <creation_ts>2013-05-31 14:43:55 -0700</creation_ts>
          <short_desc>HTMLCanvasElement getContext and supportsContext functions assumes that a canvas cannot be changed after creation</short_desc>
          <delta_ts>2013-06-14 10:37:14 -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>Canvas</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</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>0</everconfirmed>
          <reporter name="Ruth Fong">ruthiecftg</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>dino</cc>
    
    <cc>ian</cc>
    
    <cc>ruthiecftg</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>895998</commentid>
    <comment_count>0</comment_count>
    <who name="Ruth Fong">ruthiecftg</who>
    <bug_when>2013-05-31 14:43:55 -0700</bug_when>
    <thetext>The implementations of getContext and supportsContext (once the patch for bug 70117 is landed) in Source/WebCore/html/HTMLCanvasElement.cpp depends on the assumption that the context does not go away upon creation (to prevent JS form seeing a dangling pointer) and disallows the context from being changed once it is created.

Thus, if a 3d context exists for a &lt;canvas&gt; element (by calling canvas.getsContext(&apos;webkit-3d&apos;) and supportsContext(&apos;2d&apos;) is subsequently called on that &lt;canvas&gt; element, then canvas.supportsContext(&apos;2d&apos;) will return false because a 3d context already exists.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>895999</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2013-05-31 14:44:14 -0700</bug_when>
    <thetext>&lt;rdar://problem/14037988&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>900593</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-06-14 10:00:50 -0700</bug_when>
    <thetext>Why is that a bug? Isn&apos;t that exactly what the spec requires?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>900603</commentid>
    <comment_count>3</comment_count>
    <who name="Ruth Fong">ruthiecftg</who>
    <bug_when>2013-06-14 10:34:53 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; Why is that a bug? Isn&apos;t that exactly what the spec requires?

Just checked with Dean; you&apos;re right.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>900604</commentid>
    <comment_count>4</comment_count>
    <who name="Dean Jackson">dino</who>
    <bug_when>2013-06-14 10:37:14 -0700</bug_when>
    <thetext>I believe it was me who gave this erroneous suggestion.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>