RESOLVED DUPLICATE of bug 33044 36902
[Qt] Patch to allow java applet support through QWebPluginFactory...
https://bugs.webkit.org/show_bug.cgi?id=36902
Summary [Qt] Patch to allow java applet support through QWebPluginFactory...
Dawit A.
Reported 2010-03-31 14:20:08 PDT
Created attachment 52210 [details] Java applet support through QWebPluginFactory::create I Currently java applet support is not implemented in QtWebKit. Additionally the request to create a JavaApplet widget simply calls notImplemented() and returns a NULL. See the "createJavaAppletWidget" function under WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp. Unfortunately, this makes it impossible for client level applications to provide their own Java applet support by re-implementing QWebPluginFactory like they can for other plugins such as flash. The attached patch attempts to address this issue by simply making it possible for client applications to handle java applets through QWebPluginFactory::create(...) function.
Attachments
Java applet support through QWebPluginFactory::create I (2.31 KB, patch)
2010-03-31 14:20 PDT, Dawit A.
hausmann: review-
Dawit A.
Comment 1 2010-04-03 14:47:05 PDT
Though this bug report is about for letting client applications handle java applet support if they so choose, bug #33044 is its cousin report ; so it is linked to here for reference...
Simon Hausmann
Comment 2 2010-04-07 07:06:56 PDT
Comment on attachment 52210 [details] Java applet support through QWebPluginFactory::create I > diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog > index 3a4b096..f811546 100644 > --- a/WebKit/qt/ChangeLog > +++ b/WebKit/qt/ChangeLog > @@ -1,3 +1,14 @@ > +2010-03-31 Dawit Alemayehu <adawit@kde.org> > + > + Reviewed by NOBODY (OOPS!). > + > + Allow java applet support to be implemented through > + QWebPluginFactory. Please include a link to the bugzilla entry in the ChangeLog entry :) > + * WebCoreSupport/FrameLoaderClientQt.cpp: > + (WebCore::FrameLoaderClientQt::createPlugin): > + (WebCore::FrameLoaderClientQt::createJavaAppletWidget): > + > 2010-03-26 Kenneth Rohde Christiansen <kenneth@webkit.org> > > Reviewed by Antti Koivisto. > diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp > index c5c5739..b0ff002 100644 > --- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp > +++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp > @@ -1340,9 +1340,11 @@ PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize, > } > } > > - RefPtr<PluginView> pluginView = PluginView::create(m_frame, pluginSize, element, url, > - params, values, mimeType, loadManually); > - return pluginView; > + if (mimeType != "application/x-java-applet") { > + RefPtr<PluginView> pluginView = PluginView::create(m_frame, pluginSize, element, url, params, values, mimeType, loadManually); > + if (pluginView->status() == PluginStatusLoadedSuccessfully) > + return pluginView; > + } This part looks incorrect to me. Why are you avoiding the calls to PluginView::create? I thought especially on platforms where the Java support comes through an NPAPI plugin - see Bug #33044 - AFAICS that call is needed. > return 0; > @@ -1355,11 +1357,10 @@ void FrameLoaderClientQt::redirectDataToPlugin(Widget* pluginWidget) > m_hasSentResponseToPlugin = false; > } > > -PassRefPtr<Widget> FrameLoaderClientQt::createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL&, > - const Vector<String>&, const Vector<String>&) > +PassRefPtr<Widget> FrameLoaderClientQt::createJavaAppletWidget(const IntSize& pluginSize, HTMLAppletElement* element, const KURL& baseURL, > + const Vector<String>& paramNames, const Vector<String>& paramValues) > { > - notImplemented(); > - return 0; > + return FrameLoaderClientQt::createPlugin(pluginSize, element, baseURL, paramNames, paramValues, "application/x-java-applet", false); > } I'm fine with this part of the patch :)
Dawit A.
Comment 3 2010-04-07 07:19:22 PDT
(In reply to comment #2) > (From update of attachment 52210 [details]) > > diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog > > index 3a4b096..f811546 100644 > > --- a/WebKit/qt/ChangeLog > > +++ b/WebKit/qt/ChangeLog > > @@ -1,3 +1,14 @@ > > +2010-03-31 Dawit Alemayehu <adawit@kde.org> > > + > > + Reviewed by NOBODY (OOPS!). > > + > > + Allow java applet support to be implemented through > > + QWebPluginFactory. > > Please include a link to the bugzilla entry in the ChangeLog entry :) Oops, forgot that! > > + * WebCoreSupport/FrameLoaderClientQt.cpp: > > + (WebCore::FrameLoaderClientQt::createPlugin): > > + (WebCore::FrameLoaderClientQt::createJavaAppletWidget): > > + > > 2010-03-26 Kenneth Rohde Christiansen <kenneth@webkit.org> > > > > Reviewed by Antti Koivisto. > > diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp > > index c5c5739..b0ff002 100644 > > --- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp > > +++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp > > @@ -1340,9 +1340,11 @@ PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize, > > } > > } > > > > - RefPtr<PluginView> pluginView = PluginView::create(m_frame, pluginSize, element, url, > > - params, values, mimeType, loadManually); > > - return pluginView; > > + if (mimeType != "application/x-java-applet") { > > + RefPtr<PluginView> pluginView = PluginView::create(m_frame, pluginSize, element, url, params, values, mimeType, loadManually); > > + if (pluginView->status() == PluginStatusLoadedSuccessfully) > > + return pluginView; > > + } > > This part looks incorrect to me. Why are you avoiding the calls to > PluginView::create? > > I thought especially on platforms where the Java support comes through an > NPAPI plugin - see Bug #33044 - AFAICS that call is needed. That was because without applying the patch specified in #33044, actually the patch it depends on #3, that call will result in a SEGFAULT. To be honest there is really no need for this bug report as 33044 already exists and can be used to track Java applet support better... > > return 0; > > @@ -1355,11 +1357,10 @@ void FrameLoaderClientQt::redirectDataToPlugin(Widget* pluginWidget) > > m_hasSentResponseToPlugin = false; > > } > > > > -PassRefPtr<Widget> FrameLoaderClientQt::createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL&, > > - const Vector<String>&, const Vector<String>&) > > +PassRefPtr<Widget> FrameLoaderClientQt::createJavaAppletWidget(const IntSize& pluginSize, HTMLAppletElement* element, const KURL& baseURL, > > + const Vector<String>& paramNames, const Vector<String>& paramValues) > > { > > - notImplemented(); > > - return 0; > > + return FrameLoaderClientQt::createPlugin(pluginSize, element, baseURL, paramNames, paramValues, "application/x-java-applet", false); > > } > > I'm fine with this part of the patch :) *** This bug has been marked as a duplicate of bug 33044 ***
Note You need to log in before you can comment on or make changes to this bug.