[Webkit-unassigned] [Bug 15974] New: Public GIF image decoder does not handle disposal of previous frames correctly

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 13 17:32:44 PST 2007


http://bugs.webkit.org/show_bug.cgi?id=15974

           Summary: Public GIF image decoder does not handle disposal of
                    previous frames correctly
           Product: WebKit
           Version: 525+ (Nightly build)
          Platform: PC
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: Images
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: zerodpx at gmail.com


GIFImageDecoder.cpp (not used by Safari, but used by the Cairo/Qt ports) does
not correctly deal with disposal of previous frames in a multi-frame GIF.

GIFs can specify four disposal methods for a frame: "not specified", "keep",
"clear to background color", and "clear to previous".  There are multiple
issues:
* GIFImageReader doesn't provide the disposal method to GIFImageDecoder.cpp,
just a flag indicating whether or not the method was "keep".  This makes it
impossible to distinguish the two clear methods, and more noticeably, treats
"not specified" like a clear method.  Mozilla, IE, and Safari, by contrast,
treat "not specified" as "keep", and at least some GIFs on the web rely on this
(example to be attached after filing).
* When clearing, the code in GIFImageDecoder.cpp:initFrameBuffer() reverts to
the contents of frame 0, which is not the same as either of the clear methods
in the spec.  By contrast, Mozilla treats both clear methods like "clear to
background color".  I don't know what IE or Safari do or what actual images
rely on.

I think the right fix here is to change RGBA32Buffer's "includeInNextFrame()"
method (which is only used by the GIF decoder) to instead return an actual
disposal method, have GIFImageReader provide the true disposal method, and then
fix initFrameBuffer() to respect this method.  I don't know whether "clear to
previous" should be treated like "clear to background color" (as Mozilla does)
or made to follow the GIF spec.  Input welcome.


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



More information about the webkit-unassigned mailing list