From 451074a7e0e7bb7bf02e27ddad528163c5a843aa Mon Sep 17 00:00:00 2001 From: Philippe Normand Date: Fri, 18 Jan 2019 13:28:45 +0000 Subject: [PATCH] wpesrc: Implement webview background configuration support --- ext/wpe/WPEThreadedView.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ext/wpe/WPEThreadedView.cpp b/ext/wpe/WPEThreadedView.cpp index 928e7e0..7770163 100644 --- a/ext/wpe/WPEThreadedView.cpp +++ b/ext/wpe/WPEThreadedView.cpp @@ -371,11 +371,13 @@ void WPEThreadedView::loadUri(const gchar* uri) void WPEThreadedView::setDrawBackground(gboolean drawsBackground) { -#if 1 - // See https://bugs.webkit.org/show_bug.cgi?id=192305 - GST_FIXME("set_draws_background API not upstream yet"); +#if WEBKIT_CHECK_VERSION(2, 23, 0) + GST_DEBUG("%s background rendering", drawsBackground ? "Enabling" : "Disabling"); + WebKitColor color; + webkit_color_parse(&color, drawsBackground ? "white" : "transparent"); + webkit_web_view_set_background_color(webkit.view, &color); #else - webkit_web_view_set_draws_background(webkit.view, drawsBackground); + GST_FIXME("webkit_web_view_set_background_color is not implemented in WPE %u.%u. Please upgrade to 2.24", webkit_get_major_version(), webkit_get_minor_version()); #endif } -- 2.7.4