[webkit-qt] Reason why webkit does not display graphics from some external Qt plugins

Benjamin Poulain benjamin.poulain at nokia.com
Mon Nov 8 08:25:09 PST 2010


On 11/06/2010 03:30 PM, ext Harri Pasanen wrote:
> After some debugging of webkit internals, I found out that if the external Qt
> plugin does not support Size option, the following code in ImageDecoderQt.cpp
> fails it:
> void ImageDecoderQt::internalDecodeSize()
> {
>      ASSERT(m_reader);
>      // If we have a QSize() something failed
>      QSize size = m_reader->size();
>      if (size.isEmpty()) {
>          setFailed();
>          return clearPointers();
>      }
>      setSize(size.width(), size.height());
> }
> Note that image plugins are not required to provide support for Size option,
> so this seems a bit harsh - but perhaps this is important for performance?

I created a bug report for it: https://bugs.webkit.org/show_bug.cgi?id=49178

It looks like the change was introduced as a smart way to detect errors 
early. The real problem is the interface QImageIOHandler which has no 
effective way to report errors.

Checking the size there is a way to detect early if there was problems 
when reading the headers.

I believe you could work around the issue without too much impact on 
performance. Reporting the failure will only be slightly delayed.

Do you plan to work to patch the problem?
Do not forget to change ImageDecoderQt::isSizeAvailable() to avoid 
infinite loop. A test case would be more than welcome if you change this 


More information about the webkit-qt mailing list