[Webkit-unassigned] [Bug 28457] PrettyPatch tries to show images for deleted files

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 19 09:50:16 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=28457





--- Comment #5 from Adam Roben (:aroben) <aroben at apple.com>  2011-04-19 09:50:16 PST ---
(From update of attachment 90204)
View in context: https://bugs.webkit.org/attachment.cgi?id=90204&action=review

> Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:558
> +        def image_to_html
> +            str = ""
> +            if @image_url then
>                  if @image_checksum then
>                      str += "<p>" + @image_checksum + "</p>"
>                  end
>                  str += "<img class='image' src='" + @image_url + "' />"
> +            else
> +                str += "<span class='text'>Image file removed</span>"
> +            end
> +            str
> +        end

Instead of appending to an empty string and then returning it at the end, how about just 'return "this is the string we want"' in each case?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list