mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
extra/webkit2gtk to 2.42.1-2
This commit is contained in:
parent
607a2b712c
commit
ce62bd345b
4 changed files with 195 additions and 7 deletions
|
@ -1,7 +1,7 @@
|
|||
pkgbase = webkit2gtk
|
||||
pkgdesc = Web content engine for GTK
|
||||
pkgver = 2.42.1
|
||||
pkgrel = 1
|
||||
pkgrel = 2
|
||||
url = https://webkitgtk.org
|
||||
arch = x86_64
|
||||
license = custom
|
||||
|
@ -67,15 +67,18 @@ pkgbase = webkit2gtk
|
|||
depends = zlib
|
||||
source = https://webkitgtk.org/releases/webkitgtk-2.42.1.tar.xz
|
||||
source = https://webkitgtk.org/releases/webkitgtk-2.42.1.tar.xz.asc
|
||||
source = webkitgtk-MiniBrowser-fullscreen.patch::https://github.com/WebKit/WebKit/commit/e07345343415dd2496edc721daa61a3b42703131.patch
|
||||
source = GTK-MiniBrowser-should-hide-the-toolbar-when-using-full-screen.patch
|
||||
source = GTK-Disable-DMABuf-renderer-for-NVIDIA-proprietary-drivers.patch
|
||||
validpgpkeys = D7FCF61CF9A2DEAB31D81BD3F3D322D0EC4582C3
|
||||
validpgpkeys = 5AA3BC334FD7E3369E7C77B291C559DBE4C9123B
|
||||
sha256sums = 6f41fac9989d3ee51c08c48de1d439cdeddecbc757e34b6180987d99b16d2499
|
||||
sha256sums = SKIP
|
||||
sha256sums = a921d6be1303e9f23474971f381886fd291ec5bb1a7ff1e85acede8cfb88bef2
|
||||
sha256sums = 655f3b2c96355ac83c4fa1fc6048e3256bbfdbfb9727e1e18c5af12613536206
|
||||
b2sums = c6453cf2d15661507df66c5478e7675217b62d9579cf9b9408cb3e4fa1a8405c5c2608edf0960baed62aafa766e6cdbe2f0c07e8fb728d86c111f12d5a816492
|
||||
b2sums = SKIP
|
||||
b2sums = d440d82c769f1b35caf5464dc850cdf1c896224205c90c17d8b0a44aee62e4b1383e11306936aaca067fde8836770d346d5122d7b05c91a5c7c1741c89c65e2f
|
||||
b2sums = daa782d4d40cc12a05c02b2494e879333f66f32820f1a1b89b7ab68f62fd53043b116ecb5ef476004095a7c7b924b12695b7e87e21dd547f66e72fa02a972f0d
|
||||
|
||||
pkgname = webkit2gtk
|
||||
depends = at-spi2-core
|
||||
|
|
|
@ -0,0 +1,76 @@
|
|||
From 745633e606ca70bf926545149beed35aab6450b7 Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Garcia Campos <cgarcia@igalia.com>
|
||||
Date: Wed, 4 Oct 2023 10:19:28 +0200
|
||||
Subject: [PATCH] [GTK] Disable DMABuf renderer for NVIDIA proprietary drivers
|
||||
https://bugs.webkit.org/show_bug.cgi?id=262607
|
||||
|
||||
Reviewed by NOBODY (OOPS!).
|
||||
|
||||
Some NVIDIA users are reporting nothing is rendered, so let's just
|
||||
disable the DMA-BUF renderer until we figure out how to make it work.
|
||||
|
||||
* Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp:
|
||||
(WebKit::isNVIDIA):
|
||||
(WebKit::AcceleratedBackingStoreDMABuf::rendererBufferMode):
|
||||
---
|
||||
.../gtk/AcceleratedBackingStoreDMABuf.cpp | 28 +++++++++++++++++++
|
||||
1 file changed, 28 insertions(+)
|
||||
|
||||
diff --git a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp
|
||||
index 9c0f5efdfb0e3..a03842e15db0e 100644
|
||||
--- a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp
|
||||
+++ b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp
|
||||
@@ -38,11 +38,13 @@
|
||||
#include <WebCore/GLContext.h>
|
||||
#include <WebCore/IntRect.h>
|
||||
#include <WebCore/PlatformDisplay.h>
|
||||
+#include <WebCore/PlatformDisplaySurfaceless.h>
|
||||
#include <epoxy/egl.h>
|
||||
#include <wtf/glib/GUniquePtr.h>
|
||||
|
||||
#if USE(GBM)
|
||||
#include <WebCore/DMABufFormat.h>
|
||||
+#include <WebCore/PlatformDisplayGBM.h>
|
||||
#include <gbm.h>
|
||||
static constexpr uint64_t s_dmabufInvalidModifier = uint64_t(WebCore::DMABufFormat::Modifier::Invalid);
|
||||
#else
|
||||
@@ -55,6 +57,29 @@ static constexpr uint64_t s_dmabufInvalidModifier = ((1ULL << 56) - 1);
|
||||
|
||||
namespace WebKit {
|
||||
|
||||
+static bool isNVIDIA()
|
||||
+{
|
||||
+ const char* forceDMABuf = getenv("WEBKIT_FORCE_DMABUF_RENDERER");
|
||||
+ if (forceDMABuf && strcmp(forceDMABuf, "0"))
|
||||
+ return false;
|
||||
+
|
||||
+ std::unique_ptr<WebCore::PlatformDisplay> platformDisplay;
|
||||
+#if USE(GBM)
|
||||
+ const char* disableGBM = getenv("WEBKIT_DMABUF_RENDERER_DISABLE_GBM");
|
||||
+ if (!disableGBM || !strcmp(disableGBM, "0")) {
|
||||
+ if (auto* device = WebCore::PlatformDisplay::sharedDisplay().gbmDevice())
|
||||
+ platformDisplay = WebCore::PlatformDisplayGBM::create(device);
|
||||
+ }
|
||||
+#endif
|
||||
+ if (!platformDisplay)
|
||||
+ platformDisplay = WebCore::PlatformDisplaySurfaceless::create();
|
||||
+
|
||||
+ WebCore::GLContext::ScopedGLContext glContext(WebCore::GLContext::createOffscreen(platformDisplay ? *platformDisplay : WebCore::PlatformDisplay::sharedDisplay()));
|
||||
+ if (strstr(reinterpret_cast<const char*>(glGetString(GL_VENDOR)), "NVIDIA"))
|
||||
+ return true;
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
OptionSet<DMABufRendererBufferMode> AcceleratedBackingStoreDMABuf::rendererBufferMode()
|
||||
{
|
||||
static OptionSet<DMABufRendererBufferMode> mode;
|
||||
@@ -70,6 +95,9 @@ OptionSet<DMABufRendererBufferMode> AcceleratedBackingStoreDMABuf::rendererBuffe
|
||||
return;
|
||||
}
|
||||
|
||||
+ if (isNVIDIA())
|
||||
+ return;
|
||||
+
|
||||
mode.add(DMABufRendererBufferMode::SharedMemory);
|
||||
|
||||
const auto& eglExtensions = WebCore::PlatformDisplay::sharedDisplay().eglExtensions();
|
|
@ -0,0 +1,100 @@
|
|||
From e07345343415dd2496edc721daa61a3b42703131 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hesse <mail@eworm.de>
|
||||
Date: Tue, 19 Sep 2023 12:16:39 -0700
|
||||
Subject: [PATCH] [GTK] MiniBrowser should hide the toolbar when using
|
||||
--full-screen #17909 https://bugs.webkit.org/show_bug.cgi?id=261732
|
||||
|
||||
Reviewed by Michael Catanzaro.
|
||||
|
||||
Entering fullscreen mode with F11 works as expected.
|
||||
Starting with command line switch `--full-screen` does make the window
|
||||
fullscreen, but does not hide the toolbar. Let's change that.
|
||||
|
||||
Instead of just making the window fullscreen with `gtk_window_fullscreen()`
|
||||
this introduces a new function `browser_window_fullscreen()` that hides
|
||||
the toolbar as well.
|
||||
|
||||
Also introduce new function `browserWindowUnfullscreen()`, use both
|
||||
in `toggleFullScreen()`, and drop extra inversion.
|
||||
|
||||
* Tools/MiniBrowser/gtk/BrowserWindow.c
|
||||
* Tools/MiniBrowser/gtk/BrowserWindow.h
|
||||
* Tools/MiniBrowser/gtk/main.c
|
||||
|
||||
Canonical link: https://commits.webkit.org/268141@main
|
||||
---
|
||||
Tools/MiniBrowser/gtk/BrowserWindow.c | 27 ++++++++++++++++++---------
|
||||
Tools/MiniBrowser/gtk/BrowserWindow.h | 1 +
|
||||
Tools/MiniBrowser/gtk/main.c | 2 +-
|
||||
3 files changed, 20 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/Tools/MiniBrowser/gtk/BrowserWindow.c b/Tools/MiniBrowser/gtk/BrowserWindow.c
|
||||
index 626ce2207e845..58eb5ae39e2e0 100644
|
||||
--- a/Tools/MiniBrowser/gtk/BrowserWindow.c
|
||||
+++ b/Tools/MiniBrowser/gtk/BrowserWindow.c
|
||||
@@ -482,6 +482,20 @@ static GtkWidget *webViewCreate(WebKitWebView *webView, WebKitNavigationAction *
|
||||
return GTK_WIDGET(newWebView);
|
||||
}
|
||||
|
||||
+void browser_window_fullscreen(BrowserWindow *window)
|
||||
+{
|
||||
+ gtk_window_fullscreen(GTK_WINDOW(window));
|
||||
+ gtk_widget_hide(window->toolbar);
|
||||
+ window->fullScreenIsEnabled = TRUE;
|
||||
+}
|
||||
+
|
||||
+static void browserWindowUnfullscreen(BrowserWindow *window)
|
||||
+{
|
||||
+ gtk_window_unfullscreen(GTK_WINDOW(window));
|
||||
+ gtk_widget_show(window->toolbar);
|
||||
+ window->fullScreenIsEnabled = FALSE;
|
||||
+}
|
||||
+
|
||||
static gboolean webViewEnterFullScreen(WebKitWebView *webView, BrowserWindow *window)
|
||||
{
|
||||
gtk_widget_hide(window->toolbar);
|
||||
@@ -867,15 +881,10 @@ static void loadHomePage(GSimpleAction *action, GVariant *parameter, gpointer us
|
||||
static void toggleFullScreen(GSimpleAction *action, GVariant *parameter, gpointer userData)
|
||||
{
|
||||
BrowserWindow *window = BROWSER_WINDOW(userData);
|
||||
- if (!window->fullScreenIsEnabled) {
|
||||
- gtk_window_fullscreen(GTK_WINDOW(window));
|
||||
- gtk_widget_hide(window->toolbar);
|
||||
- window->fullScreenIsEnabled = TRUE;
|
||||
- } else {
|
||||
- gtk_window_unfullscreen(GTK_WINDOW(window));
|
||||
- gtk_widget_show(window->toolbar);
|
||||
- window->fullScreenIsEnabled = FALSE;
|
||||
- }
|
||||
+ if (window->fullScreenIsEnabled)
|
||||
+ browserWindowUnfullscreen(window);
|
||||
+ else
|
||||
+ browser_window_fullscreen(window);
|
||||
}
|
||||
|
||||
static void webKitPrintOperationFailedCallback(WebKitPrintOperation *printOperation, GError *error)
|
||||
diff --git a/Tools/MiniBrowser/gtk/BrowserWindow.h b/Tools/MiniBrowser/gtk/BrowserWindow.h
|
||||
index c58ebc2beec7e..1fd07efb828b8 100644
|
||||
--- a/Tools/MiniBrowser/gtk/BrowserWindow.h
|
||||
+++ b/Tools/MiniBrowser/gtk/BrowserWindow.h
|
||||
@@ -58,6 +58,7 @@ GtkWidget* browser_window_new(GtkWindow*, WebKitWebContext*);
|
||||
#endif
|
||||
WebKitWebContext* browser_window_get_web_context(BrowserWindow*);
|
||||
void browser_window_append_view(BrowserWindow*, WebKitWebView*);
|
||||
+void browser_window_fullscreen(BrowserWindow*);
|
||||
void browser_window_load_uri(BrowserWindow*, const char *uri);
|
||||
void browser_window_load_session(BrowserWindow *, const char *sessionFile);
|
||||
void browser_window_set_background_color(BrowserWindow*, GdkRGBA*);
|
||||
diff --git a/Tools/MiniBrowser/gtk/main.c b/Tools/MiniBrowser/gtk/main.c
|
||||
index 8be643a541511..451e0333dd4e8 100644
|
||||
--- a/Tools/MiniBrowser/gtk/main.c
|
||||
+++ b/Tools/MiniBrowser/gtk/main.c
|
||||
@@ -925,7 +925,7 @@ static void activate(GApplication *application, WebKitSettings *webkitSettings)
|
||||
if (darkMode)
|
||||
g_object_set(gtk_widget_get_settings(GTK_WIDGET(mainWindow)), "gtk-application-prefer-dark-theme", TRUE, NULL);
|
||||
if (fullScreen)
|
||||
- gtk_window_fullscreen(GTK_WINDOW(mainWindow));
|
||||
+ browser_window_fullscreen(mainWindow);
|
||||
|
||||
if (backgroundColor)
|
||||
browser_window_set_background_color(mainWindow, backgroundColor);
|
|
@ -12,7 +12,7 @@ pkgname=(
|
|||
webkit2gtk-docs
|
||||
)
|
||||
pkgver=2.42.1
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="Web content engine for GTK"
|
||||
url="https://webkitgtk.org"
|
||||
arch=(x86_64)
|
||||
|
@ -83,14 +83,17 @@ makedepends=(
|
|||
)
|
||||
source=(
|
||||
$url/releases/webkitgtk-$pkgver.tar.xz{,.asc}
|
||||
webkitgtk-MiniBrowser-fullscreen.patch::https://github.com/WebKit/WebKit/commit/e07345343415dd2496edc721daa61a3b42703131.patch
|
||||
GTK-MiniBrowser-should-hide-the-toolbar-when-using-full-screen.patch
|
||||
GTK-Disable-DMABuf-renderer-for-NVIDIA-proprietary-drivers.patch
|
||||
)
|
||||
sha256sums=('6f41fac9989d3ee51c08c48de1d439cdeddecbc757e34b6180987d99b16d2499'
|
||||
'SKIP'
|
||||
'a921d6be1303e9f23474971f381886fd291ec5bb1a7ff1e85acede8cfb88bef2')
|
||||
'a921d6be1303e9f23474971f381886fd291ec5bb1a7ff1e85acede8cfb88bef2'
|
||||
'655f3b2c96355ac83c4fa1fc6048e3256bbfdbfb9727e1e18c5af12613536206')
|
||||
b2sums=('c6453cf2d15661507df66c5478e7675217b62d9579cf9b9408cb3e4fa1a8405c5c2608edf0960baed62aafa766e6cdbe2f0c07e8fb728d86c111f12d5a816492'
|
||||
'SKIP'
|
||||
'd440d82c769f1b35caf5464dc850cdf1c896224205c90c17d8b0a44aee62e4b1383e11306936aaca067fde8836770d346d5122d7b05c91a5c7c1741c89c65e2f')
|
||||
'd440d82c769f1b35caf5464dc850cdf1c896224205c90c17d8b0a44aee62e4b1383e11306936aaca067fde8836770d346d5122d7b05c91a5c7c1741c89c65e2f'
|
||||
'daa782d4d40cc12a05c02b2494e879333f66f32820f1a1b89b7ab68f62fd53043b116ecb5ef476004095a7c7b924b12695b7e87e21dd547f66e72fa02a972f0d')
|
||||
validpgpkeys=(
|
||||
'D7FCF61CF9A2DEAB31D81BD3F3D322D0EC4582C3' # Carlos Garcia Campos <cgarcia@igalia.com>
|
||||
'5AA3BC334FD7E3369E7C77B291C559DBE4C9123B' # Adrián Pérez de Castro <aperez@igalia.com>
|
||||
|
@ -99,7 +102,13 @@ validpgpkeys=(
|
|||
prepare() {
|
||||
cd webkitgtk-$pkgver
|
||||
|
||||
patch -Np1 < ../webkitgtk-MiniBrowser-fullscreen.patch
|
||||
# Requested by eworm
|
||||
# https://github.com/WebKit/WebKit/pull/17909
|
||||
patch -Np1 -i ../GTK-MiniBrowser-should-hide-the-toolbar-when-using-full-screen.patch
|
||||
|
||||
# https://bugs.archlinux.org/task/79783
|
||||
# https://github.com/WebKit/WebKit/pull/18614
|
||||
patch -Np1 -i ../GTK-Disable-DMABuf-renderer-for-NVIDIA-proprietary-drivers.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
|
|
Loading…
Reference in a new issue