Skip to content

Commit

Permalink
wpewebkit: Add bbappend for 2.44 version
Browse files Browse the repository at this point in the history
  • Loading branch information
psaavedra committed Apr 17, 2024
1 parent e022fc6 commit 38983ea
Show file tree
Hide file tree
Showing 7 changed files with 108 additions and 38 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
PREFERRED_PROVIDER_virtual/wpebackend = "wpebackend-fdo"
PREFERRED_PROVIDER_virtual/libwpe = "libwpe"
PREFERRED_VERSION_cog = "0.17.%"
PREFERRED_VERSION_wpewebkit = "2.40%"
PREFERRED_VERSION_cog = "0.18.%"
PREFERRED_VERSION_libwpe = "1.16.%"
PREFERRED_VERSION_wpebackend-fdo = "1.14.%"
PREFERRED_VERSION_wpebackend-rdk = "1.20200213"
PREFERRED_VERSION_wpewebkit = "2.44.%"
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
From c778ce6a597239febb8e5b02e611a387fa084571 Mon Sep 17 00:00:00 2001
From 67dbdd65c3f44cf55c2ca91d0bb0dfc2691dba7c Mon Sep 17 00:00:00 2001
From: Pablo Saavedra <[email protected]>
Date: Wed, 24 May 2023 13:50:19 +0000
Subject: [PATCH] Add LAYER_BASED_SVG_ENGINE and LAYER_BASED_SVG_ENGINE_TOGGLER
envvars
Subject: [PATCH 1/2] Add LAYER_BASED_SVG_ENGINE and
LAYER_BASED_SVG_ENGINE_TOGGLER envvars

---
.../UIProcess/API/glib/WebKitWebView.cpp | 3 +++
Expand All @@ -11,10 +11,10 @@ Subject: [PATCH] Add LAYER_BASED_SVG_ENGINE and LAYER_BASED_SVG_ENGINE_TOGGLER
3 files changed, 30 insertions(+)

diff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp b/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
index 837aa061..fce55d67 100644
index 7cf82df0..4b0118a7 100644
--- a/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
+++ b/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
@@ -3333,6 +3333,9 @@ void webkit_web_view_reload(WebKitWebView* webView)
@@ -3449,6 +3449,9 @@ void webkit_web_view_reload(WebKitWebView* webView)
{
g_return_if_fail(WEBKIT_IS_WEB_VIEW(webView));

Expand All @@ -25,10 +25,10 @@ index 837aa061..fce55d67 100644
}

diff --git a/Source/WebKit/UIProcess/WebPageProxy.cpp b/Source/WebKit/UIProcess/WebPageProxy.cpp
index 4f48ca66..a2dcd7c9 100644
index 9a0e9e38..e5d04af3 100644
--- a/Source/WebKit/UIProcess/WebPageProxy.cpp
+++ b/Source/WebKit/UIProcess/WebPageProxy.cpp
@@ -700,8 +700,10 @@ void WebPageProxy::notifyProcessPoolToPrewarm()
@@ -936,8 +936,10 @@ void WebPageProxy::notifyProcessPoolToPrewarm()

void WebPageProxy::setPreferences(WebPreferences& preferences)
{
Expand All @@ -37,14 +37,14 @@ index 4f48ca66..a2dcd7c9 100644
return;
+#endif

m_preferences->removePage(*this);
protectedPreferences()->removePage(*this);
m_preferences = preferences;
diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.cpp b/Source/WebKit/WebProcess/WebPage/WebPage.cpp
index 9431e5bb..b9d71d63 100644
index d981b937..db8f4a7b 100644
--- a/Source/WebKit/WebProcess/WebPage/WebPage.cpp
+++ b/Source/WebKit/WebProcess/WebPage/WebPage.cpp
@@ -405,6 +405,10 @@
#import <pal/spi/cg/CoreGraphicsSPI.h>
@@ -445,6 +445,10 @@
#include "UnifiedTextReplacementController.h"
#endif

+#if ENABLE(LAYER_BASED_SVG_ENGINE)
Expand All @@ -54,7 +54,7 @@ index 9431e5bb..b9d71d63 100644
namespace WebKit {
using namespace JSC;
using namespace WebCore;
@@ -4200,6 +4204,27 @@ void WebPage::updatePreferences(const WebPreferencesStore& store)
@@ -4535,6 +4539,27 @@ void WebPage::updatePreferences(const WebPreferencesStore& store)

updateSettingsGenerated(store, settings);

Expand Down Expand Up @@ -83,5 +83,5 @@ index 9431e5bb..b9d71d63 100644
if (!settings.acceleratedCompositingEnabled()) {
WEBPAGE_RELEASE_LOG(Layers, "updatePreferences: acceleratedCompositingEnabled setting was false. WebKit cannot function in this mode; changing setting to true");
--
2.30.2
2.34.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
From c244409ffd862e768d5b2fdd8894e7b16853a149 Mon Sep 17 00:00:00 2001
From: Vitaly Dyachkov <[email protected]>
Date: Mon, 25 Mar 2024 12:09:45 +0100
Subject: [PATCH 2/2] Fix LBSE blurriness

---
Source/WebCore/platform/graphics/GraphicsLayer.h | 1 +
.../graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp | 5 ++++-
.../graphics/texmap/coordinated/CoordinatedGraphicsLayer.h | 2 ++
Source/WebCore/rendering/RenderLayerBacking.cpp | 5 +++++
4 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/Source/WebCore/platform/graphics/GraphicsLayer.h b/Source/WebCore/platform/graphics/GraphicsLayer.h
index da40ec3f..9a4a3866 100644
--- a/Source/WebCore/platform/graphics/GraphicsLayer.h
+++ b/Source/WebCore/platform/graphics/GraphicsLayer.h
@@ -620,6 +620,7 @@ public:

virtual void deviceOrPageScaleFactorChanged() { }
virtual void setShouldUpdateRootRelativeScaleFactor(bool) { }
+ virtual void setShouldDoubleScaleFactor(bool) { }

WEBCORE_EXPORT void noteDeviceOrPageScaleFactorChangedIncludingDescendants();

diff --git a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp
index 24d162c8..a38af61f 100644
--- a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp
+++ b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp
@@ -1080,7 +1080,10 @@ void CoordinatedGraphicsLayer::deviceOrPageScaleFactorChanged()

float CoordinatedGraphicsLayer::effectiveContentsScale()
{
- return selfOrAncestorHaveNonAffineTransforms() ? 1 : deviceScaleFactor() * pageScaleFactor();
+ float contentsScale = selfOrAncestorHaveNonAffineTransforms() ? 1 : deviceScaleFactor() * pageScaleFactor();
+ if (m_shouldDoubleScaleFactor)
+ return contentsScale * 2;
+ return contentsScale;
}

IntRect CoordinatedGraphicsLayer::transformedVisibleRect()
diff --git a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h
index 97d05bd7..8f170c4c 100644
--- a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h
+++ b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h
@@ -110,6 +110,7 @@ public:
void setNeedsDisplayInRect(const FloatRect&, ShouldClipToLayer = ClipToLayer) override;
void setContentsNeedsDisplay() override;
void deviceOrPageScaleFactorChanged() override;
+ void setShouldDoubleScaleFactor(bool shouldDoubleScaleFactor) override { m_shouldDoubleScaleFactor = shouldDoubleScaleFactor; }
void flushCompositingState(const FloatRect&) override;
void flushCompositingStateForThisLayerOnly() override;
bool setFilters(const FilterOperations&) override;
@@ -225,6 +226,7 @@ private:
bool m_pendingContentsScaleAdjustment : 1;
bool m_pendingVisibleRectAdjustment : 1;
bool m_shouldUpdatePlatformLayer : 1;
+ bool m_shouldDoubleScaleFactor : 1 { false };

CoordinatedGraphicsLayerClient* m_coordinator;

diff --git a/Source/WebCore/rendering/RenderLayerBacking.cpp b/Source/WebCore/rendering/RenderLayerBacking.cpp
index 5cf3cfa6..28c50f42 100644
--- a/Source/WebCore/rendering/RenderLayerBacking.cpp
+++ b/Source/WebCore/rendering/RenderLayerBacking.cpp
@@ -364,6 +364,11 @@ Ref<GraphicsLayer> RenderLayerBacking::createGraphicsLayer(const String& name, G
if (renderer().isSVGLayerAwareRenderer() && renderer().document().settings().layerBasedSVGEngineEnabled())
graphicsLayer->setShouldUpdateRootRelativeScaleFactor(true);
#endif
+
+#if ENABLE(LAYER_BASED_SVG_ENGINE)
+ if (renderer().isSVGLayerAwareRenderer() && renderer().document().settings().layerBasedSVGEngineEnabled())
+ graphicsLayer->setShouldDoubleScaleFactor(true);
+#endif

return graphicsLayer;
}
--
2.34.1

5 changes: 1 addition & 4 deletions recipes-browser/wpewebkit/wpewebkit_%.bbappend
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"

PACKAGECONFIG:append = " accessibility experimental-features lbse mediastream"
PACKAGECONFIG:append = " experimental-features"

EXTRA_OECMAKE += " -DENABLE_SPEECH_SYNTHESIS=OFF"

# 2.40 fails to build with this experimental feature enabled
EXTRA_OECMAKE += " -DENABLE_WEB_CODECS=OFF"

8 changes: 0 additions & 8 deletions recipes-browser/wpewebkit/wpewebkit_2.40.%.bbappend

This file was deleted.

11 changes: 0 additions & 11 deletions recipes-browser/wpewebkit/wpewebkit_2.42.%.bbappend
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,3 @@ SRC_URI += "file://0001-Add-LAYER_BASED_SVG_ENGINE-envvar_v2.42.patch \
file://Fix-LBSE-blurriness.patch \
"

SRC_URI:class-devupstream = "git://github.com/WebKit/webkit.git;protocol=https;branch=main"
S:class-devupstream = "${WORKDIR}/git"

SRCREV:class-devupstream = "33c49ff64449389431294ba0ace6f7d0ad6306b7"
# SRCREV:class-devupstream = "${AUTOREV}"

PV:class-devupstream = "trunk"

RCONFLICTS:${PN}:class-devupstream = ""

DEPENDS:class-devupstream += " libinput libbacktrace"
12 changes: 12 additions & 0 deletions recipes-browser/wpewebkit/wpewebkit_2.44.%.bbappend
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"

SRC_URI += "file://0001-Add-LAYER_BASED_SVG_ENGINE-envvar_v2.44.patch \
file://0002-Fix-LBSE-blurriness_v2.44.patch \
"

# SRCREV:class-devupstream = "${AUTOREV}"

PV:class-devupstream = "trunk"

RCONFLICTS:${PN}:class-devupstream = ""

0 comments on commit 38983ea

Please sign in to comment.