[webkit-reviews] review granted: [Bug 232225] The script should decide when an image diff passes, not ImageDiff : [Attachment 442462] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 26 04:23:18 PDT 2021


Martin Robinson <mrobinson at webkit.org> has granted Simon Fraser (smfr)
<simon.fraser at apple.com>'s request for review:
Bug 232225: The script should decide when an image diff passes, not ImageDiff
https://bugs.webkit.org/show_bug.cgi?id=232225

Attachment 442462: Patch

https://bugs.webkit.org/attachment.cgi?id=442462&action=review




--- Comment #3 from Martin Robinson <mrobinson at webkit.org> ---
Comment on attachment 442462
  --> https://bugs.webkit.org/attachment.cgi?id=442462
Patch

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

This is a nice change.

> Tools/ImageDiff/ImageDiff.cpp:71
> +    fprintf(stdout, "diff: %01.8f%%\n",
differenceData.percentageDifference);

This is a nice simplification.

> Tools/Scripts/webkitpy/port/image_diff.py:137
> +	       return ImageDiffResult(passed=False, diff_image=None,
difference=0, tolerance=self._tolerance, error_string=err_str or "Failed to
match ImageDiff output %s" % diff_output)

I think using 

   "Failed to match ImageDiff output {}".format(diff_output)

would be better for future-proofing this code against changes to Python.


More information about the webkit-reviews mailing list