Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f53dba1d3a1d36338bc916c2cecf97205f03b97f
      
https://github.com/WebKit/WebKit/commit/f53dba1d3a1d36338bc916c2cecf97205f03b97f
  Author: Simon Pena <[email protected]>
  Date:   2025-11-07 (Fri, 07 Nov 2025)

  Changed paths:
    M Source/WebKit/PlatformGTK.cmake
    M Source/WebKit/PlatformWPE.cmake
    M Source/WebKit/SourcesGTK.txt
    M Source/WebKit/SourcesWPE.txt
    A Source/WebKit/UIProcess/API/glib/WebKitImage.cpp
    A Source/WebKit/UIProcess/API/glib/WebKitImage.h.in
    A Source/WebKit/UIProcess/API/glib/WebKitImagePrivate.h
    M Source/WebKit/UIProcess/API/glib/webkit.h.in
    A Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitImage.cpp
    M Tools/TestWebKitAPI/glib/CMakeLists.txt

  Log Message:
  -----------
  [GTK][WPE] Add WebKitImage utility class to the public API
https://bugs.webkit.org/show_bug.cgi?id=301089

Reviewed by Adrian Perez de Castro and Carlos Garcia Campos.

Added a new WebKitImage utility class. This exposes width, height,
stride and image type properties, and allows accessing the native bytes
as well as a GdkTexture for convenience if under PLATFORM(GTK).

This class implements the GIcon and GLoadableIcon interfaces, and has
tests exercising its API as well as the interface implementations.

Tests: Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitImage.cpp
       Tools/TestWebKitAPI/glib/CMakeLists.txt
* Source/WebKit/PlatformGTK.cmake:
* Source/WebKit/PlatformWPE.cmake:
* Source/WebKit/SourcesGTK.txt:
* Source/WebKit/SourcesWPE.txt:
* Source/WebKit/UIProcess/API/glib/WebKitImage.cpp: Added.
(webkitImageSetProperty):
(webkitImageGetProperty):
(webkit_image_class_init):
(webkitImageNew):
(webkit_image_get_width):
(webkit_image_get_height):
(webkit_image_get_stride):
(webkit_image_as_rgba_bytes):
(webkitImageHash):
(webkitImageEqual):
(webkitImageLoad):
(webkitImageLoadAsync):
(webkitImageLoadFinish):
(webkit_image_gicon_interface_init):
(webkit_image_gloadable_icon_interface_init):
* Source/WebKit/UIProcess/API/glib/WebKitImage.h.in: Added.
* Source/WebKit/UIProcess/API/glib/WebKitImagePrivate.h: Added.
* Source/WebKit/UIProcess/API/glib/webkit.h.in:
* Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitImage.cpp: Added.
(WebKitImageTest::asyncLoadFinishedCallback):
(WebKitImageTest::WebKitImageTest):
(WebKitImageTest::~WebKitImageTest):
(testWebKitImagePropertiesConstruct):
(testWebKitImageIconInterface):
(testWebKitImageLoadableIconLoadSync):
(testWebKitImageLoadableIconLoadAsync):
(beforeAll):
(afterAll):
* Tools/TestWebKitAPI/glib/CMakeLists.txt:

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



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

Reply via email to