<?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>53951</bug_id>
          
          <creation_ts>2011-02-07 15:05:03 -0800</creation_ts>
          <short_desc>drawImageBuffer in GraphicsContext passes magic (-1,-1) sized rects</short_desc>
          <delta_ts>2011-02-08 09:06:07 -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>WebCore Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</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>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="George Wright">gwright</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>darin</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>346847</commentid>
    <comment_count>0</comment_count>
    <who name="George Wright">gwright</who>
    <bug_when>2011-02-07 15:05:03 -0800</bug_when>
    <thetext>GraphicsContext::drawImageBuffer has logic inside it to set up a FloatSize properly based on (tw, th) and (tsw, tsh) if the dimensions are -1, -1 for the source rect. However, these variables are never used and the (-1, -1) rect is passed to ImageBuffer anyway. This is clearly in contrast with, for example, drawImage.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>346853</commentid>
    <comment_count>1</comment_count>
      <attachid>81536</attachid>
    <who name="George Wright">gwright</who>
    <bug_when>2011-02-07 15:09:03 -0800</bug_when>
    <thetext>Created attachment 81536
Send correctly sized rects in drawImageBuffer

Send the correct sized rects in drawImageBuffer to the ImageBuffer.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>346857</commentid>
    <comment_count>2</comment_count>
      <attachid>81536</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2011-02-07 15:09:53 -0800</bug_when>
    <thetext>Comment on attachment 81536
Send correctly sized rects in drawImageBuffer

Does this change have any effect? How can we test that the fix is effective? Normally we do not accept code changes that fix bugs without regression tests.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>346883</commentid>
    <comment_count>3</comment_count>
    <who name="George Wright">gwright</who>
    <bug_when>2011-02-07 15:20:30 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 81536 [details])
&gt; Does this change have any effect? How can we test that the fix is effective? Normally we do not accept code changes that fix bugs without regression tests.

It&apos;s exactly the same logic as is applied in drawImage. This is clearly what the original author of drawImageBuffer intended, but forgot to set up the FloatRects accordingly (evident by the fact that drawImageBuffer already calculates th, tw, tsh and tsw but never actually uses them).

This fixes rendering issues with certain versions of Skia.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>346887</commentid>
    <comment_count>4</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2011-02-07 15:21:26 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; This fixes rendering issues with certain versions of Skia.

Can you make a regression test which shows those issues, or are they with some version of Skia not available to us on buildbots?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>346894</commentid>
    <comment_count>5</comment_count>
    <who name="George Wright">gwright</who>
    <bug_when>2011-02-07 15:24:54 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; (In reply to comment #3)
&gt; &gt; This fixes rendering issues with certain versions of Skia.
&gt; 
&gt; Can you make a regression test which shows those issues, or are they with some version of Skia not available to us on buildbots?

yes, it&apos;s a version of skia that&apos;s not available on the build bots</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>346895</commentid>
    <comment_count>6</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2011-02-07 15:29:39 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; (In reply to comment #2)
&gt; &gt; Does this change have any effect? How can we test that the fix is effective? Normally we do not accept code changes that fix bugs without regression tests.
&gt; 
&gt; It&apos;s exactly the same logic as is applied in drawImage. This is clearly what the original author of drawImageBuffer intended [...]
&gt; 
&gt; This fixes rendering issues with certain versions of Skia.

For the record, the requirement for a regression test is not any reflection on how good or obvious a fix is, or how silly the original error was.

I think it’s OK for us to take this change that has no effect with any current configurations and is useful to Google in your work with newer fancier versions of Skia. But in the future, change log should explain why there is no test when you propose a change without a test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>346897</commentid>
    <comment_count>7</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2011-02-07 15:30:16 -0800</bug_when>
    <thetext>(In reply to comment #6)
&gt; I think it’s OK for us to take this change that has no effect with any current configurations and is useful to Google in your work with newer fancier versions of Skia. But in the future, change log should explain why there is no test when you propose a change without a test.

Heh, RIM, not Google.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>346898</commentid>
    <comment_count>8</comment_count>
      <attachid>81536</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2011-02-07 15:30:54 -0800</bug_when>
    <thetext>Comment on attachment 81536
Send correctly sized rects in drawImageBuffer

review+ given that George assures me this causes no problems with any other ports, and is useful to RIM in some improved version of Skia they are working with</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>346899</commentid>
    <comment_count>9</comment_count>
    <who name="George Wright">gwright</who>
    <bug_when>2011-02-07 15:34:50 -0800</bug_when>
    <thetext>(In reply to comment #6)
&gt; For the record, the requirement for a regression test is not any reflection on how good or obvious a fix is, or how silly the original error was.
&gt; 
&gt; I think it’s OK for us to take this change that has no effect with any current configurations and is useful to Google in your work with newer fancier versions of Skia. But in the future, change log should explain why there is no test when you propose a change without a test.

Noted. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>347367</commentid>
    <comment_count>10</comment_count>
      <attachid>81536</attachid>
    <who name="Patrick R. Gansterer">paroga</who>
    <bug_when>2011-02-08 07:45:33 -0800</bug_when>
    <thetext>Comment on attachment 81536
Send correctly sized rects in drawImageBuffer

cq+ as requested by gw280 on IRC</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>347428</commentid>
    <comment_count>11</comment_count>
      <attachid>81536</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2011-02-08 09:06:02 -0800</bug_when>
    <thetext>Comment on attachment 81536
Send correctly sized rects in drawImageBuffer

Clearing flags on attachment: 81536

Committed r77945: &lt;http://trac.webkit.org/changeset/77945&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>347429</commentid>
    <comment_count>12</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2011-02-08 09:06:07 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>81536</attachid>
            <date>2011-02-07 15:09:03 -0800</date>
            <delta_ts>2011-02-08 09:06:01 -0800</delta_ts>
            <desc>Send correctly sized rects in drawImageBuffer</desc>
            <filename>drawImageBuffer.patch</filename>
            <type>text/plain</type>
            <size>2358</size>
            <attacher name="George Wright">gwright</attacher>
            
              <data encoding="base64">Y29tbWl0IGU4MmIxMzE0MGVjMDQ4YmQwN2Y3ZTBiZmMzYWE3Y2UwOWJhMGJkMDYKQXV0aG9yOiBH
ZW9yZ2UgV3JpZ2h0IDxnd3JpZ2h0QHJpbS5jb20+CkRhdGU6ICAgTW9uIEZlYiA3IDE3OjU5OjQw
IDIwMTEgLTA1MDAKCiAgICAgMjAxMS0wMi0wNyAgR2VvcmdlIFdyaWdodCAgPGd3cmlnaHRAcmlt
LmNvbT4KICAgIAogICAgICAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0R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