RESOLVED FIXED332157
[GTK][2.54.3] gtk/WebKitWebViewBase.cpp:3849:23: error: no viable overloaded '='
https://bugs.webkit.org/show_bug.cgi?id=332157
Summary [GTK][2.54.3] gtk/WebKitWebViewBase.cpp:3849:23: error: no viable overloaded '='
Alberto Garcia
Reported 2026-11-18 04:44:51 PST

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) {
Attachments
Adrian Perez
Comment 1 2026-11-18 05:39:47 PST

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.

Thanks Alberto!

Adrian Perez
Comment 2 2026-11-18 05:54:37 PST
EWS
Comment 3 2026-11-18 05:57:50 PST
Committed 317695.778@webkitglib/2.54 (b3aa62a29415): <https://commits.webkit.org/317695.778@webkitglib/2.54> Reviewed commits have been landed. Closing PR #81403 and removing active labels.
Adrian Perez
Comment 4 2026-11-19 02:02:04 PST
*** Bug 332342 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.