QImageReader only allows retrieving the format() before having read the image. (See http://doc.trolltech.com/4.6/qimagereader.html#format for more information.) The most obvious symptom of this bug is a failing assertion when attempting to click-and-drag an image: ASSERTION FAILED: !image->filenameExtension().isEmpty() (../../../WebCore/page/DragController.cpp:675 bool WebCore::DragController::startDrag(WebCore::Frame*, WebCore::Clipboard*, WebCore::DragOperation, const WebCore::PlatformMouseEvent&, const WebCore::IntPoint&, bool))
Created attachment 44680 [details] Retrieve the format immediately after creating the QImageReader
style-queue ran check-webkit-style on attachment 44680 [details] without any errors.
Comment on attachment 44680 [details] Retrieve the format immediately after creating the QImageReader r=me Holger, would be great if you could double-check it, too. But from all I can see this seems like a safe thing to do. Calling format() will only initialize the handler (which we need to do anyway), but otherwise retrieving the format doesn't trigger any of the expensive decoding work. We _could_ also do the initHandler() part on demand. But right now this patch seems safe and it fixes a failing assertion (crash) in the DragController when dragging images. (the assertion being that the format must be non-empty)
Comment on attachment 44680 [details] Retrieve the format immediately after creating the QImageReader Clearing flags on attachment: 44680 Committed r51983: <http://trac.webkit.org/changeset/51983>
All reviewed patches have been landed. Closing bug.