or
https://bugs.webkit.org/show_bug.cgi?id=332157
Here's the full error message:
/build/webkit2gtk-2.54.3/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp:3849:23: error: no viable overloaded '=' 3849 | platformImage = SkiaUtilities::scaleImagePixels(platformImage, scaledSize); | ~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /build/webkit2gtk-2.54.3/Source/ThirdParty/skia/include/core/SkRefCnt.h:260:15: note: candidate function not viable: 'this' argument has type 'const PlatformImagePtr' (aka 'const sk_sp<SkImage>'), but method is not marked const 260 | sk_sp<T>& operator=(std::nullptr_t) { this->reset(); return *this; } | ^ /build/webkit2gtk-2.54.3/Source/ThirdParty/skia/include/core/SkRefCnt.h:267:15: note: candidate function not viable: 'this' argument has type 'const PlatformImagePtr' (aka 'const sk_sp<SkImage>'), but method is not marked const 267 | sk_sp<T>& operator=(const sk_sp<T>& that) { | ^ /build/webkit2gtk-2.54.3/Source/ThirdParty/skia/include/core/SkRefCnt.h:275:15: note: candidate function template not viable: 'this' argument has type 'const PlatformImagePtr' (aka 'const sk_sp<SkImage>'), but method is not marked const 275 | sk_sp<T>& operator=(const sk_sp<U>& that) { | ^ /build/webkit2gtk-2.54.3/Source/ThirdParty/skia/include/core/SkRefCnt.h:285:15: note: candidate function not viable: 'this' argument has type 'const PlatformImagePtr' (aka 'const sk_sp<SkImage>'), but method is not marked const 285 | sk_sp<T>& operator=(sk_sp<T>&& that) { | ^ /build/webkit2gtk-2.54.3/Source/ThirdParty/skia/include/core/SkRefCnt.h:291:15: note: candidate function template not viable: 'this' argument has type 'const PlatformImagePtr' (aka 'const sk_sp<SkImage>'), but method is not marked const 291 | sk_sp<T>& operator=(sk_sp<U>&& that) { | ^
I believe that this happens with GTK 4 < 4.22, I'm currently testing this patch:
--- webkitgtk.orig/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp +++ webkitgtk/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp @@ -3820,7 +3820,7 @@ auto cursorScale = cursor.imageScaleFactor(); IntPoint effectiveHotSpot = determineHotSpot(cursor.image().get(), cursor.hotSpot()).scaled(1 / cursorScale); - auto& platformImage = nativeImage->platformImage(); + auto platformImage = nativeImage->platformImage(); #if USE(GTK4) if (cursorScale != 1) {
This issue was fixed silently in the main branch in 319114@main with the same change; in the middle of a bigger patch. Let's apply only the suggested build fix to the 2.54 branch.
main
Thanks Alberto!