<?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>93344</bug_id>
          
          <creation_ts>2012-08-07 01:07:51 -0700</creation_ts>
          <short_desc>CanvasRenderingContext2D::createPattern() should return null, if non-decodable image argument</short_desc>
          <delta_ts>2023-01-15 19:27:52 -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>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=250662</see_also>
          <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>0</everconfirmed>
          <reporter name="Jussi Kukkonen (jku)">jussi.kukkonen</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>688938</commentid>
    <comment_count>0</comment_count>
    <who name="Jussi Kukkonen (jku)">jussi.kukkonen</who>
    <bug_when>2012-08-07 01:07:51 -0700</bug_when>
    <thetext>Spec says: &quot;If the image argument is an HTMLImageElement object that is not fully decodable ... then the implementation must return null.&quot; This does not currently happen so these tests fail:
  canvas/philip/tests/2d.pattern.image.broken.html = TEXT
  canvas/philip/tests/2d.pattern.image.incomplete.empty.html = TEXT
  canvas/philip/tests/2d.pattern.image.incomplete.omitted.html = TEXT


HTMLImageElement does not seem to have &quot;decodability&quot; as a property and things are slightly complicated by the img.complete property being slightly illogical for this: currently images with empty, missing or non-existing source are &quot;complete&quot; (and IIRC this is according to current spec). So possibly these cases would have to be tested in CanvasRenderingContext2D. I&apos;ll take a closer look, advice is welcome also.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>688944</commentid>
    <comment_count>1</comment_count>
    <who name="Jussi Kukkonen (jku)">jussi.kukkonen</who>
    <bug_when>2012-08-07 01:24:11 -0700</bug_when>
    <thetext>to improve searchability: above comment relates to CanvasRenderingContext2D::createPattern()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>690242</commentid>
    <comment_count>2</comment_count>
    <who name="Jussi Kukkonen (jku)">jussi.kukkonen</who>
    <bug_when>2012-08-08 06:12:55 -0700</bug_when>
    <thetext>After some testing:

2d.pattern.image.incomplete.omitted:
works after checking image-&gt;src().isValid()) before creating pattern

2d.pattern.image.broken:
needs knowledge of whether image really is decodable

2d.pattern.image.incomplete.empty:
the image url used in createPattern() ends up as the _page_ url because HTMLIMageElement does document().completeURL(). This would still work with knowledge of whether image really is decodable</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1884867</commentid>
    <comment_count>3</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2022-07-18 14:21:37 -0700</bug_when>
    <thetext>It looks like this was done as part of Bug 180718.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>