<?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>83764</bug_id>
          
          <creation_ts>2012-04-12 02:57:44 -0700</creation_ts>
          <short_desc>[Qt] Two canvas tests fail with QT_IMAGE_DECODER=0 setup</short_desc>
          <delta_ts>2012-04-14 04:43:57 -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>Images</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Qt</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>32410</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Zoltan Horvath">zoltan</reporter>
          <assigned_to name="Zoltan Horvath">zoltan</assigned_to>
          <cc>noel.gordon</cc>
    
    <cc>ossy</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>601045</commentid>
    <comment_count>0</comment_count>
    <who name="Zoltan Horvath">zoltan</who>
    <bug_when>2012-04-12 02:57:44 -0700</bug_when>
    <thetext>fast/canvas/canvas-toDataURL-case-insensitive-mimetype.html

--- /home/zoltan/prog/local/WebKit/WebKitBuild/Release/layout-test-results/fast/canvas/canvas-toDataURL-case-insensitive-mimetype-expected.txt
+++ /home/zoltan/prog/local/WebKit/WebKitBuild/Release/layout-test-results/fast/canvas/canvas-toDataURL-case-insensitive-mimetype-actual.txt
@@ -6,9 +6,6 @@
 PASS tryMimeType(&apos;image/png&apos;) is &apos;image/png&apos;
 PASS tryMimeType(&apos;iMAge/Png&apos;) is &apos;image/png&apos;
 PASS tryMimeType(&apos;IMAGE/PNG&apos;) is &apos;image/png&apos;
-PASS tryMimeType(&apos;image/jpeg&apos;) is &apos;image/jpeg&apos;
-PASS tryMimeType(&apos;imAgE/jPEg&apos;) is &apos;image/jpeg&apos;
-PASS tryMimeType(&apos;IMAGE/JPEG&apos;) is &apos;image/jpeg&apos;
 PASS successfullyParsed is true
 
 TEST COMPLETE

fast/canvas/toDataURL-supportedTypes.html

--- /home/zoltan/prog/local/WebKit/WebKitBuild/Release/layout-test-results/fast/canvas/toDataURL-supportedTypes-expected.txt
+++ /home/zoltan/prog/local/WebKit/WebKitBuild/Release/layout-test-results/fast/canvas/toDataURL-supportedTypes-actual.txt
@@ -4,8 +4,8 @@
 MIME types are the SAME.
 
 Given MIMEType: image/jpeg
-Used MIMEType: image/jpeg
-MIME types are the SAME.
+Used MIMEType: image/png
+MIME types DIFFER.
 
 Given MIMEType: image/gif
 Used MIMEType: image/png


Let&apos;s check this out!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>601076</commentid>
    <comment_count>1</comment_count>
      <attachid>136871</attachid>
    <who name="Zoltan Horvath">zoltan</who>
    <bug_when>2012-04-12 03:40:16 -0700</bug_when>
    <thetext>Created attachment 136871
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>601080</commentid>
    <comment_count>2</comment_count>
      <attachid>136871</attachid>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2012-04-12 03:45:54 -0700</bug_when>
    <thetext>Comment on attachment 136871
Patch

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>601082</commentid>
    <comment_count>3</comment_count>
      <attachid>136871</attachid>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2012-04-12 03:52:26 -0700</bug_when>
    <thetext>Comment on attachment 136871
Patch

Clearing flags on attachment: 136871

Committed r113960: &lt;http://trac.webkit.org/changeset/113960&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>601083</commentid>
    <comment_count>4</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2012-04-12 03:52:33 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>601096</commentid>
    <comment_count>5</comment_count>
    <who name="noel gordon">noel.gordon</who>
    <bug_when>2012-04-12 04:37:52 -0700</bug_when>
    <thetext>Looks ok to me.  If I were doing it, I&apos;d consider changing
   http://trac.webkit.org/browser/trunk/Source/WebCore/platform/MIMETypeRegistry.cpp#L290

to read 
  #elif PLATFORM(QT)

is you need to support all the &quot;encoding&quot; formats you did prior to this change.  If the goal is to reduce the number of supported formats, well I&apos;m fine with that also.

And is canvas/philip/tests toDataURL.jpeg.alpha.html passing or skipped on Qt?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>601104</commentid>
    <comment_count>6</comment_count>
    <who name="Zoltan Horvath">zoltan</who>
    <bug_when>2012-04-12 04:54:07 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; Looks ok to me.  If I were doing it, I&apos;d consider changing
&gt;    http://trac.webkit.org/browser/trunk/Source/WebCore/platform/MIMETypeRegistry.cpp#L290
&gt; 
&gt; to read 
&gt;   #elif PLATFORM(QT)
&gt; 
&gt; is you need to support all the &quot;encoding&quot; formats you did prior to this change.  If the goal is to reduce the number of supported formats, well I&apos;m fine with that also.

Thanks! I need to extend my patch in bug #80400 with MIMETypeRegistry changes. Our goal is to change to webcore imagedecoders and let a fallback case to qtimagedecoder for other types.

&gt; And is canvas/philip/tests toDataURL.jpeg.alpha.html passing or skipped on Qt?

It&apos;s not skipped and passing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>601117</commentid>
    <comment_count>7</comment_count>
    <who name="noel gordon">noel.gordon</who>
    <bug_when>2012-04-12 05:15:57 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; (In reply to comment #5)
&gt; &gt; Looks ok to me.  If I were doing it, I&apos;d consider changing
&gt; &gt;    http://trac.webkit.org/browser/trunk/Source/WebCore/platform/MIMETypeRegistry.cpp#L290
&gt; &gt; 
&gt; &gt; to read 
&gt; &gt;   #elif PLATFORM(QT)
&gt; &gt; 
&gt; &gt; is you need to support all the &quot;encoding&quot; formats you did prior to this change.  If the goal is to reduce the number of supported formats, well I&apos;m fine with that also.
&gt; 
&gt; Thanks! I need to extend my patch in bug #80400 with MIMETypeRegistry changes. Our goal is to change to webcore imagedecoders and let a fallback case to qtimagedecoder for other types.

That&apos;s fine for decoders -- here I&apos;m talking about image &quot;encoders&quot;.


&gt; &gt; And is canvas/philip/tests toDataURL.jpeg.alpha.html passing or skipped on Qt?
&gt; 
&gt; It&apos;s not skipped and passing.

Good, so many ports get this wrong.  You must pass premultipled color components from the 2d canvas to the JPEG encoder to pass this test and so conform to the &lt;canvas&gt; spec -- for output images that do not have alpha, form a Porter-Duff composite src-over black.

For the 3d WebGL &lt;cavnas&gt;.toDataURL() cases, things are a little more complicated.  Sometimes you must pass premultipled color, and sometimes you must not.  Not sure if the Qt implementation has that ability yet, but there is a test for it in the webgl test suite.  

  fast/canvas/webgl/premultiplyalpha-test.html

Refer to bug 68366.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>601968</commentid>
    <comment_count>8</comment_count>
    <who name="Zoltan Horvath">zoltan</who>
    <bug_when>2012-04-13 04:18:34 -0700</bug_when>
    <thetext>(In reply to comment #7)
&gt; (In reply to comment #6)
&gt; &gt; (In reply to comment #5)
&gt; &gt; &gt; Looks ok to me.  If I were doing it, I&apos;d consider changing
&gt; &gt; &gt;    http://trac.webkit.org/browser/trunk/Source/WebCore/platform/MIMETypeRegistry.cpp#L290
&gt; &gt; &gt; 
&gt; &gt; &gt; to read 
&gt; &gt; &gt;   #elif PLATFORM(QT)
&gt; &gt; &gt; 
&gt; &gt; &gt; is you need to support all the &quot;encoding&quot; formats you did prior to this change.  If the goal is to reduce the number of supported formats, well I&apos;m fine with that also.
&gt; &gt; 
&gt; &gt; Thanks! I need to extend my patch in bug #80400 with MIMETypeRegistry changes. Our goal is to change to webcore imagedecoders and let a fallback case to qtimagedecoder for other types.
&gt; 
&gt; That&apos;s fine for decoders -- here I&apos;m talking about image &quot;encoders&quot;.

I would modify that when we get rid of QT_IMAGE_DECODER macro, in other case we won&apos;t hit elif in L297.

&gt; &gt; &gt; And is canvas/philip/tests toDataURL.jpeg.alpha.html passing or skipped on Qt?
&gt; &gt; 
&gt; &gt; It&apos;s not skipped and passing.
&gt; 
&gt; Good, so many ports get this wrong.  You must pass premultipled color components from the 2d canvas to the JPEG encoder to pass this test and so conform to the &lt;canvas&gt; spec -- for output images that do not have alpha, form a Porter-Duff composite src-over black.
&gt; 
&gt; For the 3d WebGL &lt;cavnas&gt;.toDataURL() cases, things are a little more complicated.  Sometimes you must pass premultipled color, and sometimes you must not.  Not sure if the Qt implementation has that ability yet, but there is a test for it in the webgl test suite.  
&gt; 
&gt;   fast/canvas/webgl/premultiplyalpha-test.html
&gt; 
&gt; Refer to bug 68366.

Unfortunately, we skip all webgl tests for Qt-port at http://trac.webkit.org/browser/trunk/LayoutTests/platform/qt/Skipped#L385

It would be good to check these test why they are failing (only few passes).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>602650</commentid>
    <comment_count>9</comment_count>
    <who name="noel gordon">noel.gordon</who>
    <bug_when>2012-04-14 04:43:57 -0700</bug_when>
    <thetext>(In reply to comment #8)

&gt; &gt; &gt; Thanks! I need to extend my patch in bug #80400 with MIMETypeRegistry changes. Our goal is to change to webcore imagedecoders and let a fallback case to qtimagedecoder for other types.
&gt; &gt; 
&gt; &gt; That&apos;s fine for decoders -- here I&apos;m talking about image &quot;encoders&quot;.
&gt; 
&gt; I would modify that when we get rid of QT_IMAGE_DECODER macro, in other case we won&apos;t hit elif in L297.

Sounds good Zoltan.  Added myself to bug 80400 to follow along.


&gt; &gt; Refer to bug 68366.

&gt; Unfortunately, we skip all webgl tests for Qt-port ...

I see.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>136871</attachid>
            <date>2012-04-12 03:40:16 -0700</date>
            <delta_ts>2012-04-12 03:52:26 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-83764-20120412123923.patch</filename>
            <type>text/plain</type>
            <size>1858</size>
            <attacher name="Zoltan Horvath">zoltan</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTEzOTU4CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggODg0YjgwNzFhNGFhMjkw
OWMzNTU2ZmFiNTA1ZDJmOTRjMjJlOTg2My4uMTZkMzk4OWVlNjgwOGE3YmMxMTcxMDg4ZGQ0NDIz
YjE4YTViMDIzMSAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSwzICsxLDIxIEBACisyMDEyLTA0LTEyICBab2x0
YW4gSG9ydmF0aCAgPHpvbHRhbkB3ZWJraXQub3JnPgorCisgICAgICAgIFtRdF0gVHdvIGNhbnZh
cyB0ZXN0cyBmYWlsIHdpdGggUVRfSU1BR0VfREVDT0RFUj0wIHNldHVwCisgICAgICAgIGh0dHBz
Oi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD04Mzc2NAorCisgICAgICAgIFRoZSBm
b2xsb3dpbmcgdGVzdHMgd2VyZSBmYWlsZWQgYWZ0ZXIgcjEwODc5MjoKKyAgICAgICAgLSBjYW52
YXMtdG9EYXRhVVJMLWNhc2UtaW5zZW5zaXRpdmUtbWltZXR5cGUuaHRtbAorICAgICAgICAtIHRv
RGF0YVVSTC1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