Bug 29506

Summary: PrettyPatch should show images even when they have the wrong mime type
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: aroben
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Patch v1 aroben: review+

Eric Seidel (no email)
Reported 2009-09-18 14:38:24 PDT
PrettyPatch should show images even when they have the wrong mime type It seems very common for windows svn users to upload png files with the wrong mime type: https://bugs.webkit.org/attachment.cgi?id=39787&action=prettypatch PrettyPatch's image display code ignores them because the're application/octetstream instead of image/png. We should make PrettyPatch smarter. It should see that the file name ends in .png and pretend it's an image anyway.
Attachments
Patch v1 (2.18 KB, patch)
2009-10-23 16:10 PDT, Eric Seidel (no email)
aroben: review+
Eric Seidel (no email)
Comment 1 2009-10-23 16:10:16 PDT
Created attachment 41760 [details] Patch v1
Adam Roben (:aroben)
Comment 2 2009-10-25 08:32:29 PDT
Comment on attachment 41760 [details] Patch v1 It seems a little strange for has_image_suffix to be an instance method of the FileDiff class. It would probably be better as a method of String or just in the private section of the PrettyPatch module. r=me
Eric Seidel (no email)
Comment 3 2009-10-26 11:36:16 PDT
Landed as r50077.
Eric Seidel (no email)
Comment 4 2009-10-26 11:45:24 PDT
I moved it to the private section of PrettyPatch per your suggestion.
Note You need to log in before you can comment on or make changes to this bug.