RESOLVED FIXED 58387
make PrettyPatch.rb aware of checksums in png files
https://bugs.webkit.org/show_bug.cgi?id=58387
Summary make PrettyPatch.rb aware of checksums in png files
Tony Chang
Reported 2011-04-12 15:54:19 PDT
make PrettyPatch.rb aware of checksums in png files
Attachments
Patch (4.20 KB, patch)
2011-04-12 15:55 PDT, Tony Chang
no flags
git example (38.19 KB, text/html)
2011-04-12 15:55 PDT, Tony Chang
no flags
add nil checks (4.46 KB, patch)
2011-04-14 10:46 PDT, Tony Chang
no flags
Tony Chang
Comment 1 2011-04-12 15:55:09 PDT
Tony Chang
Comment 2 2011-04-12 15:55:56 PDT
Created attachment 89290 [details] git example
Tony Chang
Comment 3 2011-04-12 15:59:02 PDT
I don't actually know ruby, so let me know if I'm doing something weird.
Adam Roben (:aroben)
Comment 4 2011-04-13 05:55:00 PDT
Comment on attachment 89289 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=89289&action=review > Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:544 > + @image_urls = binary_contents.collect do |content| > + "data:image/png;base64," + [content].pack("m") > + end > + > + @image_checksums = binary_contents.collect do |content| > + FileDiff.read_checksum_from_png(content) > + end These might read a little better if you used block syntax: @image_urls = binary_contents.collect { |content| "data:image/png;base64," + [content].pack("m") }
Tony Chang
Comment 5 2011-04-13 11:04:41 PDT
Simon Fraser (smfr)
Comment 6 2011-04-13 22:02:35 PDT
This caused bug 58510. I'm going to back it out.
Tony Chang
Comment 7 2011-04-14 10:46:05 PDT
Created attachment 89606 [details] add nil checks
Tony Chang
Comment 8 2011-04-14 10:48:02 PDT
Note You need to log in before you can comment on or make changes to this bug.