WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
wk2-gst-install-plugins-context.diff (text/plain), 7.24 KB, created by
Carlos Garcia Campos
on 2015-07-20 02:08:35 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Carlos Garcia Campos
Created:
2015-07-20 02:08:35 PDT
Size:
7.24 KB
patch
obsolete
>diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index eceb4eb..77cb7e2 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,13 @@ >+2015-07-20 Carlos Garcia Campos <cgarcia@igalia.com> >+ >+ [GTK] Pass a GstInstallPluginsContext to gst_install_plugins_async >+ https://bugs.webkit.org/show_bug.cgi?id=147103 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * platform/graphics/gstreamer/GUniquePtrGStreamer.h: Allow to use >+ GUniquePtr with GstInstallPluginsContext. >+ > 2015-07-17 Carlos Garcia Campos <cgarcia@igalia.com> > > [GStreamer] Crashes during plugin installation >diff --git a/Source/WebCore/platform/graphics/gstreamer/GUniquePtrGStreamer.h b/Source/WebCore/platform/graphics/gstreamer/GUniquePtrGStreamer.h >index 9bdd266..6939908 100644 >--- a/Source/WebCore/platform/graphics/gstreamer/GUniquePtrGStreamer.h >+++ b/Source/WebCore/platform/graphics/gstreamer/GUniquePtrGStreamer.h >@@ -22,11 +22,13 @@ > #if USE(GSTREAMER) > > #include <gst/gststructure.h> >+#include <gst/pbutils/install-plugins.h> > #include <wtf/glib/GUniquePtr.h> > > namespace WTF { > > WTF_DEFINE_GPTR_DELETER(GstStructure, gst_structure_free) >+WTF_DEFINE_GPTR_DELETER(GstInstallPluginsContext, gst_install_plugins_context_free) > > } > >diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog >index 8c468a6..d8a3e3a 100644 >--- a/Source/WebKit2/ChangeLog >+++ b/Source/WebKit2/ChangeLog >@@ -1,3 +1,27 @@ >+2015-07-20 Carlos Garcia Campos <cgarcia@igalia.com> >+ >+ [GTK] Pass a GstInstallPluginsContext to gst_install_plugins_async >+ https://bugs.webkit.org/show_bug.cgi?id=147103 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This allows PackageKit to properly position the window and make it >+ transient to the web view window. >+ >+ * UIProcess/API/gtk/PageClientImpl.cpp: >+ (WebKit::PageClientImpl::setCursor): Disambiguate Cursor now that >+ we include gtkx.h. >+ (WebKit::PageClientImpl::createGstInstallPluginsContext): Create a >+ new GstInstallPluginsContext and set the web view window XID when >+ running on X11. >+ * UIProcess/API/gtk/PageClientImpl.h: >+ * UIProcess/PageClient.h: >+ * UIProcess/efl/WebViewEfl.h: >+ * UIProcess/gstreamer/WebPageProxyGStreamer.cpp: >+ (WebKit::WebPageProxy::requestInstallMissingMediaPlugins): Use >+ PageClient::createGstInstallPluginsContext() to create a new >+ GstInstallPluginsContext and pass it to gst_install_plugins_async(). >+ > 2015-07-17 Carlos Garcia Campos <cgarcia@igalia.com> > > [GStreamer] Crashes during plugin installation >diff --git a/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp b/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp >index 60d8a0f..5e33a57 100644 >--- a/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp >+++ b/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp >@@ -44,9 +44,14 @@ > #include <WebCore/Cursor.h> > #include <WebCore/EventNames.h> > #include <WebCore/GtkUtilities.h> >+#include <WebCore/PlatformDisplay.h> > #include <wtf/text/CString.h> > #include <wtf/text/WTFString.h> > >+#if PLATFORM(X11) >+#include <gdk/gdkx.h> >+#endif >+ > using namespace WebCore; > > namespace WebKit { >@@ -123,7 +128,7 @@ void PageClientImpl::toolTipChanged(const String&, const String& newToolTip) > webkitWebViewBaseSetTooltipText(WEBKIT_WEB_VIEW_BASE(m_viewWidget), newToolTip.utf8().data()); > } > >-void PageClientImpl::setCursor(const Cursor& cursor) >+void PageClientImpl::setCursor(const WebCore::Cursor& cursor) > { > if (!gtk_widget_get_realized(m_viewWidget)) > return; >@@ -441,4 +446,17 @@ void PageClientImpl::derefView() > g_object_unref(m_viewWidget); > } > >+GUniquePtr<GstInstallPluginsContext> PageClientImpl::createGstInstallPluginsContext() >+{ >+#if PLATFORM(X11) >+ if (PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::X11) { >+ GUniquePtr<GstInstallPluginsContext> context(gst_install_plugins_context_new()); >+ gst_install_plugins_context_set_xid(context.get(), GDK_WINDOW_XID(gtk_widget_get_window(m_viewWidget))); >+ return context; >+ } >+#endif >+ >+ return nullptr; >+} >+ > } // namespace WebKit >diff --git a/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h b/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h >index bc5b635..980ca81 100644 >--- a/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h >+++ b/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h >@@ -138,6 +138,8 @@ private: > virtual void refView() override; > virtual void derefView() override; > >+ virtual GUniquePtr<GstInstallPluginsContext> createGstInstallPluginsContext() override; >+ > // Members of PageClientImpl class > GtkWidget* m_viewWidget; > DefaultUndoController m_undoController; >diff --git a/Source/WebKit2/UIProcess/PageClient.h b/Source/WebKit2/UIProcess/PageClient.h >index 0f8d240..b8894a2 100644 >--- a/Source/WebKit2/UIProcess/PageClient.h >+++ b/Source/WebKit2/UIProcess/PageClient.h >@@ -34,6 +34,10 @@ > #include <WebCore/EditorClient.h> > #include <wtf/Forward.h> > >+#if USE(GSTREAMER) >+#include <WebCore/GUniquePtrGStreamer.h> >+#endif >+ > #if PLATFORM(COCOA) > #include "PluginComplexTextInputState.h" > >@@ -328,6 +332,10 @@ public: > > virtual void refView() = 0; > virtual void derefView() = 0; >+ >+#if USE(GSTREAMER) >+ virtual GUniquePtr<GstInstallPluginsContext> createGstInstallPluginsContext() = 0; >+#endif > }; > > } // namespace WebKit >diff --git a/Source/WebKit2/UIProcess/efl/WebViewEfl.h b/Source/WebKit2/UIProcess/efl/WebViewEfl.h >index ef99118..be17463 100644 >--- a/Source/WebKit2/UIProcess/efl/WebViewEfl.h >+++ b/Source/WebKit2/UIProcess/efl/WebViewEfl.h >@@ -93,6 +93,10 @@ private: > virtual void refView() override final { } > virtual void derefView() override final { } > >+#if USE(GSTREAMER) >+ virtual GUniquePtr<GstInstallPluginsContext> createGstInstallPluginsContext() override final { return nullptr; }; >+#endif >+ > private: > EwkView* m_ewkView; > bool m_hasRequestedFullScreen; >diff --git a/Source/WebKit2/UIProcess/gstreamer/WebPageProxyGStreamer.cpp b/Source/WebKit2/UIProcess/gstreamer/WebPageProxyGStreamer.cpp >index 234ff50..6367f72 100644 >--- a/Source/WebKit2/UIProcess/gstreamer/WebPageProxyGStreamer.cpp >+++ b/Source/WebKit2/UIProcess/gstreamer/WebPageProxyGStreamer.cpp >@@ -26,8 +26,8 @@ > #include "config.h" > #include "WebPageProxy.h" > >+#include "PageClient.h" > #include "WebPageMessages.h" >-#include <gst/pbutils/install-plugins.h> > > namespace WebKit { > >@@ -36,8 +36,8 @@ void WebPageProxy::requestInstallMissingMediaPlugins(const String& details) > CString detail = details.utf8(); > const char* detailArray[2] = { detail.data(), nullptr }; > ref(); >- // FIXME: Use a proper GstInstallPluginsContext instead of nullptr. >- GstInstallPluginsReturn result = gst_install_plugins_async(detailArray, nullptr, [](GstInstallPluginsReturn result, gpointer userData) { >+ GUniquePtr<GstInstallPluginsContext> context = m_pageClient.createGstInstallPluginsContext(); >+ GstInstallPluginsReturn result = gst_install_plugins_async(detailArray, context.get(), [](GstInstallPluginsReturn result, gpointer userData) { > RefPtr<WebPageProxy> page = adoptRef(static_cast<WebPageProxy*>(userData)); > if (page->isValid()) > page->send(Messages::WebPage::DidEndRequestInstallMissingMediaPlugins(static_cast<uint32_t>(result)));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 147103
:
257082
|
257450