Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 05b0362e7afb422264eec6fa23675d71d700855d
      
https://github.com/WebKit/WebKit/commit/05b0362e7afb422264eec6fa23675d71d700855d
  Author: Adrian Perez de Castro <[email protected]>
  Date:   2026-08-25 (Tue, 25 Aug 2026)

  Changed paths:
    M Source/WebKit/UIProcess/API/glib/WebKitImage.cpp
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/glib/TestWebKitImage.cpp

  Log Message:
  -----------
  [GTK][WPE] Using g_loadable_icon_load[_async] on a WebKitImage provides wrong 
translucent pixel values
https://bugs.webkit.org/show_bug.cgi?id=322484

Reviewed by Patrick Griffis.

WebKitImage is documented to use premultiplied alpha, but when wrapping the
pixel data with a SkImage the flag kUnpremul_SkAlphaType was used. The fix
is to use the correct kPremul_SkAlphaType flag instead

The "/webkit/WebKitImage/loadable-icon-interface-sync-load" test case is
modified to add encoding of a WebKitImage with a translucent pixel as PNG
and then reading it back using plain libpng calls to verify that the pixel
was stored un-premultiplied correctly in the PNG (as per the spec).

* Source/WebKit/UIProcess/API/glib/WebKitImage.cpp:
(webkitImageLoad):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/glib/TestWebKitImage.cpp:
(testWebKitImageLoadableIconLoadSync):

Canonical link: https://commits.webkit.org/319805@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to