Title: [187941] releases/WebKitGTK/webkit-2.8/Source
Revision
187941
Author
carlo...@webkit.org
Date
2015-08-05 00:17:59 -0700 (Wed, 05 Aug 2015)

Log Message

Merge r187432 - [GTK] Pass a GstInstallPluginsContext to gst_install_plugins_async
https://bugs.webkit.org/show_bug.cgi?id=147103

Reviewed by Philippe Normand.

Source/WebCore:

* platform/graphics/gstreamer/GUniquePtrGStreamer.h: Allow to use
GUniquePtr with GstInstallPluginsContext.

Source/WebKit2:

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().

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog (187940 => 187941)


--- releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog	2015-08-05 06:04:41 UTC (rev 187940)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog	2015-08-05 07:17:59 UTC (rev 187941)
@@ -1,3 +1,13 @@
+2015-07-27  Carlos Garcia Campos  <cgar...@igalia.com>
+
+        [GTK] Pass a GstInstallPluginsContext to gst_install_plugins_async
+        https://bugs.webkit.org/show_bug.cgi?id=147103
+
+        Reviewed by Philippe Normand.
+
+        * platform/graphics/gstreamer/GUniquePtrGStreamer.h: Allow to use
+        GUniquePtr with GstInstallPluginsContext.
+
 2015-07-24  Carlos Garcia Campos  <cgar...@igalia.com>
 
         [GStreamer] Crashes during plugin installation

Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/platform/graphics/gstreamer/GUniquePtrGStreamer.h (187940 => 187941)


--- releases/WebKitGTK/webkit-2.8/Source/WebCore/platform/graphics/gstreamer/GUniquePtrGStreamer.h	2015-08-05 06:04:41 UTC (rev 187940)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/platform/graphics/gstreamer/GUniquePtrGStreamer.h	2015-08-05 07:17:59 UTC (rev 187941)
@@ -22,11 +22,13 @@
 #if USE(GSTREAMER)
 
 #include <gst/gststructure.h>
+#include <gst/pbutils/install-plugins.h>
 #include <wtf/gobject/GUniquePtr.h>
 
 namespace WTF {
 
 WTF_DEFINE_GPTR_DELETER(GstStructure, gst_structure_free)
+WTF_DEFINE_GPTR_DELETER(GstInstallPluginsContext, gst_install_plugins_context_free)
 
 }
 

Modified: releases/WebKitGTK/webkit-2.8/Source/WebKit2/ChangeLog (187940 => 187941)


--- releases/WebKitGTK/webkit-2.8/Source/WebKit2/ChangeLog	2015-08-05 06:04:41 UTC (rev 187940)
+++ releases/WebKitGTK/webkit-2.8/Source/WebKit2/ChangeLog	2015-08-05 07:17:59 UTC (rev 187941)
@@ -1,3 +1,27 @@
+2015-07-27  Carlos Garcia Campos  <cgar...@igalia.com>
+
+        [GTK] Pass a GstInstallPluginsContext to gst_install_plugins_async
+        https://bugs.webkit.org/show_bug.cgi?id=147103
+
+        Reviewed by Philippe Normand.
+
+        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-24  Anders Carlsson  <ander...@apple.com>
 
         Networking process crash in NetworkConnectionToWebProcess::convertMainResourceLoadToDownload while attempting to download a blob

Modified: releases/WebKitGTK/webkit-2.8/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp (187940 => 187941)


--- releases/WebKitGTK/webkit-2.8/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp	2015-08-05 06:04:41 UTC (rev 187940)
+++ releases/WebKitGTK/webkit-2.8/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp	2015-08-05 07:17:59 UTC (rev 187941)
@@ -47,6 +47,11 @@
 #include <wtf/text/CString.h>
 #include <wtf/text/WTFString.h>
 
+#if PLATFORM(X11)
+#include <gdk/gdkx.h>
+#undef KeyPress
+#endif
+
 using namespace WebCore;
 
 namespace WebKit {
@@ -132,7 +137,7 @@
     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;
@@ -427,4 +432,19 @@
 {
 }
 
+#if ENABLE(VIDEO)
+GUniquePtr<GstInstallPluginsContext> PageClientImpl::createGstInstallPluginsContext()
+{
+#if PLATFORM(X11)
+    if (GDK_IS_X11_DISPLAY(gdk_display_manager_get_default_display(gdk_display_manager_get()))) {
+        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;
+}
+#endif
+
 } // namespace WebKit

Modified: releases/WebKitGTK/webkit-2.8/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h (187940 => 187941)


--- releases/WebKitGTK/webkit-2.8/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h	2015-08-05 06:04:41 UTC (rev 187940)
+++ releases/WebKitGTK/webkit-2.8/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h	2015-08-05 07:17:59 UTC (rev 187941)
@@ -136,6 +136,10 @@
 
     virtual void doneWithTouchEvent(const NativeWebTouchEvent&, bool wasEventHandled) override;
 
+#if ENABLE(VIDEO)
+    virtual GUniquePtr<GstInstallPluginsContext> createGstInstallPluginsContext() override;
+#endif
+
     // Members of PageClientImpl class
     GtkWidget* m_viewWidget;
     DefaultUndoController m_undoController;

Modified: releases/WebKitGTK/webkit-2.8/Source/WebKit2/UIProcess/PageClient.h (187940 => 187941)


--- releases/WebKitGTK/webkit-2.8/Source/WebKit2/UIProcess/PageClient.h	2015-08-05 06:04:41 UTC (rev 187940)
+++ releases/WebKitGTK/webkit-2.8/Source/WebKit2/UIProcess/PageClient.h	2015-08-05 07:17:59 UTC (rev 187941)
@@ -34,6 +34,10 @@
 #include <WebCore/EditorClient.h>
 #include <wtf/Forward.h>
 
+#if ENABLE(VIDEO) && USE(GSTREAMER)
+#include <WebCore/GUniquePtrGStreamer.h>
+#endif
+
 #if PLATFORM(COCOA)
 #include "PluginComplexTextInputState.h"
 
@@ -315,6 +319,10 @@
 #if PLATFORM(MAC)
     virtual void didPerformActionMenuHitTest(const ActionMenuHitTestResult&, bool forImmediateAction, API::Object*) = 0;
 #endif
+
+#if ENABLE(VIDEO) && USE(GSTREAMER)
+    virtual GUniquePtr<GstInstallPluginsContext> createGstInstallPluginsContext() = 0;
+#endif
 };
 
 } // namespace WebKit

Modified: releases/WebKitGTK/webkit-2.8/Source/WebKit2/UIProcess/gstreamer/WebPageProxyGStreamer.cpp (187940 => 187941)


--- releases/WebKitGTK/webkit-2.8/Source/WebKit2/UIProcess/gstreamer/WebPageProxyGStreamer.cpp	2015-08-05 06:04:41 UTC (rev 187940)
+++ releases/WebKitGTK/webkit-2.8/Source/WebKit2/UIProcess/gstreamer/WebPageProxyGStreamer.cpp	2015-08-05 07:17:59 UTC (rev 187941)
@@ -28,8 +28,8 @@
 
 #if ENABLE(VIDEO) && USE(GSTREAMER)
 
+#include "PageClient.h"
 #include "WebPageMessages.h"
-#include <gst/pbutils/install-plugins.h>
 
 namespace WebKit {
 
@@ -38,8 +38,8 @@
     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)));
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to