<?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>66299</bug_id>
          
          <creation_ts>2011-08-16 07:05:36 -0700</creation_ts>
          <short_desc>[Qt] ImageDiff does not consider --tolerance</short_desc>
          <delta_ts>2011-08-22 08:19:34 -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>Layout and Rendering</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, QtTriaged</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Balazs Kelemen">kbalazs</reporter>
          <assigned_to name="Balazs Kelemen">kbalazs</assigned_to>
          <cc>ossy</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>451590</commentid>
    <comment_count>0</comment_count>
    <who name="Balazs Kelemen">kbalazs</who>
    <bug_when>2011-08-16 07:05:36 -0700</bug_when>
    <thetext>The way I propose in the following to reproduce this is depend on the patch in #66283.

Run &quot;Tools/Scripts/run-webkit-tests -p --tolerance 2 -2 LayoutTests/animations/missing-values-first-keyframe.html&quot;
Result: expectation failure with a diff image that looks like full black.
Expected result: pass</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>451592</commentid>
    <comment_count>1</comment_count>
      <attachid>104035</attachid>
    <who name="Balazs Kelemen">kbalazs</who>
    <bug_when>2011-08-16 07:10:27 -0700</bug_when>
    <thetext>Created attachment 104035
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>454555</commentid>
    <comment_count>2</comment_count>
      <attachid>104035</attachid>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2011-08-22 06:14:05 -0700</bug_when>
    <thetext>Comment on attachment 104035
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=104035&amp;action=review

&gt; Tools/DumpRenderTree/qt/ImageDiff.cpp:128
&gt; +                if (!difference)
&gt; +                    fprintf(stdout, &quot;diff: %01.2f%% passed\n&quot;, 0.0);
&gt; +                else {

Good catch, thanks for the fix.

- I think (difference==0) would be more talkative.
- Modifying difference to 0.0 is unnecessary. All ports use this copy/paste code. :)

r=me with these changes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>454582</commentid>
    <comment_count>3</comment_count>
    <who name="Balazs Kelemen">kbalazs</who>
    <bug_when>2011-08-22 07:17:55 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 104035 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=104035&amp;action=review
&gt; 
&gt; &gt; Tools/DumpRenderTree/qt/ImageDiff.cpp:128
&gt; &gt; +                if (!difference)
&gt; &gt; +                    fprintf(stdout, &quot;diff: %01.2f%% passed\n&quot;, 0.0);
&gt; &gt; +                else {
&gt; 
&gt; Good catch, thanks for the fix.
&gt; 
&gt; - I think (difference==0) would be more talkative.

Personally I agree but &apos;== 0&apos; is not WebKit style.

&gt; - Modifying difference to 0.0 is unnecessary. All ports use this copy/paste code. :)

But than how could I test it in the if?

&gt; 
&gt; r=me with these changes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>454595</commentid>
    <comment_count>4</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2011-08-22 07:35:16 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt;&gt; - I think (difference==0) would be more talkative.
&gt; Personally I agree but &apos;== 0&apos; is not WebKit style.
Ooops, you&apos;re right. Negating a double value is strange for me, but it works. :)
So use !difference to make style bot happy. ;)

&gt; But than how could I test it in the if?
I meant the printf line.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>454608</commentid>
    <comment_count>5</comment_count>
    <who name="Balazs Kelemen">kbalazs</who>
    <bug_when>2011-08-22 08:17:29 -0700</bug_when>
    <thetext>Committed r93509: &lt;http://trac.webkit.org/changeset/93509&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>104035</attachid>
            <date>2011-08-16 07:10:27 -0700</date>
            <delta_ts>2011-08-22 08:19:34 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-66299-20110816141025.patch</filename>
            <type>text/plain</type>
            <size>1467</size>
            <attacher name="Balazs Kelemen">kbalazs</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogOTMwNDQKZGlmZiAtLWdpdCBhL1Rvb2xzL0NoYW5nZUxvZyBi
L1Rvb2xzL0NoYW5nZUxvZwppbmRleCA2NjgwNmE4Mjg4YzIxNmZiMjQ4NDZlOTZiN2QxZTcyODA2
ZDJiZWQ2Li4yN2I0MWYyOTA2MzIxMGQ0YTY0NzkyOWY3ZGQxMTMxMjIyOTZkNGIyIDEwMDY0NAot
LS0gYS9Ub29scy9DaGFuZ2VMb2cKKysrIGIvVG9vbHMvQ2hhbmdlTG9nCkBAIC0xLDUgKzEsMTUg
QEAKIDIwMTEtMDgtMTYgIEJhbGF6cyBLZWxlbWVuICA8a2JhbGF6c0B3ZWJraXQub3JnPgogCisg
ICAgICAgIFtRdF0gSW1hZ2VEaWZmIGRvZXMgbm90IGNvbnNpZGVyIC0tdG9sZXJhbmNlCisgICAg
ICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD02NjI5OQorCisgICAg
ICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgIC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AgICAgICBmcHJp
bnRmKHN0ZG91dCwgImRpZmY6ICUwMS4yZiUlIHBhc3NlZFxuIiwgMC4wKTsKKyAgICAgICAgICAg
ICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgUUJ1ZmZlciBidWZmZXI7CiAgICAgICAg
ICAgICAgICAgICAgIGJ1ZmZlci5vcGVuKFFCdWZmZXI6OldyaXRlT25seSk7CiAgICAgICAgICAg
ICAgICAgICAgIGRpZmZJbWFnZS5zYXZlKCZidWZmZXIsICJQTkciKTsK
</data>

          </attachment>
      

    </bug>

</bugzilla>