[webkit-qt] How to create information about plugins database?

Michal G. guziemic.spam at gmail.com
Mon Mar 5 05:32:37 PST 2012


Hi All,

I am trying to utilize WebKit as an engine for web browser that will work
on my embedded device. On my device, I am not going to use NPAPI. Thus, I
going to create plugins with use of QWebPluginFactory. And I had a problem
with plugin creation. All installed plugins should be visible under
window.navigator.plugins, but there was noting. I started to dig for
problem root cause and I found that within
WebPlatformStrategies::getPluginInfo there is a bug or some flow that I do
not understand. So, first IF condition checks for internal plugins and adds
it to output vector 'outPlugins'. Then PluginDatabase is called and
outPlugins vector is resized. But original code just resize it to size
returned by PluginDatabse (plugins). It does not take into account previous
plugins. Next in FOR loop plugins are appended to 'outPlugins' vector.

original code extract: outPlugins.resize(plugins.size());

In my case I have zero plugins in database, so vector is resized to zero
size. This operation just erase all information about plugins returned from
QWebPluginFactory. In my opinion, this is a mistake and this line should
look following.

code example: outPlugins.resize(plugins.size() + outPlugins.size());

What do you think about that?

Best regards,
Michal Guzieniuk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-qt/attachments/20120305/2c1a53cb/attachment.html>


More information about the webkit-qt mailing list