<?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>134503</bug_id>
          
          <creation_ts>2014-07-01 11:54:12 -0700</creation_ts>
          <short_desc>Canvas drawImage from SVG fails, even sans foreignObject</short_desc>
          <delta_ts>2014-11-30 10:27:42 -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>Canvas</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc>http://codepen.io/brianblakely/full/Ccoda</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="BrianMB">anewpage.media</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>dino</cc>
    
    <cc>dtrebbien</cc>
    
    <cc>krit</cc>
    
    <cc>timothy</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1019692</commentid>
    <comment_count>0</comment_count>
    <who name="BrianMB">anewpage.media</who>
    <bug_when>2014-07-01 11:54:12 -0700</bug_when>
    <thetext>When SVG images do not contain the foreignObject element, the Canvas API should treat them like any other image type.  At current, they appear to fail no matter what.

Live test:
http://codepen.io/brianblakely/full/Ccoda

Chrome/Firefox output (correct):
http://i.imgur.com/irvfNUj.png

WebKit/IE output (incorrect):
http://i.imgur.com/7o1L3SP.png</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1019700</commentid>
    <comment_count>1</comment_count>
    <who name="BrianMB">anewpage.media</who>
    <bug_when>2014-07-01 11:58:39 -0700</bug_when>
    <thetext>Naturally, since drawImage never happens, getImageData fails as well.

The test includes an indicator for both method calls.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1020548</commentid>
    <comment_count>2</comment_count>
    <who name="BrianMB">anewpage.media</who>
    <bug_when>2014-07-04 16:23:44 -0700</bug_when>
    <thetext>WebKit screenshot is from r170805

OS X 10.9.3</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1020571</commentid>
    <comment_count>3</comment_count>
    <who name="Dirk Schulze">krit</who>
    <bug_when>2014-07-04 23:05:53 -0700</bug_when>
    <thetext>It would be great if you could upload examples to Bugzilla directly in the future.

It seems hat you are using Blobs in your example. Blobs with data (at least SVG data but I think in general) are not supported in WebKit yet. There should be open bugs for that.

Thanks for reporting.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1020574</commentid>
    <comment_count>4</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2014-07-04 23:16:17 -0700</bug_when>
    <thetext>I fixed this with bug 119492 with tests. Web Inspector uses it. So you might be doing something else WebKit does not like (as Dirk said, using blobs.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1020821</commentid>
    <comment_count>5</comment_count>
    <who name="BrianMB">anewpage.media</who>
    <bug_when>2014-07-07 09:03:36 -0700</bug_when>
    <thetext>@Dirk:

I will upload directly in the future.  Is there any documentation on best pracs for live bug demos?  Help section is not very helpful in that regard.

I checked Blob support on Can I Use and MDN before incorporating into the demo.  Unfortunately they didn&apos;t note any gaps in support!

@Timothy:

I will update my demo to not use blobs and check again.  Last time I ran a round of testing on SVG+Canvas was over a year ago, prior to your commit, so it made sense to see it still broken.  Annoying if that blob usage is definitely the problem, but at least I&apos;m aware of the issue now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1023102</commentid>
    <comment_count>6</comment_count>
    <who name="BrianMB">anewpage.media</who>
    <bug_when>2014-07-17 14:17:45 -0700</bug_when>
    <thetext>http://codepen.io/brianblakely/full/Ccoda

I have modified my test case, and confirmed the feedback.  Thank you!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1051270</commentid>
    <comment_count>7</comment_count>
    <who name="Daniel Trebbien">dtrebbien</who>
    <bug_when>2014-11-28 10:17:44 -0800</bug_when>
    <thetext>So this bug is fixed?  In Safari 8.0 (10600.1.25.1) I see the crab image twice on the test case:  http://codepen.io/brianblakely/full/Ccoda</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1051362</commentid>
    <comment_count>8</comment_count>
    <who name="BrianMB">anewpage.media</who>
    <bug_when>2014-11-30 10:27:42 -0800</bug_when>
    <thetext>This ticket can be closed.  The problem was with Blob.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>