Summary: | Public GIF image decoder does not handle disposal of previous frames correctly | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Peter Kasting <pkasting> | ||||||||||||
Component: | Images | Assignee: | Nobody <webkit-unassigned> | ||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||
Severity: | Normal | CC: | alp | ||||||||||||
Priority: | P2 | ||||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||||
Hardware: | PC | ||||||||||||||
OS: | All | ||||||||||||||
Attachments: |
|
Description
Peter Kasting
2007-11-13 17:32:43 PST
Created attachment 17247 [details]
Sample image relying on "not specified" disposal
This image never specifies a disposal method for any of its frames, and relies on that making each frame act like the disposal method was "keep".
Created attachment 17249 [details]
Sample image (1) relying on "clear to previous"
Here's an image that I think relies on "clear to previous" behavior to work right.
Created attachment 17250 [details]
Sample image (2) relying on "clear to previous"
...and another.
Firefox, IE and Safari all display both these images fine. I need to verify exactly what the clearing behavior in the files is, though.
I lied, I don't think Mozilla treats "clear to previous" as "clear to background color". I was misinterpreting their code. I think everybody else actually gets this right according to the spec. Created attachment 17320 [details]
patch v1
This patch makes all the above attached images work correctly. It also calls ensureHeight() in a more consistent way (we don't ensureHeight(m_size.height()) on some frames before decoding anything the way we did before) and calls setHasAlpha() correctly (although a bit conservatively -- we might claim to have alpha when we don't, but never the other way), which was trickier with the new initialization code.
Comment on attachment 17320 [details]
patch v1
r=me
I had to roll this out as it caused a bunch of build failures in the ports using this class. Peter, If you need some help integrating your modified GIF API into other ports, please do ask and I'll be happy to take a look. (In reply to comment #9) > If you need some help integrating your modified GIF API into other ports, > please do ask and I'll be happy to take a look. If you have the ability to build various other ports, help would be very appreciated. Feel free to post an updated patch. Otherwise, I will try to get to writing patches that cover the other ports as well in the next few days (although I don't have the ability to build them to test). Created attachment 17541 [details]
patch v2
This attempts to fix build bustage problems.
Landed in r28068. |