Bug 46262 - [Qt] [WebKit2] Workarounds for the flash plugin
Summary: [Qt] [WebKit2] Workarounds for the flash plugin
Status: RESOLVED DUPLICATE of bug 48127
Alias: None
Product: WebKit
Classification: Unclassified
Component: Plug-ins (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-22 07:47 PDT by Balazs Kelemen
Modified: 2010-10-25 09:41 PDT (History)
4 users (show)

See Also:


Attachments
proposed patch (16.72 KB, patch)
2010-09-23 05:52 PDT, Balazs Kelemen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Balazs Kelemen 2010-09-22 07:47:55 PDT
My plan is to organizing the static functions from PluginPackageQt.cpp into a class with static methods.
Comment 1 Balazs Kelemen 2010-09-23 05:07:30 PDT
As I went forward with the implementation I have decided to put the refactoring and the changes that needs to be done in WebKit2 in one patch. That is why I changed the bug title.
Comment 2 Balazs Kelemen 2010-09-23 05:52:34 PDT
Created attachment 68510 [details]
proposed patch
Comment 3 Kenneth Rohde Christiansen 2010-09-23 05:55:53 PDT
Comment on attachment 68510 [details]
proposed patch

Maybe call the class FlashPluginQuirks ?
Comment 4 Balazs Kelemen 2010-09-24 05:57:42 PDT
(In reply to comment #3)
> (From update of attachment 68510 [details])
> Maybe call the class FlashPluginQuirks ?

We use the term quirks in a different meaning: handling less stupid flavour of some plugins. FlashPluginHacks?
Comment 5 Kenneth Rohde Christiansen 2010-09-24 06:01:32 PDT
(In reply to comment #4)
> (In reply to comment #3)
> > (From update of attachment 68510 [details] [details])
> > Maybe call the class FlashPluginQuirks ?
> 
> We use the term quirks in a different meaning: handling less stupid flavour of some plugins. FlashPluginHacks?

I just thought Workarounds to be a bit long :-) what about FlashPluginFixes?
Comment 6 Kenneth Rohde Christiansen 2010-09-24 06:09:25 PDT
Comment on attachment 68510 [details]
proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=68510&action=review

> WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:447
> +#elif PLATFORM(QT)

Won't this be the same for GTK+ etc? Would it break anything having this enabled for all ports?

> WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h:66
> +#if PLATFORM(QT)
> +    WebCore::PluginQuirkSet quirks() const { return m_quirks; }
> +#endif

Shouldn't all platforms support plugin quirks?

> WebKit2/WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp:52
> +    } else if (FlashPluginWorkarounds::isFlashPlugin(pluginPath)) {
> +        // We have already loaded the plugin but initializeGTK
> +        // needs a QLibrary for resolving gtk_init.
> +        QLibrary flashPlugin(pluginPath);
> +        ASSERT(flashPlugin.load());
> +        FlashPluginWorkarounds::initializeGTK(&flashPlugin);

So are we loading it twice?
Comment 7 Andreas Kling 2010-10-06 20:53:13 PDT
Balazs: ping
Comment 8 Balazs Kelemen 2010-10-10 10:00:58 PDT
(In reply to comment #7)
> Balazs: ping

Needs more investigation. I think there is some confusion in the old code paths
(and comments) because not only the flash plugin needs the toolkit value workaround but all npwrappers. In the last 2 weeks I had no time for working on this, hopefully I can finish the patch in the next week.
Comment 9 Balazs Kelemen 2010-10-10 10:04:35 PDT
(In reply to comment #6)
> (From update of attachment 68510 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=68510&action=review
> 
> > WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:447
> > +#elif PLATFORM(QT)
> 
> Won't this be the same for GTK+ etc? Would it break anything having this enabled for all ports?

Right, it should be PLATFORM(UNIX)

> 
> > WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h:66
> > +#if PLATFORM(QT)
> > +    WebCore::PluginQuirkSet quirks() const { return m_quirks; }
> > +#endif
> 
> Shouldn't all platforms support plugin quirks?

Likely. Will be added as common member in the next patch.

> 
> > WebKit2/WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp:52
> > +    } else if (FlashPluginWorkarounds::isFlashPlugin(pluginPath)) {
> > +        // We have already loaded the plugin but initializeGTK
> > +        // needs a QLibrary for resolving gtk_init.
> > +        QLibrary flashPlugin(pluginPath);
> > +        ASSERT(flashPlugin.load());
> > +        FlashPluginWorkarounds::initializeGTK(&flashPlugin);
> 
> So are we loading it twice?

I am almost sure about QLibrary does not load the same plugin twice (if it is even possible) but returns true if it is already loaded.
Comment 10 Balazs Kelemen 2010-10-10 10:05:18 PDT
Comment on attachment 68510 [details]
proposed patch

Needs more investigation.
Comment 11 Balazs Kelemen 2010-10-25 09:41:34 PDT

*** This bug has been marked as a duplicate of bug 48127 ***