[Webkit-unassigned] [Bug 32196] [Qt] createPlugin() should decide whether Qt Plugins can be created when pluginsEnabled is false

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 8 07:21:05 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=32196


Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #44363|review?                     |review-
               Flag|                            |




--- Comment #3 from Darin Adler <darin at apple.com>  2009-12-08 07:21:05 PST ---
(From update of attachment 44363)
This patch should be written in a more platform-independent fashion with fewer
#if statements.

> +#include <wtf/Platform.h>

There's no need to add this include. Platform.h is already included, as you can
tell from the use of the #if ENABLE in the file. It's almost never necessary to
add new includes of Platform.h.

> -        if (!settings || !settings->arePluginsEnabled() || 
> +        if (!settings ||
> +#if PLATFORM(QT)
> +           // Qt clients 'disable' Qt plugins by not implementing them
> +           (!settings->arePluginsEnabled() && !MIMETypeRegistry::isQtPluginMIMEType(mimeType)) ||
> +#else
> +           !settings->arePluginsEnabled() ||
> +#endif

Instead of calling this isQtPluginMIMEType, it should be isClientPluginMIMEType
and should be called on all platforms. On non-Qt ones it can just return false.

> +#include <wtf/Platform.h>

No need for this.

> +#if PLATFORM(QT)
> +    // Check to see if a mime type is a valid Java applet mime type
> +    static bool isQtPluginMIMEType(const String& mimeType);
> +#endif

Comment here is wrong (copied from Java).

Then we need versions of isClientPluginMIMEType that return false on all the
non-Qt platforms.

I'm not sure "client plug-in" is the best name for this concept, so you can use
a better one if you can think of it.

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



More information about the webkit-unassigned mailing list